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

All Known Subinterfaces:
RealtimeListAccess<E>
All Known Implementing Classes:
ActivitiesRealtimeListAccess

public interface ListAccess<E>

The List Access for accessing list.

This is useful for lazy fetch data.

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

Method Summary
 int getSize()
          Returns the list size.
 E[] load(int index, int limit)
          Retrieves an array of objects from the list access.
 List<E> loadAsList(int index, int limit)
          Retrieves a list of objects from the list access.
 

Method Detail

load

E[] load(int index,
         int limit)

Retrieves an array of objects from the list access.

The index value and the lenght value cannot be negative, and the sum of the index and the length cannot be greater than the list size. Those values are considered as non correct.

Parameters:
index - the index
limit - the limit
Returns:
the array

loadAsList

List<E> loadAsList(int index,
                   int limit)
Retrieves a list of objects from the list access.

Parameters:
index -
limit -
Returns:
a list

getSize

int getSize()
Returns the list size.

Returns:
the size


Copyright © 2011 eXo Platform. All Rights Reserved.