Class ConnectionListAccess

java.lang.Object
org.exoplatform.social.core.identity.ConnectionListAccess
All Implemented Interfaces:
org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>

public class ConnectionListAccess extends Object implements org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
ListAccess is used in loading connection with the input identity. With this list we can manage the size of returned list by offset and limit.
  • Constructor Details

    • ConnectionListAccess

      public ConnectionListAccess(org.exoplatform.social.core.storage.api.RelationshipStorage relationshipStorage, org.exoplatform.social.core.identity.model.Identity identity)
      The constructor.
      Parameters:
      relationshipStorage - Storage object of Relationship.
      identity - Identity to get connection.
    • ConnectionListAccess

      public ConnectionListAccess(org.exoplatform.social.core.storage.api.RelationshipStorage relationshipStorage, org.exoplatform.social.core.identity.model.Identity identity, ConnectionListAccess.Type type)
      The constructor.
      Parameters:
      relationshipStorage -
      identity -
      type -
      Since:
      1.2.0-Beta3
  • Method Details

    • load

      public org.exoplatform.social.core.identity.model.Identity[] load(int offset, int limit) throws Exception, IllegalArgumentException
      Specified by:
      load in interface org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
      Throws:
      Exception
      IllegalArgumentException
    • getSize

      public int getSize() throws Exception
      Specified by:
      getSize in interface org.exoplatform.commons.utils.ListAccess<org.exoplatform.social.core.identity.model.Identity>
      Throws:
      Exception
    • getType

      public ConnectionListAccess.Type getType()
      Gets the type of connection list access.
      Returns:
      Since:
      1.2.0-Beta3
    • setType

      public void setType(ConnectionListAccess.Type type)
      Sets the type of connection list access.
      Parameters:
      type -
      Since:
      1.2.0-Beta3