public abstract class AbstractFromImpl<Z,X> extends AbstractPathImpl<X> implements From<Z,X>, FromImplementor<Z,X>, Serializable
From
implementors.Modifier and Type | Class and Description |
---|---|
protected class |
AbstractFromImpl.BasicJoinScope |
protected class |
AbstractFromImpl.CorrelationJoinScope |
static interface |
AbstractFromImpl.JoinScope<X>
Helper contract used to define who/what keeps track of joins and fetches made from this FROM.
|
ParameterContainer.Helper
Modifier and Type | Field and Description |
---|---|
static JoinType |
DEFAULT_JOIN_TYPE |
Constructor and Description |
---|
AbstractFromImpl(CriteriaBuilderImpl criteriaBuilder,
Class<X> javaType) |
AbstractFromImpl(CriteriaBuilderImpl criteriaBuilder,
Class<X> javaType,
PathSource pathSource) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canBeDereferenced() |
protected boolean |
canBeFetchSource() |
protected abstract boolean |
canBeJoinSource() |
FromImplementor<Z,X> |
correlateTo(CriteriaSubqueryImpl subquery) |
protected abstract FromImplementor<Z,X> |
createCorrelationDelegate() |
<Y> Fetch<X,Y> |
fetch(PluralAttribute<? super X,?,Y> pluralAttribute)
Create a fetch join to the specified collection-valued
attribute using an inner join.
|
<Y> Fetch<X,Y> |
fetch(PluralAttribute<? super X,?,Y> pluralAttribute,
JoinType jt)
Create a fetch join to the specified collection-valued
attribute using the given join type.
|
<Y> Fetch<X,Y> |
fetch(SingularAttribute<? super X,Y> singularAttribute)
Create a fetch join to the specified single-valued attribute
using an inner join.
|
<Y> Fetch<X,Y> |
fetch(SingularAttribute<? super X,Y> attribute,
JoinType jt)
Create a fetch join to the specified single-valued attribute
using the given join type.
|
<X,Y> Fetch<X,Y> |
fetch(String attributeName)
Create a fetch join to the specified attribute using an
inner join.
|
<X,Y> Fetch<X,Y> |
fetch(String attributeName,
JoinType jt)
Create a fetch join to the specified attribute using
the given join type.
|
String |
getAlias()
Return the alias assigned to the tuple element or null,
if no alias has been assigned.
|
Attribute<?,?> |
getAttribute()
Retrieve reference to the attribute this path represents.
|
FromImplementor<Z,X> |
getCorrelationParent()
Returns the parent
From object from which the correlated
From object has been obtained through correlation (use
of a Subquery correlate method). |
Set<Fetch<X,?>> |
getFetches()
Return the fetch joins that have been made from this type.
|
Set<Join<X,?>> |
getJoins()
Return the joins that have been made from this bound type.
|
From<?,Z> |
getParent() |
String |
getPathIdentifier()
Get the string representation of this path as a navigation from one of the
queries identification variables
|
PathSource<Z> |
getPathSource() |
boolean |
isCorrelated()
Whether the
From object has been obtained as a result of
correlation (use of a Subquery correlate
method). |
<Y> CollectionJoin<X,Y> |
join(CollectionAttribute<? super X,Y> collection)
Create an inner join to the specified Collection-valued
attribute.
|
<Y> CollectionJoin<X,Y> |
join(CollectionAttribute<? super X,Y> collection,
JoinType jt)
Create a join to the specified Collection-valued attribute
using the given join type.
|
<Y> ListJoin<X,Y> |
join(ListAttribute<? super X,Y> list)
Create an inner join to the specified List-valued attribute.
|
<Y> ListJoin<X,Y> |
join(ListAttribute<? super X,Y> list,
JoinType jt)
Create a join to the specified List-valued attribute using
the given join type.
|
<K,V> MapJoin<X,K,V> |
join(MapAttribute<? super X,K,V> map)
Create an inner join to the specified Map-valued attribute.
|
<K,V> MapJoin<X,K,V> |
join(MapAttribute<? super X,K,V> map,
JoinType jt)
Create a join to the specified Map-valued attribute using
the given join type.
|
<Y> SetJoin<X,Y> |
join(SetAttribute<? super X,Y> set)
Create an inner join to the specified Set-valued attribute.
|
<Y> SetJoin<X,Y> |
join(SetAttribute<? super X,Y> set,
JoinType jt)
Create a join to the specified Set-valued attribute using
the given join type.
|
<Y> Join<X,Y> |
join(SingularAttribute<? super X,Y> singularAttribute)
Create an inner join to the specified single-valued
attribute.
|
<Y> Join<X,Y> |
join(SingularAttribute<? super X,Y> attribute,
JoinType jt)
Create a join to the specified single-valued attribute
using the given join type.
|
<X,Y> Join<X,Y> |
join(String attributeName)
Create an inner join to the specified attribute.
|
<X,Y> Join<X,Y> |
join(String attributeName,
JoinType jt)
Create a join to the specified attribute using the given
join type.
|
<X,Y> CollectionJoin<X,Y> |
joinCollection(String attributeName)
Create an inner join to the specified Collection-valued
attribute.
|
<X,Y> CollectionJoin<X,Y> |
joinCollection(String attributeName,
JoinType jt)
Create a join to the specified Collection-valued attribute
using the given join type.
|
<X,Y> ListJoin<X,Y> |
joinList(String attributeName)
Create an inner join to the specified List-valued attribute.
|
<X,Y> ListJoin<X,Y> |
joinList(String attributeName,
JoinType jt)
Create a join to the specified List-valued attribute using
the given join type.
|
<X,K,V> MapJoin<X,K,V> |
joinMap(String attributeName)
Create an inner join to the specified Map-valued attribute.
|
<X,K,V> MapJoin<X,K,V> |
joinMap(String attributeName,
JoinType jt)
Create a join to the specified Map-valued attribute using
the given join type.
|
<X,Y> SetJoin<X,Y> |
joinSet(String attributeName)
Create an inner join to the specified Set-valued attribute.
|
<X,Y> SetJoin<X,Y> |
joinSet(String attributeName,
JoinType jt)
Create a join to the specified Set-valued attribute using
the given join type.
|
protected Attribute<X,?> |
locateAttributeInternal(String name)
Get the attribute by name from the underlying model.
|
protected ManagedType<? super X> |
locateManagedType() |
void |
prepareAlias(CriteriaQueryCompiler.RenderingContext renderingContext) |
void |
prepareCorrelationDelegate(FromImplementor<Z,X> parent) |
String |
render(CriteriaQueryCompiler.RenderingContext renderingContext) |
String |
renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext) |
get, get, get, get, getParentPath, illegalDereference, locateAttribute, registerAttributePath, registerParameters, resolveCachedAttributePath, type, unknownAttribute
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, in, in, in, in, isNotNull, isNull
alias, getCompoundSelectionItems, getValueHandlers, isCompoundSelection
forceConversion, getJavaType, getValueHandler, resetJavaType, setAlias
criteriaBuilder
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
renderTableExpression
asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString
getValueHandlers
getValueHandler
get, get, get, get, getModel, getParentPath, type
as, in, in, in, in, isNotNull, isNull
alias, getCompoundSelectionItems, isCompoundSelection
getJavaType
public static final JoinType DEFAULT_JOIN_TYPE
public AbstractFromImpl(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType)
public AbstractFromImpl(CriteriaBuilderImpl criteriaBuilder, Class<X> javaType, PathSource pathSource)
public PathSource<Z> getPathSource()
getPathSource
in class AbstractPathImpl<X>
public String getPathIdentifier()
AbstractPathImpl
getPathIdentifier
in interface PathSource<X>
getPathIdentifier
in class AbstractPathImpl<X>
protected boolean canBeDereferenced()
canBeDereferenced
in class AbstractPathImpl<X>
public void prepareAlias(CriteriaQueryCompiler.RenderingContext renderingContext)
prepareAlias
in interface FromImplementor<Z,X>
prepareAlias
in interface PathSource<X>
prepareAlias
in class AbstractPathImpl<X>
public String renderProjection(CriteriaQueryCompiler.RenderingContext renderingContext)
AbstractPathImpl
renderProjection
in interface Renderable
renderProjection
in class AbstractPathImpl<X>
public String render(CriteriaQueryCompiler.RenderingContext renderingContext)
AbstractPathImpl
render
in interface Renderable
render
in class AbstractPathImpl<X>
public Attribute<?,?> getAttribute()
PathImplementor
getAttribute
in interface PathImplementor<X>
protected Attribute<X,?> locateAttributeInternal(String name)
AbstractPathImpl
AbstractPathImpl.locateAttribute(java.lang.String)
which also applies nullness checking for proper error reporting.locateAttributeInternal
in class AbstractPathImpl<X>
name
- The name of the attribute to locateprotected ManagedType<? super X> locateManagedType()
public boolean isCorrelated()
From
From
object has been obtained as a result of
correlation (use of a Subquery
correlate
method).isCorrelated
in interface From<Z,X>
public FromImplementor<Z,X> getCorrelationParent()
From
From
object from which the correlated
From
object has been obtained through correlation (use
of a Subquery
correlate
method).getCorrelationParent
in interface From<Z,X>
getCorrelationParent
in interface FromImplementor<Z,X>
public FromImplementor<Z,X> correlateTo(CriteriaSubqueryImpl subquery)
correlateTo
in interface FromImplementor<Z,X>
protected abstract FromImplementor<Z,X> createCorrelationDelegate()
public void prepareCorrelationDelegate(FromImplementor<Z,X> parent)
prepareCorrelationDelegate
in interface FromImplementor<Z,X>
public String getAlias()
AbstractTupleElement
getAlias
in interface TupleElement<X>
getAlias
in class AbstractTupleElement<X>
protected abstract boolean canBeJoinSource()
public Set<Join<X,?>> getJoins()
From
public <Y> Join<X,Y> join(SingularAttribute<? super X,Y> singularAttribute)
From
public <Y> Join<X,Y> join(SingularAttribute<? super X,Y> attribute, JoinType jt)
From
public <Y> CollectionJoin<X,Y> join(CollectionAttribute<? super X,Y> collection)
From
public <Y> CollectionJoin<X,Y> join(CollectionAttribute<? super X,Y> collection, JoinType jt)
From
public <Y> SetJoin<X,Y> join(SetAttribute<? super X,Y> set)
From
public <Y> SetJoin<X,Y> join(SetAttribute<? super X,Y> set, JoinType jt)
From
public <Y> ListJoin<X,Y> join(ListAttribute<? super X,Y> list)
From
public <Y> ListJoin<X,Y> join(ListAttribute<? super X,Y> list, JoinType jt)
From
public <K,V> MapJoin<X,K,V> join(MapAttribute<? super X,K,V> map)
From
public <K,V> MapJoin<X,K,V> join(MapAttribute<? super X,K,V> map, JoinType jt)
From
public <X,Y> Join<X,Y> join(String attributeName)
From
public <X,Y> Join<X,Y> join(String attributeName, JoinType jt)
From
public <X,Y> CollectionJoin<X,Y> joinCollection(String attributeName)
From
joinCollection
in interface From<Z,X>
attributeName
- name of the attribute for the
target of the joinpublic <X,Y> CollectionJoin<X,Y> joinCollection(String attributeName, JoinType jt)
From
joinCollection
in interface From<Z,X>
attributeName
- name of the attribute for the
target of the joinjt
- join typepublic <X,Y> SetJoin<X,Y> joinSet(String attributeName)
From
public <X,Y> SetJoin<X,Y> joinSet(String attributeName, JoinType jt)
From
public <X,Y> ListJoin<X,Y> joinList(String attributeName)
From
public <X,Y> ListJoin<X,Y> joinList(String attributeName, JoinType jt)
From
public <X,K,V> MapJoin<X,K,V> joinMap(String attributeName)
From
public <X,K,V> MapJoin<X,K,V> joinMap(String attributeName, JoinType jt)
From
protected boolean canBeFetchSource()
public Set<Fetch<X,?>> getFetches()
FetchParent
getFetches
in interface FetchParent<Z,X>
public <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> singularAttribute)
FetchParent
fetch
in interface FetchParent<Z,X>
singularAttribute
- target of the joinpublic <Y> Fetch<X,Y> fetch(SingularAttribute<? super X,Y> attribute, JoinType jt)
FetchParent
fetch
in interface FetchParent<Z,X>
attribute
- target of the joinjt
- join typepublic <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> pluralAttribute)
FetchParent
fetch
in interface FetchParent<Z,X>
pluralAttribute
- target of the joinpublic <Y> Fetch<X,Y> fetch(PluralAttribute<? super X,?,Y> pluralAttribute, JoinType jt)
FetchParent
fetch
in interface FetchParent<Z,X>
pluralAttribute
- target of the joinjt
- join typepublic <X,Y> Fetch<X,Y> fetch(String attributeName)
FetchParent
fetch
in interface FetchParent<Z,X>
attributeName
- name of the attribute for the
target of the joinpublic <X,Y> Fetch<X,Y> fetch(String attributeName, JoinType jt)
FetchParent
fetch
in interface FetchParent<Z,X>
attributeName
- name of the attribute for the
target of the joinjt
- join typeCopyright © 2018 JBoss by Red Hat. All rights reserved.