com.silverpeas.socialnetwork.relationShip
Class RelationShipService

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

@Named
public class RelationShipService
extends Object


Constructor Summary
RelationShipService()
           
 
Method Summary
 List<String> getAllCommonContactsIds(int user1Id, int user2Id)
          get all common contacts Ids between usre1 and user2
 List<RelationShip> getAllMyRelationShips(int myId)
          get all my RelationShips
 List<SocialInformation> getAllMyRelationShips(String userId, Date begin, Date end)
          Get list of my socialInformationRelationShip (relationShips) according to number of Item and the first Index
 List<SocialInformation> getAllRelationShipsOfMyContact(String myId, List<String> myContactsIds, Date begin, Date end)
          Get list socialInformationRelationShip (relationShips) of my Contacts according to number of Item and the first Index
 List<String> getMyContactsIds(int myId)
          get all my RelationShips ids
 RelationShip getRelationShip(int user1Id, int user2Id)
          get RelationShip witch is between user1 and user2
 boolean isInRelationShip(int user1Id, int user2Id)
          these two users in relationship
 boolean removeRelationShip(int idUser1, int idUser2)
          remove RelationShip (if this relationShips is deleted return true)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationShipService

public RelationShipService()
Method Detail

removeRelationShip

public boolean removeRelationShip(int idUser1,
                                  int idUser2)
remove RelationShip (if this relationShips is deleted return true)

Parameters:
idUser1 -
idUser2 -
Returns:
boolean

isInRelationShip

public boolean isInRelationShip(int user1Id,
                                int user2Id)
                         throws SQLException
these two users in relationship

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

getAllMyRelationShips

public List<RelationShip> getAllMyRelationShips(int myId)
                                         throws SQLException
get all my RelationShips

Parameters:
myId -
Returns:
List
Throws:
SQLException

getMyContactsIds

public List<String> getMyContactsIds(int myId)
                              throws SQLException
get all my RelationShips ids

Parameters:
myId -
Returns:
List
Throws:
SQLException

getAllCommonContactsIds

public List<String> getAllCommonContactsIds(int user1Id,
                                            int user2Id)
                                     throws SQLException
get all common contacts Ids between usre1 and user2

Parameters:
user1Id -
user2Id -
Returns:
List
Throws:
SQLException

getAllMyRelationShips

public List<SocialInformation> getAllMyRelationShips(String userId,
                                                     Date begin,
                                                     Date end)
                                              throws SQLException
Get list of my socialInformationRelationShip (relationShips) according to number of Item and the first Index

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

getAllRelationShipsOfMyContact

public List<SocialInformation> getAllRelationShipsOfMyContact(String myId,
                                                              List<String> myContactsIds,
                                                              Date begin,
                                                              Date end)
                                                       throws SQLException
Get list socialInformationRelationShip (relationShips) of my Contacts according to number of Item and the first Index

Parameters:
myId -
myContactsIds -
begin -
end -
Returns:
List
Throws:
SQLException

getRelationShip

public RelationShip getRelationShip(int user1Id,
                                    int user2Id)
                             throws SQLException
get RelationShip witch is between user1 and user2

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


Copyright © 2016 Silverpeas. All Rights Reserved.