org.shept.org.springframework.beans.support
Interface PageableList<E>

All Known Implementing Classes:
ChoiceListHolder, FilteredListHolder, PagedListHolder

public interface PageableList<E>


Field Summary
static int DEFAULT_NEW_MODEL_SIZE
           
static int DEFAULT_PAGE_SIZE
           
static String LIST_BINDING_NAME
           
 
Method Summary
 int getFirstElementOnPage()
          Return the element index of the first element on the current page.
 int getFirstLinkedPage()
          Return the first page to which create a link around the current page.
 int getLastElementOnPage()
          Return the element index of the last element on the current page.
 int getLastLinkedPage()
          Return the last page to which create a link around the current page.
 String getListBindingName()
          return the binding name of the list
 int getMaxLinkedPages()
          Return the maximum number of page links to a few pages around the current one.
 int getNewModelSize()
          get the new model template (for creating new objects)
 Object getNewModelTemplate()
          get the new model template (for creating new objects)
 int getNrOfElements()
          Return the total number of elements in the source list.
 int getPage()
          Return the current page number.
 int getPageCount()
          Return the number of pages for the current source list.
 List<E> getPageList()
          Return a sub-list representing the current page.
 int getPageSize()
          Return the current page size.
 Date getRefreshDate()
          Return the last time the list has been fetched from the source provider.
 org.springframework.beans.support.SortDefinition getSort()
          Return the sort definition for this holder.
 org.springframework.beans.support.SortDefinition getSortUsed()
           
 List<E> getSource()
          Return the source list for this holder.
 boolean isEol()
          Return if the underlying resultset is completely read (always true if the resultset is not based on cursors)
 boolean isFirstPage()
          Return if the current page is the first one.
 boolean isLastPage()
          Return if the current page is the last one.
 boolean isSortNeeded()
          Added to the original implementation so we can check for changes and refresh the view conditionally..
 boolean isVisible(Integer idx)
          Return if the given element index is within the range of the currently visible Page
 void nextPage()
          Switch to next page.
 void previousPage()
          Switch to previous page.
 void resort()
          Resort the list if necessary, i.e.
 void setNewModelSize(int newModelSize)
          Set the new model template (for creating new objects)
 void setNewModelTemplate(Object object)
          Set the new model template (for creating new objects)
 void setPage(int page)
          Set the current page number.
 void setPageSize(int pageSize)
          Set the current page size.
 void setSort(org.springframework.beans.support.SortDefinition sort)
          Set the sort definition for this holder.
 void setSource(List<E> source)
          Set the source list for this holder.
 

Field Detail

LIST_BINDING_NAME

static final String LIST_BINDING_NAME
See Also:
Constant Field Values

DEFAULT_PAGE_SIZE

static final int DEFAULT_PAGE_SIZE
See Also:
Constant Field Values

DEFAULT_NEW_MODEL_SIZE

static final int DEFAULT_NEW_MODEL_SIZE
See Also:
Constant Field Values
Method Detail

getFirstElementOnPage

int getFirstElementOnPage()
Return the element index of the first element on the current page. Element numbering starts with 0.


getFirstLinkedPage

int getFirstLinkedPage()
Return the first page to which create a link around the current page.


getLastElementOnPage

int getLastElementOnPage()
Return the element index of the last element on the current page. Element numbering starts with 0.


getLastLinkedPage

int getLastLinkedPage()
Return the last page to which create a link around the current page.


getMaxLinkedPages

int getMaxLinkedPages()
Return the maximum number of page links to a few pages around the current one.


getNrOfElements

int getNrOfElements()
Return the total number of elements in the source list.


getPage

int getPage()
Return the current page number. Page numbering starts with 0.


getPageCount

int getPageCount()
Return the number of pages for the current source list.


getPageList

List<E> getPageList()
Return a sub-list representing the current page.


getPageSize

int getPageSize()
Return the current page size.


getRefreshDate

Date getRefreshDate()
Return the last time the list has been fetched from the source provider.


getSort

org.springframework.beans.support.SortDefinition getSort()
Return the sort definition for this holder.


getSortUsed

org.springframework.beans.support.SortDefinition getSortUsed()

getSource

List<E> getSource()
Return the source list for this holder.


isEol

boolean isEol()
Return if the underlying resultset is completely read (always true if the resultset is not based on cursors)


isFirstPage

boolean isFirstPage()
Return if the current page is the first one.


isLastPage

boolean isLastPage()
Return if the current page is the last one.


isVisible

boolean isVisible(Integer idx)
Return if the given element index is within the range of the currently visible Page


nextPage

void nextPage()
Switch to next page. Will stay on last page if already on last page.


isSortNeeded

boolean isSortNeeded()
Added to the original implementation so we can check for changes and refresh the view conditionally..


previousPage

void previousPage()
Switch to previous page. Will stay on first page if already on first page.


resort

void resort()
Resort the list if necessary, i.e. if the current sort instance isn't equal to the backed-up sortUsed instance.

Calls doSort to trigger actual sorting.

See Also:
#doSort

setPage

void setPage(int page)
Set the current page number. Page numbering starts with 0.


setPageSize

void setPageSize(int pageSize)
Set the current page size. Resets the current page number if changed.

Default value is 10.


setSort

void setSort(org.springframework.beans.support.SortDefinition sort)
Set the sort definition for this holder. Typically an instance of MutableSortDefinition.

See Also:
MutableSortDefinition

setSource

void setSource(List<E> source)
Set the source list for this holder.


getListBindingName

String getListBindingName()
return the binding name of the list


getNewModelTemplate

Object getNewModelTemplate()
get the new model template (for creating new objects)


setNewModelTemplate

void setNewModelTemplate(Object object)
Set the new model template (for creating new objects)


getNewModelSize

int getNewModelSize()
get the new model template (for creating new objects)


setNewModelSize

void setNewModelSize(int newModelSize)
Set the new model template (for creating new objects)



Copyright © 2011. All Rights Reserved.