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.
- Author:
- Gavin King
- See Also:
CriteriaLoader
Fields inherited from class org.hibernate.loader.JoinWalker |
aliases, associations, collectionOwners, collectionPersisters, collectionSuffixes, lockModeArray, lockOptions, ownerAssociationTypes, owners, persisters, sql, suffixes |
Constructor Summary |
CriteriaJoinWalker(OuterJoinLoadable persister,
CriteriaQueryTranslator translator,
SessionFactoryImplementor factory,
CriteriaImpl criteria,
java.lang.String rootEntityName,
LoadQueryInfluencers loadQueryInfluencers)
|
CriteriaJoinWalker(OuterJoinLoadable persister,
CriteriaQueryTranslator translator,
SessionFactoryImplementor factory,
CriteriaImpl criteria,
java.lang.String rootEntityName,
LoadQueryInfluencers loadQueryInfluencers,
java.lang.String alias)
|
Method Summary |
protected java.lang.String |
generateRootAlias(java.lang.String tableName)
|
protected java.lang.String |
generateTableAlias(int n,
java.lang.String path,
Joinable joinable)
|
java.lang.String |
getComment()
|
protected int |
getJoinType(AssociationType associationType,
FetchMode config,
java.lang.String 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. |
protected int |
getJoinType(OuterJoinLoadable persister,
java.lang.String 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. |
java.util.Set |
getQuerySpaces()
|
Type[] |
getResultTypes()
|
java.lang.String[] |
getUserAliases()
|
protected java.lang.String |
getWhereFragment()
Use the discriminator, to narrow the select to instances
of the queried subclass, also applying any filters. |
protected java.lang.String |
getWithClause(java.lang.String path)
|
Methods 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, isDuplicateAssociation, isDuplicateAssociation, isJoinable, isJoinedFetchEnabledInMapping, isTooDeep, isTooManyCollections, mergeOrderings, mergeOuterJoins, orderBy, orderBy, selectString, setAliases, setCollectionOwners, setCollectionPersisters, setCollectionSuffixes, setOwnerAssociationTypes, setOwners, setPersisters, setSql, setSuffixes, walkCollectionTree, walkEntityTree, whereString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CriteriaJoinWalker
public CriteriaJoinWalker(OuterJoinLoadable persister,
CriteriaQueryTranslator translator,
SessionFactoryImplementor factory,
CriteriaImpl criteria,
java.lang.String rootEntityName,
LoadQueryInfluencers loadQueryInfluencers)
CriteriaJoinWalker
public CriteriaJoinWalker(OuterJoinLoadable persister,
CriteriaQueryTranslator translator,
SessionFactoryImplementor factory,
CriteriaImpl criteria,
java.lang.String rootEntityName,
LoadQueryInfluencers loadQueryInfluencers,
java.lang.String alias)
getResultTypes
public Type[] getResultTypes()
getUserAliases
public java.lang.String[] getUserAliases()
getJoinType
protected int getJoinType(OuterJoinLoadable persister,
java.lang.String 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:
JoinWalker
- Determine the appropriate type of join (if any) to use to fetch the
given association.
- Overrides:
getJoinType
in class JoinWalker
- 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,
java.lang.String path,
java.lang.String lhsTable,
java.lang.String[] lhsColumns,
boolean nullable,
int currentDepth,
CascadeStyle cascadeStyle)
throws MappingException
- Description copied from class:
JoinWalker
- Determine the appropriate associationType of join (if any) to use to fetch the
given association.
- Overrides:
getJoinType
in class JoinWalker
- 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
protected java.lang.String getWhereFragment()
throws MappingException
- Use the discriminator, to narrow the select to instances
of the queried subclass, also applying any filters.
- Overrides:
getWhereFragment
in class AbstractEntityJoinWalker
- Throws:
MappingException
generateTableAlias
protected java.lang.String generateTableAlias(int n,
java.lang.String path,
Joinable joinable)
- Overrides:
generateTableAlias
in class JoinWalker
generateRootAlias
protected java.lang.String generateRootAlias(java.lang.String tableName)
- Overrides:
generateRootAlias
in class JoinWalker
getQuerySpaces
public java.util.Set getQuerySpaces()
getComment
public java.lang.String getComment()
- Specified by:
getComment
in class AbstractEntityJoinWalker
getWithClause
protected java.lang.String getWithClause(java.lang.String path)
- Overrides:
getWithClause
in class JoinWalker
Copyright © 2010. All Rights Reserved.