Module org.eclipse.persistence.jpa
Class FromImpl<Z,X>
java.lang.Object
org.eclipse.persistence.internal.jpa.querydef.SelectionImpl<X>
org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl<X>
org.eclipse.persistence.internal.jpa.querydef.PathImpl<X>
org.eclipse.persistence.internal.jpa.querydef.FromImpl<Z,X>
- All Implemented Interfaces:
Expression<X>
,FetchParent<Z,
,X> From<Z,
,X> Path<X>
,Selection<X>
,TupleElement<X>
,Serializable
,Cloneable
,InternalExpression
,InternalSelection
Purpose: Contains the implementation of the From interface of the JPA criteria API.
Description: This class represents a from clause element which could be the root of the query of the end node of a join statement.
- Since:
- EclipseLink 1.2
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected FromImpl
protected boolean
protected boolean
protected ManagedType
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.PathImpl
modelArtifact, pathParent
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
isLiteral, literal, metamodel
Fields inherited from class org.eclipse.persistence.internal.jpa.querydef.SelectionImpl
alias, currentNode, javaType
-
Constructor Summary
ConstructorDescriptionFromImpl
(Path<Z> parentPath, ManagedType managedType, Metamodel metamodel, Class<X> javaClass, Expression expressionNode, Bindable<T> modelArtifact) FromImpl
(Path<Z> parentPath, ManagedType managedType, Metamodel metamodel, Class<X> javaClass, Expression expressionNode, Bindable<T> modelArtifact, FromImpl correlatedParent) -
Method Summary
Modifier and TypeMethodDescriptionfetch
(PluralAttribute<? super X, ?, Y> assoc) Fetch join to the specified collection using an inner join.fetch
(PluralAttribute<? super X, ?, Y> assoc, JoinType jt) Fetch join to the specified collection using the given join type.fetch
(SingularAttribute<? super X, Y> assoc) Fetch join to the specified attribute using an inner join.fetch
(SingularAttribute<? super X, Y> assoc, JoinType jt) Fetch join to the specified attribute using the given join type.<T,
Y> Fetch <T, Y> Fetch join to the specified attribute or association using an inner join.<T,
Y> Fetch <T, Y> Fetch join to the specified attribute or association using the given join type.void
findJoins
(AbstractQueryImpl query) <K,
V, M extends Map<K, V>>
Expression<M> get
(MapAttribute<X, K, V> map) Return the path corresponding to the referenced map-valued attribute.<E,
C extends Collection<E>>
Expression<C> get
(PluralAttribute<X, C, E> collection) Return the path corresponding to the referenced collection-valued attribute.<Y> Path
<Y> get
(SingularAttribute<? super X, Y> att) Return the path corresponding to the referenced non-collection valued attribute.<Y> Path
<Y> Returns the parentFrom
object from which the correlatedFrom
object has been obtained through correlation (use of aSubquery
correlate
method).Return the fetch joins that have been made from this type.getJoins()
boolean
Whether theFrom
object has been obtained as a result of correlation (use of aSubquery
correlate
method).boolean
isFrom()
<Y> CollectionJoin
<X, Y> join
(CollectionAttribute<? super X, Y> collection) <Y> CollectionJoin
<X, Y> join
(CollectionAttribute<? super X, Y> collection, JoinType jt) join
(ListAttribute<? super X, Y> list) join
(ListAttribute<? super X, Y> list, JoinType jt) join
(MapAttribute<? super X, K, V> map) join
(MapAttribute<? super X, K, V> map, JoinType jt) join
(SetAttribute<? super X, Y> set) join
(SetAttribute<? super X, Y> set, JoinType jt) join
(SingularAttribute<? super X, Y> attribute) join
(SingularAttribute<? super X, Y> attribute, JoinType jt) <T,
Y> Join <T, Y> <T,
Y> Join <T, Y> <T,
Y> CollectionJoin <T, Y> joinCollection
(String attributeName) <T,
Y> CollectionJoin <T, Y> joinCollection
(String attributeName, JoinType jt) <T,
Y> ListJoin <T, Y> <T,
Y> ListJoin <T, Y> <T,
K, Y> MapJoin <T, K, Y> <T,
K, Y> MapJoin <T, K, Y> <T,
Y> SetJoin <T, Y> <T,
Y> SetJoin <T, Y> Expression
<Class<? extends X>> type()
Return an expression corresponding to the type of the path.Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.PathImpl
clone, findRootAndParameters, getModel, getParentPath
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.ExpressionImpl
as, buildExpressionForAs, in, in, in, in, isCompoundExpression, isExpression, isJunction, isLiteral, isNotNull, isNull, isParameter, isPredicate, isSubquery
Methods inherited from class org.eclipse.persistence.internal.jpa.querydef.SelectionImpl
alias, getAlias, getCompoundSelectionItems, getCurrentNode, getJavaType, isCompoundSelection, isConstructor, isRoot, setJavaType
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.persistence.criteria.Expression
as, in, in, in, in, isNotNull, isNull
Methods inherited from interface jakarta.persistence.criteria.Path
getModel, getParentPath
Methods inherited from interface jakarta.persistence.criteria.Selection
alias, getCompoundSelectionItems, isCompoundSelection
Methods inherited from interface jakarta.persistence.TupleElement
getAlias, getJavaType
-
Field Details
-
managedType
-
joins
-
fetches
-
isJoin
protected boolean isJoin -
isFetch
protected boolean isFetch
-
-
Constructor Details
-
FromImpl
public FromImpl(Path<Z> parentPath, ManagedType managedType, Metamodel metamodel, Class<X> javaClass, Expression expressionNode, Bindable<T> modelArtifact) -
FromImpl
public FromImpl(Path<Z> parentPath, ManagedType managedType, Metamodel metamodel, Class<X> javaClass, Expression expressionNode, Bindable<T> modelArtifact, FromImpl correlatedParent)
-
-
Method Details
-
getFetches
Return the fetch joins that have been made from this type.- Specified by:
getFetches
in interfaceFetchParent<Z,
X> - Returns:
- fetch joins made from this type
-
getCorrelationParent
Returns the parentFrom
object from which the correlatedFrom
object has been obtained through correlation (use of aSubquery
correlate
method).- Specified by:
getCorrelationParent
in interfaceFrom<Z,
X> - Returns:
- the parent of the correlated From object
- Throws:
IllegalStateException
- if the From object has not been obtained through correlation
-
fetch
Fetch join to the specified attribute using an inner join.- Specified by:
fetch
in interfaceFetchParent<Z,
X> - Parameters:
assoc
- target of the join- Returns:
- the resulting fetch join
-
fetch
Fetch join to the specified attribute using the given join type.- Specified by:
fetch
in interfaceFetchParent<Z,
X> - Parameters:
assoc
- target of the joinjt
- join type- Returns:
- the resulting fetch join
-
fetch
Fetch join to the specified collection using an inner join.- Specified by:
fetch
in interfaceFetchParent<Z,
X> - Parameters:
assoc
- target of the join- Returns:
- the resulting join
-
fetch
Fetch join to the specified collection using the given join type.- Specified by:
fetch
in interfaceFetchParent<Z,
X> - Parameters:
assoc
- target of the joinjt
- join type- Returns:
- the resulting join
-
fetch
Fetch join to the specified attribute or association using an inner join.- Specified by:
fetch
in interfaceFetchParent<Z,
X> - Parameters:
assocName
- name of the attribute or association for the target of the join- Returns:
- the resulting fetch join
-
fetch
Fetch join to the specified attribute or association using the given join type.- Specified by:
fetch
in interfaceFetchParent<Z,
X> - Parameters:
assocName
- assocName of the attribute or association for the target of the joinjt
- join type- Returns:
- the resulting fetch join
-
getJoins
-
get
Return the path corresponding to the referenced non-collection valued attribute. -
get
Return the path corresponding to the referenced collection-valued attribute. -
get
Return the path corresponding to the referenced map-valued attribute. -
type
Return an expression corresponding to the type of the path. -
get
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
joinCollection
- Specified by:
joinCollection
in interfaceFrom<Z,
X>
-
joinCollection
- Specified by:
joinCollection
in interfaceFrom<Z,
X>
-
joinList
-
joinList
-
joinMap
-
joinMap
-
joinSet
-
joinSet
-
findJoins
-
findJoinFetches
-
isFrom
public boolean isFrom()- Specified by:
isFrom
in interfaceInternalSelection
- Overrides:
isFrom
in classSelectionImpl<X>
-