org.kuali.rice.core.jpa.criteria
Class Criteria
java.lang.Object
org.kuali.rice.core.jpa.criteria.Criteria
- Direct Known Subclasses:
- Criteria.AndCriteria, Criteria.OrCriteria
public class Criteria
- extends Object
A criteria builder for JPQL Query objects.
TODO: Rewrite this class with a better criteria building algorithm.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
Method Summary |
void |
and(Criteria and)
|
void |
between(String attribute,
Object value1,
Object value2)
|
private String |
buildWhere()
|
void |
distinct(boolean distinct)
|
void |
eq(String attribute,
Object value)
|
private String |
fix(String queryString)
|
private String |
fixAttr(String string)
This method ... |
String |
getAlias()
|
Integer |
getSearchLimit()
|
void |
gt(String attribute,
Object value)
|
void |
gte(String attribute,
Object value)
|
void |
in(String match,
Criteria subQuery,
String attribute)
This method ... |
void |
in(String attribute,
List values)
|
void |
isNull(String attribute)
|
void |
like(String attribute,
Object value)
|
void |
lt(String attribute,
Object value)
|
void |
lte(String attribute,
Object value)
|
void |
ne(String attribute,
Object value)
|
void |
notBetween(String attribute,
Object value1,
Object value2)
This method ... |
void |
notIn(String attribute,
List values)
|
void |
notLike(String attribute,
Object value)
|
void |
notNull(String attribute)
|
void |
or(Criteria or)
|
void |
orderBy(String attribute,
boolean sortAscending)
|
(package private) void |
prepareParameters(javax.persistence.Query query)
|
(package private) void |
prepareParameters(javax.persistence.Query query,
List tokens,
Map<String,Object> params)
|
void |
rawJpql(String jpql)
|
void |
setSearchLimit(Integer searchLimit)
|
private String |
stripFunctions(String attribute)
|
String |
toCountQuery()
|
String |
toQuery(QueryByCriteria.QueryByCriteriaType type)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
searchLimit
private Integer searchLimit
entityName
private String entityName
alias
private String alias
bindParamCount
private int bindParamCount
distinct
private boolean distinct
tokens
protected List tokens
orderByTokens
private List orderByTokens
params
protected Map<String,Object> params
Criteria
public Criteria(String entityName)
Criteria
public Criteria(String entityName,
String alias)
between
public void between(String attribute,
Object value1,
Object value2)
fixAttr
private String fixAttr(String string)
- This method ...
- Parameters:
string
-
- Returns:
eq
public void eq(String attribute,
Object value)
gt
public void gt(String attribute,
Object value)
gte
public void gte(String attribute,
Object value)
like
public void like(String attribute,
Object value)
notLike
public void notLike(String attribute,
Object value)
lt
public void lt(String attribute,
Object value)
lte
public void lte(String attribute,
Object value)
ne
public void ne(String attribute,
Object value)
isNull
public void isNull(String attribute)
rawJpql
public void rawJpql(String jpql)
in
public void in(String attribute,
List values)
notIn
public void notIn(String attribute,
List values)
orderBy
public void orderBy(String attribute,
boolean sortAscending)
and
public void and(Criteria and)
or
public void or(Criteria or)
toQuery
public String toQuery(QueryByCriteria.QueryByCriteriaType type)
toCountQuery
public String toCountQuery()
fix
private String fix(String queryString)
buildWhere
private String buildWhere()
prepareParameters
void prepareParameters(javax.persistence.Query query)
prepareParameters
void prepareParameters(javax.persistence.Query query,
List tokens,
Map<String,Object> params)
getSearchLimit
public Integer getSearchLimit()
setSearchLimit
public void setSearchLimit(Integer searchLimit)
notNull
public void notNull(String attribute)
distinct
public void distinct(boolean distinct)
notBetween
public void notBetween(String attribute,
Object value1,
Object value2)
- This method ...
- Parameters:
string
- timestamp
- timestamp2
-
in
public void in(String match,
Criteria subQuery,
String attribute)
- This method ...
- Parameters:
string
- responsibilitySubQuery
-
stripFunctions
private String stripFunctions(String attribute)
getAlias
public String getAlias()
Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.