Interface DomainObject
-
- All Superinterfaces:
Expression
,OrderByItem
,PathExpression
,PredicateOperand
,QueryDefinition
,SelectItem
,Subquery
- All Known Implementing Classes:
AbstractDomainObject
,EntryExpression
,FetchPath
,JoinPath
,KeyExpression
,OperatorPath
,RootPath
,ValueExpression
public interface DomainObject extends PathExpression, QueryDefinition
Domain objects define the domain over which a query operates. A domain object plays a role analogous to that of a Java Persistence query language identification variable.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SelectItem
entry()
Return a select item corresponding to the map entry of a map-valued association or element collection.Expression
index()
Return an expression that corresponds to the index. of the domain object in the referenced association or element collection.DomainObject
join(java.lang.String attribute)
Extend the query domain by joining with a class that can be navigated to or that is embedded in the class corresponding to the domain object on which the method is invoked.FetchJoinObject
joinFetch(java.lang.String attribute)
Specify that the association or element collection that is referenced by the attribute be eagerly fetched through use of an inner join.PathExpression
key()
Return a path expression corresponding to the key of a map-valued association or element collection.DomainObject
leftJoin(java.lang.String attribute)
Extend the query domain by left outer joining with a class that can be navigated to or that is embedded in the class corresponding to the domain object on which the method is invoked.FetchJoinObject
leftJoinFetch(java.lang.String attribute)
Specify that the association or element collection that is referenced by the attribute be eagerly fetched through use of a left outer join.PathExpression
value()
Return a path expression corresponding to the value of a map-valued association or element collection.-
Methods inherited from interface org.apache.openjpa.persistence.query.Expression
abs, concat, concat, dividedBy, dividedBy, in, in, in, in, in, in, isNull, length, locate, locate, locate, locate, locate, locate, lower, member, minus, minus, minus, mod, mod, plus, plus, sqrt, substring, substring, substring, substring, substring, substring, times, times, trim, trim, trim, trim, trim, trim, upper
-
Methods inherited from interface org.apache.openjpa.persistence.query.PathExpression
avg, count, get, isEmpty, max, min, size, sum, type
-
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
-
Methods inherited from interface org.apache.openjpa.persistence.query.QueryDefinition
addRoot, addSubqueryRoot, all, any, coalesce, coalesce, coalesce, coalesce, currentDate, currentTime, currentTimestamp, exists, generalCase, groupBy, groupBy, having, literal, literal, literal, literal, literal, literal, literal, literal, newInstance, nullif, nullif, nullif, nullif, nullif, nullif, nullif, nullLiteral, orderBy, orderBy, param, predicate, select, select, selectDistinct, selectDistinct, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, simpleCase, some, where
-
Methods inherited from interface org.apache.openjpa.persistence.query.SelectItem
asc, desc
-
-
-
-
Method Detail
-
join
DomainObject join(java.lang.String attribute)
Extend the query domain by joining with a class that can be navigated to or that is embedded in the class corresponding to the domain object on which the method is invoked. This method is permitted to be invoked only when defining the domain of the query. It must not be invoked within the context of the select, where, groupBy, or having operations. The domain object must correspond to a class that contains the referenced attribute. The query definition is modified to include the newly joined domain object.- Parameters:
attribute
- - name of the attribute that references the target of the join- Returns:
- the new DomainObject that is added for the target of the join
-
leftJoin
DomainObject leftJoin(java.lang.String attribute)
Extend the query domain by left outer joining with a class that can be navigated to or that is embedded in the class corresponding to the domain object on which the method is invoked. This method is permitted to be invoked only when defining the domain of the query. It must not be invoked within the context of the select, where, groupBy, or having operations. The domain object must correspond to a class that contains the referenced attribute. The query definition is modified to include the newly joined domain object.- Parameters:
attribute
- - name of the attribute that references the target of the join- Returns:
- the new DomainObject that is added for the target of the join
-
joinFetch
FetchJoinObject joinFetch(java.lang.String attribute)
Specify that the association or element collection that is referenced by the attribute be eagerly fetched through use of an inner join. The domain object must correspond to a class that contains the referenced attribute. The query is modified to include the joined domain object.- Parameters:
attribute
- - name of the attribute that references the target of the join- Returns:
- the FetchJoinObject that is added for the target of the join
-
leftJoinFetch
FetchJoinObject leftJoinFetch(java.lang.String attribute)
Specify that the association or element collection that is referenced by the attribute be eagerly fetched through use of a left outer join. The domain object must correspond to a class that contains the referenced attribute. The query is modified to include the joined domain object.- Parameters:
attribute
- - name of the attribute that references the target of the join- Returns:
- the FetchJoinObject that is added for the target of the join
-
value
PathExpression value()
Return a path expression corresponding to the value of a map-valued association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a map-valued association or element collection.- Returns:
- PathExpression corresponding to the map value
-
key
PathExpression key()
Return a path expression corresponding to the key of a map-valued association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a map-valued association or element collection.- Returns:
- PathExpression corresponding to the map key
-
entry
SelectItem entry()
Return a select item corresponding to the map entry of a map-valued association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a map-valued association or element collection.- Returns:
- SelectItem corresponding to the map entry
-
index
Expression index()
Return an expression that corresponds to the index. of the domain object in the referenced association or element collection. This method is only permitted to be invoked upon a domain object that corresponds to a multi-valued association or element collection for which an order column has been defined.- Returns:
- Expression denoting the index
-
-