Package org.hibernate.loader
Class AbstractEntityJoinWalker
- java.lang.Object
-
- org.hibernate.loader.JoinWalker
-
- org.hibernate.loader.AbstractEntityJoinWalker
-
- Direct Known Subclasses:
CascadeEntityJoinWalker
,CriteriaJoinWalker
,EntityJoinWalker
public abstract class AbstractEntityJoinWalker extends JoinWalker
Abstract walker for walkers which begin at an entity (criteria queries and entity loaders).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.loader.JoinWalker
JoinWalker.AssociationInitCallback
-
-
Field Summary
-
Fields inherited from class org.hibernate.loader.JoinWalker
aliases, associations, collectionOwners, collectionPersisters, collectionSuffixes, lockModeArray, lockOptions, ownerAssociationTypes, owners, persisters, sql, suffixes
-
-
Constructor Summary
Constructors Constructor Description AbstractEntityJoinWalker(OuterJoinLoadable persister, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
AbstractEntityJoinWalker(OuterJoinLoadable persister, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers, java.lang.String alias)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAlias()
abstract java.lang.String
getComment()
Loadable
getPersister()
protected java.lang.String
getWhereFragment()
protected void
initAll(java.lang.String whereString, java.lang.String orderByString, LockOptions lockOptions)
protected void
initAll(java.lang.String whereString, java.lang.String orderByString, LockOptions lockOptions, JoinWalker.AssociationInitCallback callback)
protected void
initProjection(java.lang.String projectionString, java.lang.String whereString, java.lang.String orderByString, java.lang.String groupByString, LockOptions lockOptions)
protected boolean
isDuplicateAssociation(java.lang.String foreignKeyTable, java.lang.String[] foreignKeyColumns)
Used to detect circularities in the joined graph, note that this method is side-effectyprotected boolean
isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle)
The superclass deliberately excludes collectionsprotected boolean
isJoinFetchEnabledByProfile(OuterJoinLoadable persister, PropertyPath path, int propertyNumber)
protected java.lang.String
orderBy(java.util.List associations, java.lang.String orderBy)
For entities, orderings added by, for example, Criteria#addOrder need to come before the associations' @OrderBy values.java.lang.String
toString()
-
Methods inherited from class org.hibernate.loader.JoinWalker
countCollectionPersisters, countEntityPersisters, generateRootAlias, generateTableAlias, getAliases, getAssociations, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getFactory, getJoinType, getJoinType, getJoinType, getLoadQueryInfluencers, getLockModeArray, getLockModeOptions, getOwnerAssociationTypes, getOwners, getPersisters, getSQLString, getSuffixes, getWithClause, hasRestriction, initPersisters, initPersisters, initPersisters, isDuplicateAssociation, isJoinable, isJoinedFetchEnabledInMapping, isTooDeep, isTooManyCollections, mergeOrderings, mergeOuterJoins, orderBy, selectString, setAliases, setCollectionOwners, setCollectionPersisters, setCollectionSuffixes, setOwnerAssociationTypes, setOwners, setPersisters, setSql, setSuffixes, walkCollectionTree, walkEntityTree, whereString
-
-
-
-
Constructor Detail
-
AbstractEntityJoinWalker
public AbstractEntityJoinWalker(OuterJoinLoadable persister, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
AbstractEntityJoinWalker
public AbstractEntityJoinWalker(OuterJoinLoadable persister, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers, java.lang.String alias)
-
-
Method Detail
-
initAll
protected final void initAll(java.lang.String whereString, java.lang.String orderByString, LockOptions lockOptions) throws MappingException
- Throws:
MappingException
-
initAll
protected final void initAll(java.lang.String whereString, java.lang.String orderByString, LockOptions lockOptions, JoinWalker.AssociationInitCallback callback) throws MappingException
- Throws:
MappingException
-
initProjection
protected final void initProjection(java.lang.String projectionString, java.lang.String whereString, java.lang.String orderByString, java.lang.String groupByString, LockOptions lockOptions) throws MappingException
- Throws:
MappingException
-
getWhereFragment
protected java.lang.String getWhereFragment() throws MappingException
- Throws:
MappingException
-
isJoinedFetchEnabled
protected boolean isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle)
The superclass deliberately excludes collections- Overrides:
isJoinedFetchEnabled
in classJoinWalker
-
isJoinFetchEnabledByProfile
protected final boolean isJoinFetchEnabledByProfile(OuterJoinLoadable persister, PropertyPath path, int propertyNumber)
-
getComment
public abstract java.lang.String getComment()
-
isDuplicateAssociation
protected boolean isDuplicateAssociation(java.lang.String foreignKeyTable, java.lang.String[] foreignKeyColumns)
Description copied from class:JoinWalker
Used to detect circularities in the joined graph, note that this method is side-effecty- Overrides:
isDuplicateAssociation
in classJoinWalker
-
getPersister
public final Loadable getPersister()
-
getAlias
public final java.lang.String getAlias()
-
orderBy
protected java.lang.String orderBy(java.util.List associations, java.lang.String orderBy)
For entities, orderings added by, for example, Criteria#addOrder need to come before the associations' @OrderBy values. However, other sub-classes of JoinWalker (BasicCollectionJoinWalker, OneToManyJoinWalker, etc.) still need the other way around. So, override here instead. See HHH-7116.- Overrides:
orderBy
in classJoinWalker
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-