Package org.hibernate.loader.criteria
Class CriteriaJoinWalker
- java.lang.Object
-
- org.hibernate.loader.JoinWalker
-
- org.hibernate.loader.AbstractEntityJoinWalker
-
- org.hibernate.loader.criteria.CriteriaJoinWalker
-
public class CriteriaJoinWalker extends AbstractEntityJoinWalker
A JoinWalker for Criteria queries.- See Also:
CriteriaLoader
-
-
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 CriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, org.hibernate.internal.CriteriaImpl criteria, java.lang.String rootEntityName, LoadQueryInfluencers loadQueryInfluencers)CriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, org.hibernate.internal.CriteriaImpl criteria, java.lang.String rootEntityName, LoadQueryInfluencers loadQueryInfluencers, java.lang.String alias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgenerateRootAlias(java.lang.String tableName)protected java.lang.StringgenerateTableAlias(int n, PropertyPath path, Joinable joinable)java.lang.StringgetComment()protected JoinTypegetJoinType(OuterJoinLoadable persister, PropertyPath path, int propertyNumber, AssociationType associationType, FetchMode metadataFetchMode, CascadeStyle metadataCascadeStyle, java.lang.String lhsTable, java.lang.String[] lhsColumns, boolean nullable, int currentDepth)Determine the appropriate type of join (if any) to use to fetch the given association.protected JoinTypegetJoinType(AssociationType associationType, FetchMode config, PropertyPath path, java.lang.String lhsTable, java.lang.String[] lhsColumns, boolean nullable, int currentDepth, CascadeStyle cascadeStyle)Determine the appropriate associationType of join (if any) to use to fetch the given association.java.util.SetgetQuerySpaces()Type[]getResultTypes()java.lang.String[]getUserAliases()protected java.lang.StringgetWhereFragment()Use the discriminator, to narrow the select to instances of the queried subclass, also applying any filters.protected java.lang.StringgetWithClause(PropertyPath path)protected booleanhasRestriction(PropertyPath path)boolean[]includeInResultRow()-
Methods inherited from class org.hibernate.loader.AbstractEntityJoinWalker
getAlias, getPersister, initAll, initAll, initProjection, isDuplicateAssociation, isJoinedFetchEnabled, isJoinFetchEnabledByProfile, orderBy, toString
-
Methods inherited from class org.hibernate.loader.JoinWalker
countCollectionPersisters, countEntityPersisters, getAliases, getAssociations, getCollectionOwners, getCollectionPersisters, getCollectionSuffixes, getDialect, getFactory, getJoinType, getLoadQueryInfluencers, getLockModeArray, getLockModeOptions, getOwnerAssociationTypes, getOwners, getPersisters, getSQLString, getSuffixes, initPersisters, initPersisters, initPersisters, isDuplicateAssociation, isJoinable, isJoinedFetchEnabledInMapping, isTooDeep, isTooManyCollections, mergeOrderings, mergeOuterJoins, orderBy, selectString, setAliases, setCollectionOwners, setCollectionPersisters, setCollectionSuffixes, setOwnerAssociationTypes, setOwners, setPersisters, setSql, setSuffixes, walkCollectionTree, walkEntityTree, whereString, whereString
-
-
-
-
Constructor Detail
-
CriteriaJoinWalker
public CriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, org.hibernate.internal.CriteriaImpl criteria, java.lang.String rootEntityName, LoadQueryInfluencers loadQueryInfluencers)
-
CriteriaJoinWalker
public CriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, org.hibernate.internal.CriteriaImpl criteria, java.lang.String rootEntityName, LoadQueryInfluencers loadQueryInfluencers, java.lang.String alias)
-
-
Method Detail
-
getResultTypes
public Type[] getResultTypes()
-
getUserAliases
public java.lang.String[] getUserAliases()
-
includeInResultRow
public boolean[] includeInResultRow()
-
getJoinType
protected JoinType getJoinType(OuterJoinLoadable persister, PropertyPath path, int propertyNumber, AssociationType associationType, FetchMode metadataFetchMode, CascadeStyle metadataCascadeStyle, java.lang.String lhsTable, java.lang.String[] lhsColumns, boolean nullable, int currentDepth) throws MappingException
Description copied from class:JoinWalkerDetermine the appropriate type of join (if any) to use to fetch the given association.- Overrides:
getJoinTypein classJoinWalker- Parameters:
persister- The owner of the association.path- The path to the associationpropertyNumber- The property number representing the association.associationType- The association type.metadataFetchMode- The metadata-defined fetch mode.metadataCascadeStyle- The metadata-defined cascade style.lhsTable- The owner tablelhsColumns- The owner join columnsnullable- Is the association nullable.currentDepth- Current join depth- Returns:
- type of join to use (
JoinType.INNER_JOIN,JoinType.LEFT_OUTER_JOIN, or -1 to indicate no joining. - Throws:
MappingException- ??
-
getJoinType
protected JoinType getJoinType(AssociationType associationType, FetchMode config, PropertyPath path, java.lang.String lhsTable, java.lang.String[] lhsColumns, boolean nullable, int currentDepth, CascadeStyle cascadeStyle) throws MappingException
Description copied from class:JoinWalkerDetermine the appropriate associationType of join (if any) to use to fetch the given association.- Overrides:
getJoinTypein classJoinWalker- Parameters:
associationType- The association associationType.config- The metadata-defined fetch mode.path- The path to the associationlhsTable- The owner tablelhsColumns- The owner join columnsnullable- Is the association nullable.currentDepth- Current join depthcascadeStyle- The metadata-defined cascade style.- Returns:
- type of join to use (
JoinType.INNER_JOIN,JoinType.LEFT_OUTER_JOIN, or -1 to indicate no joining. - Throws:
MappingException- ??
-
getWhereFragment
protected java.lang.String getWhereFragment() throws MappingExceptionUse the discriminator, to narrow the select to instances of the queried subclass, also applying any filters.- Overrides:
getWhereFragmentin classAbstractEntityJoinWalker- Throws:
MappingException
-
generateTableAlias
protected java.lang.String generateTableAlias(int n, PropertyPath path, Joinable joinable)- Overrides:
generateTableAliasin classJoinWalker
-
generateRootAlias
protected java.lang.String generateRootAlias(java.lang.String tableName)
- Overrides:
generateRootAliasin classJoinWalker
-
getQuerySpaces
public java.util.Set getQuerySpaces()
-
getComment
public java.lang.String getComment()
- Specified by:
getCommentin classAbstractEntityJoinWalker
-
getWithClause
protected java.lang.String getWithClause(PropertyPath path)
- Overrides:
getWithClausein classJoinWalker
-
hasRestriction
protected boolean hasRestriction(PropertyPath path)
- Overrides:
hasRestrictionin classJoinWalker
-
-