|
EclipseLink 2.5.0, build 'v20130226-e0971b1' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommonAbstractQuery
The CommonAbstractQuery
interface defines functionality that is
common to both top-level queries and subqueries as well as to update and
delete criteria operations.
It is not intended to be used directly in query construction.
All queries must have: a set of root entities (which may in turn own joins).
All queries may have: a conjunction of restrictions.
Note that criteria queries and criteria update and delete operations are typed differently. Criteria queries are typed according to the query result type. Update and delete operations are typed according to the target of the update or delete.
Method Summary | ||
---|---|---|
|
from(java.lang.Class<X> entityClass)
Create and add a query root corresponding to the given entity. |
|
|
from(EntityType<X> entity)
Create and add a query root corresponding to the given entity, |
|
Predicate |
getRestriction()
Return the predicate that corresponds to the where clause restriction(s), or null if no restrictions have been specified. |
|
|
subquery(java.lang.Class<U> type)
Create a subquery of the query. |
|
CommonAbstractQuery |
where(Expression<java.lang.Boolean> restriction)
Modify the query to restrict the query results according to the specified boolean expression. |
|
CommonAbstractQuery |
where(Predicate... restrictions)
Modify the query to restrict the query results according to the conjunction of the specified restriction predicates. |
Method Detail |
---|
<X> Root<X> from(java.lang.Class<X> entityClass)
entityClass
- the entity class
<X> Root<X> from(EntityType<X> entity)
entity
- metamodel entity representing the entity
of type X
CommonAbstractQuery where(Expression<java.lang.Boolean> restriction)
restriction
- a simple or compound boolean expression
CommonAbstractQuery where(Predicate... restrictions)
restrictions
- zero or more restriction predicates
<U> Subquery<U> subquery(java.lang.Class<U> type)
type
- the subquery result type
Predicate getRestriction()
|
EclipseLink 2.5.0, build 'v20130226-e0971b1' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |