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

All Superinterfaces:
ListAccess<E>
All Known Implementing Classes:
ActivitiesRealtimeListAccess

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)
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

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)
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

loadNewerAsList

List<E> loadNewerAsList(E baseElement,
                        int limit)
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

hasOlder

boolean hasOlder(E baseElement)
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

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)
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

loadOlderAsList

List<E> loadOlderAsList(E baseElement,
                        int limit)
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


Copyright © 2011 eXo Platform. All Rights Reserved.