Class RDBMSRelationshipStorageImpl

java.lang.Object
org.exoplatform.social.core.jpa.storage.RDBMSRelationshipStorageImpl
All Implemented Interfaces:
org.exoplatform.social.core.storage.api.RelationshipStorage

public class RDBMSRelationshipStorageImpl extends Object implements org.exoplatform.social.core.storage.api.RelationshipStorage
  • Constructor Summary

    Constructors
    Constructor
    Description
    RDBMSRelationshipStorageImpl(RDBMSIdentityStorageImpl identityStorage, ConnectionDAO connectionDAO, IdentityDAO identityDAO)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.exoplatform.social.core.identity.model.Identity>
    getConnections(org.exoplatform.social.core.identity.model.Identity identity)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getConnections(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit)
     
    int
    getConnectionsCount(org.exoplatform.social.core.identity.model.Identity identity)
     
    int
    getConnectionsCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    int
    getConnectionsInCommonCount(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIncomingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit)
     
    int
    getIncomingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getIncomingRelationships(org.exoplatform.social.core.identity.model.Identity receiver, long offset, long limit)
     
    int
    getIncomingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity receiver)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getOutgoingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit)
     
    int
    getOutgoingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getOutgoingRelationships(org.exoplatform.social.core.identity.model.Identity sender, long offset, long limit)
     
    int
    getOutgoingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity sender)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getReceiverRelationships(org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity)
     
    org.exoplatform.social.core.relationship.model.Relationship
    getRelationship(String relationshipId)
     
    org.exoplatform.social.core.relationship.model.Relationship
    getRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2)
     
    List<org.exoplatform.social.core.identity.model.Identity>
    getRelationships(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getRelationships(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getRelationshipsByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit)
     
    int
    getRelationshipsCount(org.exoplatform.social.core.identity.model.Identity identity)
     
    int
    getRelationshipsCountByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getSenderRelationships(String senderId, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity)
     
    List<org.exoplatform.social.core.relationship.model.Relationship>
    getSenderRelationships(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity)
     
    Map<org.exoplatform.social.core.identity.model.Identity,Integer>
    getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int maxConnections, int maxConnectionsToLoad, int maxSuggestions)
     
    boolean
    hasRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2, String relationshipPath)
     
    void
    removeRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship)
     
    org.exoplatform.social.core.relationship.model.Relationship
    saveRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • saveRelationship

      public org.exoplatform.social.core.relationship.model.Relationship saveRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      saveRelationship in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • removeRelationship

      public void removeRelationship(org.exoplatform.social.core.relationship.model.Relationship relationship) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      removeRelationship in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationship

      public org.exoplatform.social.core.relationship.model.Relationship getRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationship in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationship

      public org.exoplatform.social.core.relationship.model.Relationship getRelationship(String relationshipId) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationship in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConnections

      public List<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getConnections in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConnections

      public List<org.exoplatform.social.core.identity.model.Identity> getConnections(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getConnections in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConnectionsCount

      public int getConnectionsCount(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getConnectionsCount in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationshipsCount

      public int getRelationshipsCount(org.exoplatform.social.core.identity.model.Identity identity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationshipsCount in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationships in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getReceiverRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getReceiverRelationships(org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getReceiverRelationships in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getSenderRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getSenderRelationships(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getSenderRelationships in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type)
    • getRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit)
    • getRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationships(org.exoplatform.social.core.identity.model.Identity sender, org.exoplatform.social.core.identity.model.Identity receiver, org.exoplatform.social.core.relationship.model.Relationship.Type type)
    • getOutgoingRelationships

      public List<org.exoplatform.social.core.identity.model.Identity> getOutgoingRelationships(org.exoplatform.social.core.identity.model.Identity sender, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getOutgoingRelationships in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getOutgoingRelationshipsCount

      public int getOutgoingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity sender) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getOutgoingRelationshipsCount in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getIncomingRelationships

      public List<org.exoplatform.social.core.identity.model.Identity> getIncomingRelationships(org.exoplatform.social.core.identity.model.Identity receiver, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getIncomingRelationships in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getIncomingRelationshipsCount

      public int getIncomingRelationshipsCount(org.exoplatform.social.core.identity.model.Identity receiver) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getIncomingRelationshipsCount in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getLastConnections

      public List<org.exoplatform.social.core.identity.model.Identity> getLastConnections(org.exoplatform.social.core.identity.model.Identity identity, int limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getLastConnections in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getSenderRelationships

      public List<org.exoplatform.social.core.relationship.model.Relationship> getSenderRelationships(String senderId, org.exoplatform.social.core.relationship.model.Relationship.Type type, List<org.exoplatform.social.core.identity.model.Identity> listCheckIdentity) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getSenderRelationships in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • hasRelationship

      public boolean hasRelationship(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2, String relationshipPath)
      Specified by:
      hasRelationship in interface org.exoplatform.social.core.storage.api.RelationshipStorage
    • getRelationships

      public List<org.exoplatform.social.core.identity.model.Identity> getRelationships(org.exoplatform.social.core.identity.model.Identity identity, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getRelationships in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConnectionsByFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getConnectionsByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getConnectionsByFilter in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getIncomingByFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getIncomingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getIncomingByFilter in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getOutgoingByFilter

      public List<org.exoplatform.social.core.identity.model.Identity> getOutgoingByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter, long offset, long limit) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getOutgoingByFilter in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConnectionsCountByFilter

      public int getConnectionsCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getConnectionsCountByFilter in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getIncomingCountByFilter

      public int getIncomingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getIncomingCountByFilter in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getOutgoingCountByFilter

      public int getOutgoingCountByFilter(org.exoplatform.social.core.identity.model.Identity existingIdentity, org.exoplatform.social.core.profile.ProfileFilter profileFilter) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getOutgoingCountByFilter in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getRelationshipsByStatus

      public List<org.exoplatform.social.core.relationship.model.Relationship> getRelationshipsByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type, long offset, long limit)
      Specified by:
      getRelationshipsByStatus in interface org.exoplatform.social.core.storage.api.RelationshipStorage
    • getRelationshipsCountByStatus

      public int getRelationshipsCountByStatus(org.exoplatform.social.core.identity.model.Identity identity, org.exoplatform.social.core.relationship.model.Relationship.Type type)
      Specified by:
      getRelationshipsCountByStatus in interface org.exoplatform.social.core.storage.api.RelationshipStorage
    • getSuggestions

      public Map<org.exoplatform.social.core.identity.model.Identity,Integer> getSuggestions(org.exoplatform.social.core.identity.model.Identity identity, int maxConnections, int maxConnectionsToLoad, int maxSuggestions) throws org.exoplatform.social.core.storage.RelationshipStorageException
      Specified by:
      getSuggestions in interface org.exoplatform.social.core.storage.api.RelationshipStorage
      Throws:
      org.exoplatform.social.core.storage.RelationshipStorageException
    • getConnectionsInCommonCount

      public int getConnectionsInCommonCount(org.exoplatform.social.core.identity.model.Identity identity1, org.exoplatform.social.core.identity.model.Identity identity2)
      Specified by:
      getConnectionsInCommonCount in interface org.exoplatform.social.core.storage.api.RelationshipStorage