org.loom.paged
Interface PagedListCriteria

All Superinterfaces:
PagedContainer
All Known Implementing Classes:
PagedListCriteriaImpl

public interface PagedListCriteria
extends PagedContainer

Criteria of a requested page


Field Summary
 
Fields inherited from interface org.loom.paged.PagedContainer
DEFAULT_PAGE_SIZE
 
Method Summary
 java.lang.String addOrderBy(java.lang.String query)
          Adds the order by parameter to a query.
 PagedListCriteria addParameter(java.lang.Object paramValue)
          Add a parameter to the query
 boolean calculateTotal()
           
 java.lang.String getOrderedQuery()
           
 java.util.List<java.lang.Object> getParameters()
           
 boolean isCalculateTotal()
          Deprecated. use calculateTotal() instead
 void setPageSize(int pageSize)
          Set the number or results per page to return
 PagedListCriteria setQuery(java.lang.String query, java.lang.Object... params)
          Set the query to be executed, and any additional parameter as well.
 
Methods inherited from interface org.loom.paged.PagedContainer
getId, getPageIndex, getPageSize, getRecordIndex, getSortOrder, getSortProperty
 

Method Detail

addParameter

PagedListCriteria addParameter(java.lang.Object paramValue)
Add a parameter to the query

Parameters:
paramValue - the value of the parameter

getOrderedQuery

java.lang.String getOrderedQuery()
Returns:
the user-specified query, after adding the ORDER BY clause specified by sortProperty and sortOrder

setQuery

PagedListCriteria setQuery(java.lang.String query,
                           java.lang.Object... params)
Set the query to be executed, and any additional parameter as well. The params can also be set latter by invoking addParameter()

Parameters:
query - the JPA query to execute
params - the parameters to add to the query, in the expected order

addOrderBy

java.lang.String addOrderBy(java.lang.String query)
Adds the order by parameter to a query. If there is already an order by, prepends the current order to the one included in the query


getParameters

java.util.List<java.lang.Object> getParameters()

calculateTotal

boolean calculateTotal()
Returns:
true if the total should be calculated

isCalculateTotal

boolean isCalculateTotal()
Deprecated. use calculateTotal() instead


setPageSize

void setPageSize(int pageSize)
Set the number or results per page to return