Package org.hibernate.loader.criteria
Class CriteriaJoinWalker
java.lang.Object
org.hibernate.loader.JoinWalker
org.hibernate.loader.AbstractEntityJoinWalker
org.hibernate.loader.criteria.CriteriaJoinWalker
A JoinWalker for Criteria queries.
- See Also:
-
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
ConstructorsConstructorDescriptionCriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers) CriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers, String alias) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgenerateRootAlias(String tableName) protected StringgenerateTableAlias(int n, PropertyPath path, Joinable joinable) protected intgetJoinType(OuterJoinLoadable persister, PropertyPath path, int propertyNumber, AssociationType associationType, FetchMode metadataFetchMode, CascadeStyle metadataCascadeStyle, String lhsTable, String[] lhsColumns, boolean nullable, int currentDepth) Determine the appropriate type of join (if any) to use to fetch the given association.protected intgetJoinType(AssociationType associationType, FetchMode config, PropertyPath path, String lhsTable, String[] lhsColumns, boolean nullable, int currentDepth, CascadeStyle cascadeStyle) Determine the appropriate associationType of join (if any) to use to fetch the given association.Type[]String[]protected StringUse the discriminator, to narrow the select to instances of the queried subclass, also applying any filters.protected StringgetWithClause(PropertyPath path) protected booleanhasRestriction(PropertyPath path) Methods inherited from class org.hibernate.loader.AbstractEntityJoinWalker
getAlias, getPersister, initAll, initAll, initProjection, isDuplicateAssociation, isJoinedFetchEnabled, isJoinFetchEnabledByProfile, toStringMethods inherited from class org.hibernate.loader.JoinWalker
countCollectionPersisters, countEntityPersisters, getAliases, 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, orderBy, selectString, setAliases, setCollectionOwners, setCollectionPersisters, setCollectionSuffixes, setOwnerAssociationTypes, setOwners, setPersisters, setSql, setSuffixes, walkCollectionTree, walkEntityTree, whereString
-
Constructor Details
-
CriteriaJoinWalker
public CriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers) -
CriteriaJoinWalker
public CriteriaJoinWalker(OuterJoinLoadable persister, CriteriaQueryTranslator translator, SessionFactoryImplementor factory, CriteriaImpl criteria, String rootEntityName, LoadQueryInfluencers loadQueryInfluencers, String alias)
-
-
Method Details
-
getResultTypes
-
getUserAliases
-
getJoinType
protected int getJoinType(OuterJoinLoadable persister, PropertyPath path, int propertyNumber, AssociationType associationType, FetchMode metadataFetchMode, CascadeStyle metadataCascadeStyle, String lhsTable, 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 (
JoinFragment.INNER_JOIN,JoinFragment.LEFT_OUTER_JOIN, or -1 to indicate no joining. - Throws:
MappingException- ??
-
getJoinType
protected int getJoinType(AssociationType associationType, FetchMode config, PropertyPath path, String lhsTable, 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 (
JoinFragment.INNER_JOIN,JoinFragment.LEFT_OUTER_JOIN, or -1 to indicate no joining. - Throws:
MappingException- ??
-
getWhereFragment
Use the discriminator, to narrow the select to instances of the queried subclass, also applying any filters.- Overrides:
getWhereFragmentin classAbstractEntityJoinWalker- Throws:
MappingException
-
generateTableAlias
- Overrides:
generateTableAliasin classJoinWalker
-
generateRootAlias
- Overrides:
generateRootAliasin classJoinWalker
-
getQuerySpaces
-
getComment
- Specified by:
getCommentin classAbstractEntityJoinWalker
-
getWithClause
- Overrides:
getWithClausein classJoinWalker
-
hasRestriction
- Overrides:
hasRestrictionin classJoinWalker
-