org.riotfamily.riot.list.support
Class ListParamsImpl

java.lang.Object
  extended by org.riotfamily.riot.list.support.ListParamsImpl
All Implemented Interfaces:
ListParams

public class ListParamsImpl
extends Object
implements ListParams

A bean style implementation of the ListModelParams interface.


Constructor Summary
ListParamsImpl()
           
ListParamsImpl(ListParams params)
           
 
Method Summary
 Object getFilter()
          Returns an object populated by the list's filter-form, or null if the list does not have a filter.
 String[] getFilteredProperties()
          Returns the names of all properties bound to the filter-form, or null if the list does not have a filter.
 int getOffset()
          Returns the offset (starting at 0) of the first object that should be displayed.
 List<Order> getOrder()
          Returns a list of Order objects that should be used to sort the list.
 int getPage()
           
 int getPageSize()
          Returns the maximum number of objects that should be displayed on a page.
 Order getPrimaryOrder()
           
 String getSearch()
          Returns the String that should be used to perform a full-text search, or null if no search should be performed.
 String[] getSearchProperties()
          Returns the name of all properties that should be included in the full-text search, or null if searching is disabled.
 boolean hasOrder()
          Returns whether sort-order was specified.
 void orderBy(String property, boolean ascending, boolean caseSensitive)
          Changes the sort order so that the list will be ordered by the given property.
 void setFilter(Object filter)
           
 void setFilteredProperties(String[] filterProperties)
           
 void setOffset(int offset)
           
 void setOrder(List<Order> order)
           
 void setOrder(Order order)
           
 void setPage(int page)
           
 void setPageSize(int pageSize)
           
 void setSearch(String search)
           
 void setSearchProperties(String[] searchProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListParamsImpl

public ListParamsImpl()

ListParamsImpl

public ListParamsImpl(ListParams params)
Method Detail

getFilter

public Object getFilter()
Description copied from interface: ListParams
Returns an object populated by the list's filter-form, or null if the list does not have a filter.

Specified by:
getFilter in interface ListParams

setFilter

public void setFilter(Object filter)

getFilteredProperties

public String[] getFilteredProperties()
Description copied from interface: ListParams
Returns the names of all properties bound to the filter-form, or null if the list does not have a filter.

Specified by:
getFilteredProperties in interface ListParams

setFilteredProperties

public void setFilteredProperties(String[] filterProperties)

getSearch

public String getSearch()
Description copied from interface: ListParams
Returns the String that should be used to perform a full-text search, or null if no search should be performed.

Specified by:
getSearch in interface ListParams

setSearch

public void setSearch(String search)

getSearchProperties

public String[] getSearchProperties()
Description copied from interface: ListParams
Returns the name of all properties that should be included in the full-text search, or null if searching is disabled.

Specified by:
getSearchProperties in interface ListParams

setSearchProperties

public void setSearchProperties(String[] searchProperties)

getOffset

public int getOffset()
Description copied from interface: ListParams
Returns the offset (starting at 0) of the first object that should be displayed.

Specified by:
getOffset in interface ListParams

setOffset

public void setOffset(int offset)

getPage

public int getPage()

setPage

public void setPage(int page)

getOrder

public List<Order> getOrder()
Description copied from interface: ListParams
Returns a list of Order objects that should be used to sort the list.

Specified by:
getOrder in interface ListParams

setOrder

public void setOrder(List<Order> order)

setOrder

public void setOrder(Order order)

hasOrder

public boolean hasOrder()
Description copied from interface: ListParams
Returns whether sort-order was specified.

Specified by:
hasOrder in interface ListParams

getPrimaryOrder

public Order getPrimaryOrder()

orderBy

public void orderBy(String property,
                    boolean ascending,
                    boolean caseSensitive)
Changes the sort order so that the list will be ordered by the given property. The previous order will be shifted to the right (from an SQL point of view) unless the list was already ordered by the given property in which case only the sort direction will be toggled.


getPageSize

public int getPageSize()
Description copied from interface: ListParams
Returns the maximum number of objects that should be displayed on a page.

Specified by:
getPageSize in interface ListParams

setPageSize

public void setPageSize(int pageSize)