org.loom.paged
Class PagedListCriteriaImpl
java.lang.Object
org.loom.paged.AbstractPagedContainer
org.loom.paged.PagedListCriteriaImpl
- All Implemented Interfaces:
- PagedContainer, PagedListCriteria
public class PagedListCriteriaImpl
- extends AbstractPagedContainer
- implements PagedListCriteria
Criteria of a requested page
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PagedListCriteriaImpl
public PagedListCriteriaImpl()
addParameter
public PagedListCriteriaImpl addParameter(java.lang.Object paramValue)
- Add a parameter to the query
- Specified by:
addParameter
in interface PagedListCriteria
- Parameters:
paramValue
- the value of the parameter
getOrderedQuery
public java.lang.String getOrderedQuery()
- Specified by:
getOrderedQuery
in interface PagedListCriteria
- Returns:
- the user-specified query, after adding the ORDER BY clause specified by sortProperty and sortOrder
setQuery
public PagedListCriteriaImpl 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()
- Specified by:
setQuery
in interface PagedListCriteria
- Parameters:
query
- the JPA query to executeparams
- the parameters to add to the query, in the expected order
addOrderBy
public 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
- Specified by:
addOrderBy
in interface PagedListCriteria
calculateTotal
public boolean calculateTotal()
- Specified by:
calculateTotal
in interface PagedListCriteria
- Returns:
- true if the total should be calculated
isCalculateTotal
public boolean isCalculateTotal()
- Specified by:
isCalculateTotal
in interface PagedListCriteria
setCalculateTotal
public void setCalculateTotal(boolean calculateTotal)
getParameters
public java.util.List<java.lang.Object> getParameters()
- Specified by:
getParameters
in interface PagedListCriteria
setId
public PagedListCriteriaImpl setId(java.lang.String id)
- Overrides:
setId
in class AbstractPagedContainer