|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface QueryDefinition
Interface for construction of query definitions
Method Summary | |
---|---|
DomainObject |
addRoot(Class cls)
Add a query root corresponding to the given entity, forming a cartesian product with any existing roots. |
DomainObject |
addSubqueryRoot(PathExpression path)
Add a root derived from a domain object of the containing query definition to a query definition used as a subquery. |
Subquery |
all()
Use the query definition object in a subquery in an all expression. |
Subquery |
any()
Use the query definition object in a subquery in an any expression. |
Expression |
coalesce(Calendar... exp)
coalesce This is equivalent to a case expression that returns null if all its arguments evaluate to null, and the value of its first non-null argument otherwise. |
Expression |
coalesce(Date... exp)
coalesce This is equivalent to a case expression that returns null if all its arguments evaluate to null, and the value of its first non-null argument otherwise. |
Expression |
coalesce(Expression... exp)
coalesce This is equivalent to a case expression that returns null if all its arguments evaluate to null, and the value of its first non-null argument otherwise. |
Expression |
coalesce(String... exp)
coalesce This is equivalent to a case expression that returns null if all its arguments evaluate to null, and the value of its first non-null argument otherwise. |
Expression |
currentDate()
Create an Expression corresponding to the current date on the database server at the time of query execution. |
Expression |
currentTime()
Create an Expression corresponding to the current time on the database server at the time of query execution. |
Expression |
currentTimestamp()
Create an Expression corresponding to the current timestamp on the database server at the time of query execution. |
Predicate |
exists()
Use the query definition instance as a subquery in an exists predicate. |
CaseExpression |
generalCase()
Create an empty general case expression. |
QueryDefinition |
groupBy(List<PathExpression> pathExprList)
Specify the items that are used to form groups over the query results. |
QueryDefinition |
groupBy(PathExpression... pathExprs)
Specify the items that are used to form groups over the query results. |
QueryDefinition |
having(Predicate predicate)
Specify the restrictions over the groups of a query. |
Expression |
literal(boolean b)
Create an Expression corresponding to a boolean value. |
Expression |
literal(Calendar c)
Create an Expression corresponding to a Calendar value. |
Expression |
literal(char c)
Create an Expression corresponding to a character value. |
Expression |
literal(Class cls)
Create an Expression corresponding to an entity class. |
Expression |
literal(Date d)
Create an Expression corresponding to a Date value. |
Expression |
literal(Enum<?> e)
Create an Expression corresponding to an enum. |
Expression |
literal(Number n)
Create an Expression corresponding to a numeric value. |
Expression |
literal(String s)
Create an Expression corresponding to a String value. |
SelectItem |
newInstance(Class cls,
SelectItem... args)
Specify that a constructor for the given class is to be applied to the corresponding query results after the query is executed. |
Expression |
nullif(Calendar arg1,
Calendar arg2)
nullif This is equivalent to a case expression that tests whether its arguments are equal, returning null if they are and the value of the first expression if they are not. |
Expression |
nullif(Class arg1,
Class arg2)
nullif This is equivalent to a case expression that tests whether its arguments are equal, returning null if they are and the value of the first expression if they are not. |
Expression |
nullif(Date arg1,
Date arg2)
nullif This is equivalent to a case expression that tests whether its arguments are equal, returning null if they are and the value of the first expression if they are not. |
Expression |
nullif(Enum<?> arg1,
Enum<?> arg2)
nullif This is equivalent to a case expression that tests whether its arguments are equal, returning null if they are and the value of the first expression if they are not. |
Expression |
nullif(Expression exp1,
Expression exp2)
nullif This is equivalent to a case expression that tests whether its arguments are equal, returning null if they are and the value of the first expression if they are not. |
Expression |
nullif(Number arg1,
Number arg2)
nullif This is equivalent to a case expression that tests whether its arguments are equal, returning null if they are and the value of the first expression if they are not. |
Expression |
nullif(String arg1,
String arg2)
nullif This is equivalent to a case expression that tests whether its arguments are equal, returning null if they are and the value of the first expression if they are not. |
Expression |
nullLiteral()
Create an Expression corresponding to a null value. |
QueryDefinition |
orderBy(List<OrderByItem> orderByItemList)
Specify the items of the select list that are used in ordering the query results. |
QueryDefinition |
orderBy(OrderByItem... orderByItems)
Specify the items of the select list that are used in ordering the query results. |
Expression |
param(String name)
Specify use of a parameter of the given name. |
Predicate |
predicate(boolean b)
Create a predicate value from the given boolean. |
QueryDefinition |
select(List<SelectItem> selectItemList)
Specify the objects / values to be returned. |
QueryDefinition |
select(SelectItem... selectItems)
Specify the objects / values to be returned. |
QueryDefinition |
selectDistinct(List<SelectItem> selectItemList)
Specify the objects / values to be returned. |
QueryDefinition |
selectDistinct(SelectItem... selectItems)
Specify the objects / values to be returned. |
CaseExpression |
simpleCase(Calendar caseOperand)
Create a simple case expression with the given case operand. |
CaseExpression |
simpleCase(Class caseOperand)
Create a simple case expression with the given case operand. |
CaseExpression |
simpleCase(Date caseOperand)
Create a simple case expression with the given case operand. |
CaseExpression |
simpleCase(Enum<?> caseOperand)
Create a simple case expression with the given case operand. |
CaseExpression |
simpleCase(Expression caseOperand)
Create a simple case expression with the given case operand. |
CaseExpression |
simpleCase(Number caseOperand)
Create a simple case expression with the given case operand. |
CaseExpression |
simpleCase(String caseOperand)
Create a simple case expression with the given case operand. |
Subquery |
some()
Use the query definition object in a subquery in a some expression. |
QueryDefinition |
where(Predicate predicate)
Modifies the query definition to restrict the result of the query according to the specified predicate. |
Methods inherited from interface org.apache.openjpa.persistence.query.PredicateOperand |
---|
between, between, between, between, between, between, between, between, between, between, between, between, between, equal, equal, equal, equal, equal, equal, equal, equal, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, like, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual |
Method Detail |
---|
DomainObject addRoot(Class cls)
cls
- -
an entity class
DomainObject addSubqueryRoot(PathExpression path)
path
- -
path expression corresponding to the domain object used to
derive the subquery root.
QueryDefinition select(SelectItem... selectItems)
selectItems
- -
one or more SelectItem instances
QueryDefinition select(List<SelectItem> selectItemList)
selectItemList
- -
a list containing one or more SelectItem instances
QueryDefinition selectDistinct(SelectItem... selectItems)
selectItems
- -
one or more SelectItem instances
QueryDefinition selectDistinct(List<SelectItem> selectItemList)
selectItemList
- -
a list containing one or more SelectItem instances
QueryDefinition where(Predicate predicate)
predicate
- -
a simple or compound conditional predicate
QueryDefinition orderBy(OrderByItem... orderByItems)
orderByItems
- -
one or more OrderByItem instances
QueryDefinition orderBy(List<OrderByItem> orderByItemList)
orderByItemList
- -
a list containing one or more OrderByItem
instances
QueryDefinition groupBy(PathExpression... pathExprs)
pathExprs
-
QueryDefinition groupBy(List<PathExpression> pathExprList)
pathExprList
-
QueryDefinition having(Predicate predicate)
predicate
-
SelectItem newInstance(Class cls, SelectItem... args)
cls
- -
a class with the correponding constructorargs
- -
select items that correspond to result types that are valid
as arguments to the constructorPredicate exists()
Subquery all()
Subquery any()
Subquery some()
CaseExpression generalCase()
CaseExpression simpleCase(Expression caseOperand)
caseOperand
- -
expression used for testing against the when scalar
expressions
CaseExpression simpleCase(Number caseOperand)
caseOperand
- -
numeric value used for testing against the when scalar
expressions
CaseExpression simpleCase(String caseOperand)
caseOperand
- -
value used for testing against the when scalar
expressions
CaseExpression simpleCase(Date caseOperand)
caseOperand
- -
value used for testing against the when scalar
expressions
CaseExpression simpleCase(Calendar caseOperand)
caseOperand
- -
value used for testing against the when scalar
expressions
CaseExpression simpleCase(Class caseOperand)
caseOperand
- -
value used for testing against the when scalar
expressions
CaseExpression simpleCase(Enum<?> caseOperand)
caseOperand
- -
value used for testing against the when scalar
expressions
Expression coalesce(Expression... exp)
exp
- -
expressions to be used for testing against null
Expression coalesce(String... exp)
exp
- -
expressions to be used for testing against null
Expression coalesce(Date... exp)
exp
- -
expressions to be used for testing against null
Expression coalesce(Calendar... exp)
exp
- -
expressions to be used for testing against null
Expression nullif(Expression exp1, Expression exp2)
exp1
- exp2
-
Expression nullif(Number arg1, Number arg2)
arg1
- arg2
-
Expression nullif(String arg1, String arg2)
arg1
- arg2
- Criteria API Java Persistence 2.0, Public Review Draft
Criteria API Interfaces 10/31/08 158 JSR-317 Public Review
Draft Sun Microsystems, Inc.
Expression nullif(Date arg1, Date arg2)
arg1
- arg2
-
Expression nullif(Calendar arg1, Calendar arg2)
arg1
- arg2
-
Expression nullif(Class arg1, Class arg2)
arg1
- arg2
-
Expression nullif(Enum<?> arg1, Enum<?> arg2)
arg1
- arg2
-
Predicate predicate(boolean b)
b
- boolean value
Expression currentTime()
Expression currentDate()
Expression currentTimestamp()
Expression literal(String s)
s
- -
string value
Expression literal(Number n)
n
- -
numeric value
Expression literal(boolean b)
b
- -
boolean value
Expression literal(Calendar c)
c
- -
Calendar value
Expression literal(Date d)
d
- -
Date value
Expression literal(char c)
character
- value
Expression literal(Class cls)
cls
- -
entity class
Expression literal(Enum<?> e)
e
- -
enum
Expression nullLiteral()
Expression param(String name)
parameter
- name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |