public static final class QueryByCriteria.Builder extends Object implements ModelBuilder, Serializable
Modifier and Type | Method and Description |
---|---|
static QueryByCriteria.Builder |
andAttributes(Map<String,?> attributes)
Static helper for generating a QueryByCriteria from a Map
|
static QueryByCriteria.Builder |
andAttributes(Object object,
Collection<String> attributes)
Static helper for generating a QueryByCriteria that selects the attribute values
that exist on the example object.
|
QueryByCriteria |
build()
Returns an instance of the object being built by this builder based
on the current state of the builder.
|
static QueryByCriteria.Builder |
create() |
static QueryByCriteria.Builder |
create(QueryByCriteria queryByCriteria) |
static QueryByCriteria.Builder |
forAttribute(String name,
Object value)
Static helper for generating a QueryByCriteria from a single attribute key/value pair
|
static QueryByCriteria |
fromPredicates(Collection<Predicate> predicates)
convenience method to create an immutable criteria from one or more predicates.
|
static QueryByCriteria |
fromPredicates(Predicate... predicates)
convenience method to create an immutable criteria from one or more predicates.
|
CountFlag |
getCountFlag() |
Integer |
getMaxResults() |
List<OrderByField> |
getOrderByFields() |
Predicate[] |
getPredicates()
will return an array of the predicates.
|
Integer |
getStartAtIndex() |
static QueryByCriteria.Builder |
orAttributes(Map<String,?> attributes)
Static helper for generating a QueryByCriteria from a Map
|
static QueryByCriteria.Builder |
orAttributes(Object object,
Collection<String> attributes)
Static helper for generating a QueryByCriteria that selects the attribute values
that exist on the example object.
|
QueryByCriteria.Builder |
setCountFlag(CountFlag countFlag) |
void |
setMaxResults(Integer maxResults) |
QueryByCriteria.Builder |
setOrderByAscending(String... orderByFields) |
QueryByCriteria.Builder |
setOrderByFields(List<OrderByField> orderByFields) |
QueryByCriteria.Builder |
setOrderByFields(OrderByField... orderByFields) |
QueryByCriteria.Builder |
setPredicates(Predicate... predicates)
Sets the predicates.
|
void |
setStartAtIndex(Integer startAtIndex) |
public static QueryByCriteria.Builder create()
public static QueryByCriteria.Builder create(QueryByCriteria queryByCriteria)
public Integer getStartAtIndex()
public void setStartAtIndex(Integer startAtIndex)
public Integer getMaxResults()
public void setMaxResults(Integer maxResults)
public CountFlag getCountFlag()
public QueryByCriteria.Builder setCountFlag(CountFlag countFlag)
public List<OrderByField> getOrderByFields()
public QueryByCriteria.Builder setOrderByFields(List<OrderByField> orderByFields)
public QueryByCriteria.Builder setOrderByFields(OrderByField... orderByFields)
public QueryByCriteria.Builder setOrderByAscending(String... orderByFields)
public Predicate[] getPredicates()
public QueryByCriteria.Builder setPredicates(Predicate... predicates)
predicates
- the predicates to set.public QueryByCriteria build()
ModelBuilder
build
in interface ModelBuilder
public static QueryByCriteria fromPredicates(Predicate... predicates)
public static QueryByCriteria fromPredicates(Collection<Predicate> predicates)
public static QueryByCriteria.Builder orAttributes(Map<String,?> attributes)
attributes
- key/value map of attributes to OR together in the criteriapublic static QueryByCriteria.Builder andAttributes(Map<String,?> attributes)
attributes
- key/value map of attributes to AND together in the criteriapublic static QueryByCriteria.Builder forAttribute(String name, Object value)
name
- attribute namevalue
- attribute valuepublic static QueryByCriteria.Builder orAttributes(Object object, Collection<String> attributes)
object
- the example objectattributes
- list of attributes to select from the example objectpublic static QueryByCriteria.Builder andAttributes(Object object, Collection<String> attributes)
object
- the example objectattributes
- list of attributes to select from the example objectCopyright © 2005–2016 The Kuali Foundation. All rights reserved.