public class Criteria<T> extends Object implements Serializable
Supported criteria are:
and
expression. The default value is no filters.PagedResult
,
QueryRuntimeAPI
,
SortableField
,
FilterField
,
Serialized FormConstructor and Description |
---|
Criteria() |
Modifier and Type | Method and Description |
---|---|
Criteria<T> |
addRestriction(Restriction<T> restriction)
Adds a restriction to the criteria
|
int |
getFirstResult() |
int |
getMaxResults() |
Order<T> |
getOrder() |
List<Restriction<T>> |
getRestrictions() |
Criteria<T> |
setAscendingOrder(SortableField<T> field) |
Criteria<T> |
setDescendingOrder(SortableField<T> field) |
Criteria<T> |
setFirstResult(int firstResult) |
Criteria<T> |
setMaxResults(int maxResults) |
Criteria<T> |
setOrder(Order<T> order) |
public final int getMaxResults()
public final Criteria<T> setMaxResults(int maxResults)
maxResults
- the maxResults to set, a negative value is treated as
meaning no limit (this is the default behavior)public final int getFirstResult()
public final Criteria<T> setFirstResult(int firstResult)
firstResult
- the firstResult to set, 0 is the default valuepublic final Criteria<T> setOrder(Order<T> order)
order
- the order to setpublic final Criteria<T> setAscendingOrder(SortableField<T> field)
field
- a SortableField
on which a ascending sort should be usedpublic final Criteria<T> setDescendingOrder(SortableField<T> field)
field
- a SortableField
on which a ascending sort should be usedpublic final Criteria<T> addRestriction(Restriction<T> restriction)
restriction
- The Restriction
to addpublic final List<Restriction<T>> getRestrictions()
Copyright © 2011 OW2 Consortium. All Rights Reserved.