org.exoplatform.social.client.api.common
Interface RealtimeListAccess<E>

All Superinterfaces:
ListAccess<E>
All Known Implementing Classes:
ActivitiesRealtimeListAccessV1Alpha1, ActivitiesRealtimeListAccessV1Alpha2, ActivitiesRealtimeListAccessV1Alpha3

public interface RealtimeListAccess<E>
extends ListAccess<E>

The extension of ListAccess for accessing list item with real-time support.

Since:
May 19, 2011
Author:
hoatle (hoatlevan at gmail dot com)

Method Summary
 int getNumberOfNewer(E baseElement)
          Gets the number of newer elements based on the provided element.
 int getNumberOfOlder(E baseElement)
          Gets the number of older elements based on the provided element.
 boolean hasNewer(E baseElement)
          Checks if there is newer elements than the provided element.
 boolean hasOlder(E baseElement)
          Checks if there is older elements than the provided element.
 E[] loadNewer(E baseElement, int limit)
          Loads newer elements based on the provided element.
 List<E> loadNewerAsList(E baseElement, int limit)
          Loads newer elements based on the provided element.
 E[] loadOlder(E baseElement, int limit)
          Loads older elements based on the provided based element.
 List<E> loadOlderAsList(E baseElement, int limit)
          Loads older elements based on the provided based element.
 
Methods inherited from interface org.exoplatform.social.client.api.common.ListAccess
getSize, load, loadAsList
 

Method Detail

hasNewer

boolean hasNewer(E baseElement)
                 throws SocialClientLibException
Checks if there is newer elements than the provided element.

Parameters:
baseElement - the based element
Returns:
true if there is any newer element, otherwise, false
Throws:
SocialClientLibException

getNumberOfNewer

int getNumberOfNewer(E baseElement)
Gets the number of newer elements based on the provided element.

Parameters:
baseElement - the provided based element
Returns:
number of newer elements if any

loadNewer

E[] loadNewer(E baseElement,
              int limit)
              throws SocialClientLibException
Loads newer elements based on the provided element.

Parameters:
baseElement - the based element
limit - number of newer elements to load
Returns:
an array of newer elements
Throws:
SocialClientLibException

loadNewerAsList

List<E> loadNewerAsList(E baseElement,
                        int limit)
                        throws SocialClientLibException
Loads newer elements based on the provided element.

Parameters:
baseElement - the based element
limit - number of newer elements to load
Returns:
a list of newer elements
Throws:
SocialClientLibException

hasOlder

boolean hasOlder(E baseElement)
                 throws SocialClientLibException
Checks if there is older elements than the provided element.

Parameters:
baseElement - the based element
Returns:
true if there is any older element, otherwise, false
Throws:
SocialClientLibException

getNumberOfOlder

int getNumberOfOlder(E baseElement)
Gets the number of older elements based on the provided element.

Parameters:
baseElement - the provided element
Returns:
number of older elements if any

loadOlder

E[] loadOlder(E baseElement,
              int limit)
              throws SocialClientLibException
Loads older elements based on the provided based element.

Parameters:
baseElement - the based element
limit - number of older elements to load
Returns:
an array of older elements
Throws:
SocialClientLibException

loadOlderAsList

List<E> loadOlderAsList(E baseElement,
                        int limit)
                        throws SocialClientLibException
Loads older elements based on the provided based element.

Parameters:
baseElement - the based element
limit - number of older elements to load
Returns:
a list of older elements
Throws:
SocialClientLibException


Copyright © 2011-2012 eXo Platform. All Rights Reserved.