org.loom.paged
Class PagedListDataImpl<T>

java.lang.Object
  extended by org.loom.paged.AbstractPagedContainer
      extended by org.loom.paged.PagedListDataImpl<T>
All Implemented Interfaces:
java.lang.Cloneable, PagedContainer, PagedListData<T>

public class PagedListDataImpl<T>
extends AbstractPagedContainer
implements PagedListData<T>, java.lang.Cloneable

The data of a paged list


Field Summary
static PagedListData<?> EMPTY_LIST
          an empty list of Object
 
Fields inherited from class org.loom.paged.AbstractPagedContainer
id
 
Fields inherited from interface org.loom.paged.PagedContainer
DEFAULT_PAGE_SIZE
 
Constructor Summary
PagedListDataImpl()
           
 
Method Summary
 PagedListDataImpl<T> clone()
           
 java.util.List<T> getData()
           
 int getNextPageRecordIndex()
           
 int getTotalPages()
           
 int getTotalRecords()
           
 boolean isEmpty()
           
 void setData(java.util.List<T> data)
           
 PagedListDataImpl<T> setId(java.lang.String id)
           
 void setTotalRecords(java.lang.Integer pagedListSize)
           
 
Methods inherited from class org.loom.paged.AbstractPagedContainer
getId, getPageIndex, getPageSize, getRecordIndex, getSortOrder, getSortProperty, setPageIndex, setPageSize, setSortOrder, setSortProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.loom.paged.PagedContainer
getId, getPageIndex, getPageSize, getRecordIndex, getSortOrder, getSortProperty
 

Field Detail

EMPTY_LIST

public static final PagedListData<?> EMPTY_LIST
an empty list of Object

Constructor Detail

PagedListDataImpl

public PagedListDataImpl()
Method Detail

clone

public PagedListDataImpl<T> clone()
Overrides:
clone in class java.lang.Object

setTotalRecords

public void setTotalRecords(java.lang.Integer pagedListSize)

getNextPageRecordIndex

public int getNextPageRecordIndex()
Specified by:
getNextPageRecordIndex in interface PagedListData<T>
Returns:
the zero-based index of the first record on the next page.

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface PagedListData<T>
Returns:
true if the list of returned data is empty

getData

public java.util.List<T> getData()
Specified by:
getData in interface PagedListData<T>
Returns:
the data included in this page

setData

public void setData(java.util.List<T> data)

getTotalRecords

public int getTotalRecords()
Specified by:
getTotalRecords in interface PagedListData<T>
Returns:
the total number of records in this query, all pages included

getTotalPages

public int getTotalPages()
Specified by:
getTotalPages in interface PagedListData<T>
Returns:
the total number of pages in this query

setId

public PagedListDataImpl<T> setId(java.lang.String id)
Overrides:
setId in class AbstractPagedContainer