Interface ConnectionDAO
- All Superinterfaces:
org.exoplatform.commons.api.persistence.GenericDAO<ConnectionEntity,Long>
- All Known Implementing Classes:
ConnectionDAOImpl
public interface ConnectionDAO
extends org.exoplatform.commons.api.persistence.GenericDAO<ConnectionEntity,Long>
-
Method Summary
Modifier and TypeMethodDescriptionlongcount(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type status) Has the connectionsgetConnection(Long sender, Long receiver) getConnection(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) Get connection of 2 usersgetConnectionIds(long identityId, org.exoplatform.social.core.relationship.model.Relationship.Type status) Return list of identities with whom the passed identity in parameter has a confirmed relationshipgetConnections(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type status) getConnections(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit, org.exoplatform.social.core.search.Sorting sorting) getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit) intgetConnectionsByFilterCount(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.relationship.model.Relationship.Type type) intgetConnectionsCount(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type) intgetConnectionsInCommonCount(String id, String id2) getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit) getReceiverIds(long receiverId, org.exoplatform.social.core.relationship.model.Relationship.Type status, int offset, int limit) getSenderIds(long receiverId, org.exoplatform.social.core.relationship.model.Relationship.Type status, int offset, int limit) Methods inherited from interface org.exoplatform.commons.api.persistence.GenericDAO
count, create, createAll, delete, deleteAll, deleteAll, find, findAll, update, updateAll
-
Method Details
-
count
long count(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type status) Has the connections- Parameters:
identity- the Identitystatus- the status of connection- Returns:
- number of connection
-
getConnection
ConnectionEntity getConnection(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) Get connection of 2 users- Parameters:
identity1- The first Identityidentity2- the second Identity- Returns:
- the connection entity
-
getConnection
- Parameters:
sender- the id of sender Identityreceiver- the id of receiver Identity- Returns:
- the connection entity
-
getConnections
List<ConnectionEntity> getConnections(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit, org.exoplatform.social.core.search.Sorting sorting) - Parameters:
identity- the Identitytype- type of connectionoffset- the start indexlimit- the max items to loadsorting- sortby field name and sort direction- Returns:
- list of connection entities
-
getConnections
List<ConnectionEntity> getConnections(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type status) - Parameters:
sender- the sender Identityreceiver- the receiver Identitystatus- the connection status- Returns:
- list of connection entities
-
getConnectionsCount
int getConnectionsCount(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type) - Parameters:
identity- the Identitytype- the connection type- Returns:
- number of connections
-
getLastConnections
List<ConnectionEntity> getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit) - Parameters:
identity- the Identitylimit- max item to load- Returns:
- list of connection entities
-
getConnectionsByFilter
List<ConnectionEntity> getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit) - Parameters:
existingIdentity- the IdentityprofileFilter- the ProfileFiltertype- connection typeoffset- the start indexlimit- max items to load- Returns:
- list of connection entities
-
getConnectionsByFilterCount
int getConnectionsByFilterCount(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, org.exoplatform.social.core.relationship.model.Relationship.Type type) - Parameters:
identity- the IdentityprofileFilter- the profile filtertype- connection type- Returns:
- number of connections
-
getSenderIds
-
getReceiverIds
-
getConnectionsInCommonCount
- Parameters:
id-id2-- Returns:
- connections in common count between two users
-
getConnectionIds
Set<Long> getConnectionIds(long identityId, org.exoplatform.social.core.relationship.model.Relationship.Type status) Return list of identities with whom the passed identity in parameter has a confirmed relationship- Parameters:
identityId-status-- Returns:
SetofIdentityids
-