org.loom.paged
Class AbstractPagedContainer

java.lang.Object
  extended by org.loom.paged.AbstractPagedContainer
All Implemented Interfaces:
PagedContainer
Direct Known Subclasses:
PagedListCriteriaImpl, PagedListDataImpl

public abstract class AbstractPagedContainer
extends java.lang.Object
implements PagedContainer

Parent of both request and response objects


Field Summary
protected  java.lang.String id
          the id of the paged container.
 
Fields inherited from interface org.loom.paged.PagedContainer
DEFAULT_PAGE_SIZE
 
Constructor Summary
AbstractPagedContainer()
           
 
Method Summary
 java.lang.String getId()
           
 int getPageIndex()
           
 int getPageSize()
           
 int getRecordIndex()
           
 SortOrder getSortOrder()
           
 java.lang.String getSortProperty()
           
 AbstractPagedContainer setId(java.lang.String id)
           
 void setPageIndex(int pageIndex)
           
 void setPageSize(int pageSize)
           
 void setSortOrder(SortOrder sortOrder)
           
 void setSortProperty(java.lang.String sortProperty)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
the id of the paged container. This value will be used to disambiguate if more than one container is used on the same page

Constructor Detail

AbstractPagedContainer

public AbstractPagedContainer()
Method Detail

getRecordIndex

public int getRecordIndex()
Specified by:
getRecordIndex in interface PagedContainer
Returns:
the zero-based index of the first record that is returned. Internally, it multiplies the page index and the page size.

setPageSize

public void setPageSize(int pageSize)

getPageIndex

public int getPageIndex()
Specified by:
getPageIndex in interface PagedContainer
Returns:
the zero-based page index

setPageIndex

public void setPageIndex(int pageIndex)

getSortOrder

public SortOrder getSortOrder()
Specified by:
getSortOrder in interface PagedContainer
Returns:
the sort order

setSortOrder

public void setSortOrder(SortOrder sortOrder)

getSortProperty

public java.lang.String getSortProperty()
Specified by:
getSortProperty in interface PagedContainer
Returns:
the sort property

setSortProperty

public void setSortProperty(java.lang.String sortProperty)

getPageSize

public int getPageSize()
Specified by:
getPageSize in interface PagedContainer
Returns:
the number of records per page

getId

public java.lang.String getId()
Specified by:
getId in interface PagedContainer
Returns:
the id of the paged container. This value will be used to disambiguate if more than one container is used on the same page

setId

public AbstractPagedContainer setId(java.lang.String id)