com.silverpeas.socialnetwork.relationShip
Class RelationShipDao

java.lang.Object
  extended by com.silverpeas.socialnetwork.relationShip.RelationShipDao

public class RelationShipDao
extends Object


Constructor Summary
RelationShipDao()
           
 
Method Summary
 int createRelationShip(Connection connection, RelationShip relationShip)
          rturn int (the id of this new relationShip)
 boolean deleteRelationShip(Connection connection, int user1Id, int user2Id)
          delete this relationShip rturn boolean (if this relationShips is deleted return true)
 boolean deleteRelationShip(Connection connection, RelationShip relationShip)
          delete this relationShip rturn boolean (if this relationShips is deleted return true)
 List<RelationShip> getAllMyRelationShips(Connection connection, int myId)
          return the list of all my RelationShips
 List<SocialInformation> getAllMyRelationShips(Connection con, String userId, Date begin, Date end)
          get list of my socialInformation (relationShip) according to number of Item and the first Index
 RelationShip getRelationShip(Connection connection, int relationShipId)
           
 RelationShip getRelationShip(Connection connection, int user1Id, int user2Id)
          return the relationShip witch between user1 and user2
 boolean isInRelationShip(Connection connection, int user1Id, int user2Id)
          rturn if this relationShip exist or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationShipDao

public RelationShipDao()
Method Detail

createRelationShip

public int createRelationShip(Connection connection,
                              RelationShip relationShip)
                       throws UtilException,
                              SQLException
rturn int (the id of this new relationShip)

Parameters:
connection -
relationShip -
Returns:
int
Throws:
UtilException
SQLException

deleteRelationShip

public boolean deleteRelationShip(Connection connection,
                                  int user1Id,
                                  int user2Id)
                           throws SQLException
delete this relationShip rturn boolean (if this relationShips is deleted return true)

Parameters:
connection -
user1Id -
user2Id -
Returns:
boolean
Throws:
SQLException

deleteRelationShip

public boolean deleteRelationShip(Connection connection,
                                  RelationShip relationShip)
                           throws SQLException
delete this relationShip rturn boolean (if this relationShips is deleted return true)

Parameters:
connection -
relationShip -
Returns:
boolean
Throws:
SQLException

getRelationShip

public RelationShip getRelationShip(Connection connection,
                                    int user1Id,
                                    int user2Id)
                             throws SQLException
return the relationShip witch between user1 and user2

Parameters:
connection -
user1Id -
user2Id -
Returns:
RelationShip
Throws:
SQLException

isInRelationShip

public boolean isInRelationShip(Connection connection,
                                int user1Id,
                                int user2Id)
                         throws SQLException
rturn if this relationShip exist or not

Parameters:
connection -
user1Id -
user2Id -
Returns:
boolean
Throws:
SQLException

getAllMyRelationShips

public List<RelationShip> getAllMyRelationShips(Connection connection,
                                                int myId)
                                         throws SQLException
return the list of all my RelationShips

Parameters:
connection -
myId -
Returns:
List
Throws:
SQLException

getAllMyRelationShips

public List<SocialInformation> getAllMyRelationShips(Connection con,
                                                     String userId,
                                                     Date begin,
                                                     Date end)
                                              throws SQLException
get list of my socialInformation (relationShip) according to number of Item and the first Index

Parameters:
con -
userId -
begin -
end -
Returns:
List
Throws:
SQLException

getRelationShip

public RelationShip getRelationShip(Connection connection,
                                    int relationShipId)
                             throws SQLException
Parameters:
connection -
relationShipId - the relationship identifier
Returns:
RelationShip loaded from relation ship identifier
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.