Package org.hibernate.loader
Class OuterJoinLoader
- java.lang.Object
-
- org.hibernate.loader.Loader
-
- org.hibernate.loader.BasicLoader
-
- org.hibernate.loader.OuterJoinLoader
-
- Direct Known Subclasses:
AbstractEntityLoader
,CollectionElementLoader
,CollectionLoader
,CriteriaLoader
public abstract class OuterJoinLoader extends BasicLoader
Implements logic for walking a tree of associated classes. Generates an SQL select string containing all properties of those classes. Tables are joined using an ANSI-style left outer join.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.hibernate.loader.Loader
Loader.SqlStatementWrapper
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
aliases
protected int[]
collectionOwners
protected CollectionPersister[]
collectionPersisters
protected java.lang.String[]
collectionSuffixes
protected LockMode[]
lockModeArray
protected EntityType[]
ownerAssociationTypes
protected int[]
owners
protected Loadable[]
persisters
protected java.lang.String
sql
protected java.lang.String[]
suffixes
-
Fields inherited from class org.hibernate.loader.BasicLoader
NO_SUFFIX
-
Fields inherited from class org.hibernate.loader.Loader
DEBUG_ENABLED, LOG, SELECT, SELECT_DISTINCT
-
-
Constructor Summary
Constructors Constructor Description OuterJoinLoader(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String[]
getAliases()
Get the SQL table aliases of entities whose associations are subselect-loadable, returning null if this loader does not support subselect loadingprotected int[]
getCollectionOwners()
Get the index of the entity that owns the collection, or -1 if there is no owner in the query results (ie.protected CollectionPersister[]
getCollectionPersisters()
An (optional) persister for a collection to be initialized; only collection loaders return a non-null valueprotected java.lang.String[]
getCollectionSuffixes()
protected Dialect
getDialect()
protected Loadable[]
getEntityPersisters()
An array of persisters of entity classes contained in each row of results; implemented by all subclassesLoadQueryInfluencers
getLoadQueryInfluencers()
protected LockMode[]
getLockModes(LockOptions lockOptions)
What lock options does this load entities with?protected LockOptions
getLockOptions()
protected EntityType[]
getOwnerAssociationTypes()
An array of the owner types corresponding to theLoader.getOwners()
returns.protected int[]
getOwners()
An array of indexes of the entity that owns a one-to-one association to the entity at the given index (-1 if there is no "owner").java.lang.String
getSQLString()
The SQL query string to be called; implemented by all subclassesprotected java.lang.String[]
getSuffixes()
protected void
initFromWalker(JoinWalker walker)
-
Methods inherited from class org.hibernate.loader.BasicLoader
generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiate
-
Methods inherited from class org.hibernate.loader.Loader
applyLocks, applyPostLoadLocks, areResultSetRowsTransformedImmediately, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, determineFollowOnLockMode, doList, doQueryAndInitializeNonLazyCollections, doQueryAndInitializeNonLazyCollections, executeQueryStatement, executeQueryStatement, extractKeysFromResultSet, getCompositeKeyManyToOneTargetIndices, getEntityEagerPropertyFetches, getFactory, getLimitHandler, getNamedParameterLocs, getQueryIdentifier, getResultColumnOrRow, getResultList, getResultRow, getResultRowAliases, getResultSet, getResultSet, hasSubselectLoadableCollections, includeInResultRow, isSingleRowLoader, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessSQL, processDistinctKeyword, processResultSet, putResultInQueryCache, resolveResultTransformer, scroll, shouldUseFollowOnLocking, toString, upgradeLocks
-
-
-
-
Field Detail
-
persisters
protected Loadable[] persisters
-
collectionPersisters
protected CollectionPersister[] collectionPersisters
-
collectionOwners
protected int[] collectionOwners
-
aliases
protected java.lang.String[] aliases
-
lockModeArray
protected LockMode[] lockModeArray
-
owners
protected int[] owners
-
ownerAssociationTypes
protected EntityType[] ownerAssociationTypes
-
sql
protected java.lang.String sql
-
suffixes
protected java.lang.String[] suffixes
-
collectionSuffixes
protected java.lang.String[] collectionSuffixes
-
-
Constructor Detail
-
OuterJoinLoader
public OuterJoinLoader(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
-
Method Detail
-
getDialect
protected final Dialect getDialect()
-
getSuffixes
protected java.lang.String[] getSuffixes()
- Specified by:
getSuffixes
in classBasicLoader
-
getCollectionSuffixes
protected java.lang.String[] getCollectionSuffixes()
- Specified by:
getCollectionSuffixes
in classBasicLoader
-
getSQLString
public final java.lang.String getSQLString()
Description copied from class:Loader
The SQL query string to be called; implemented by all subclasses- Specified by:
getSQLString
in classLoader
- Returns:
- The sql command this loader should use to get its
ResultSet
.
-
getEntityPersisters
protected final Loadable[] getEntityPersisters()
Description copied from class:Loader
An array of persisters of entity classes contained in each row of results; implemented by all subclasses- Specified by:
getEntityPersisters
in classLoader
- Returns:
- The entity persisters.
-
getOwners
protected int[] getOwners()
Description copied from class:Loader
An array of indexes of the entity that owns a one-to-one association to the entity at the given index (-1 if there is no "owner"). The indexes contained here are relative to the result ofLoader.getEntityPersisters()
.
-
getOwnerAssociationTypes
protected EntityType[] getOwnerAssociationTypes()
Description copied from class:Loader
An array of the owner types corresponding to theLoader.getOwners()
returns. Indices indicating no owner would be null here.- Overrides:
getOwnerAssociationTypes
in classLoader
- Returns:
- The types for the owners.
-
getLockModes
protected LockMode[] getLockModes(LockOptions lockOptions)
Description copied from class:Loader
What lock options does this load entities with?- Specified by:
getLockModes
in classLoader
- Parameters:
lockOptions
- a collection of lock options specified dynamically via the Query interface
-
getLockOptions
protected LockOptions getLockOptions()
-
getLoadQueryInfluencers
public LoadQueryInfluencers getLoadQueryInfluencers()
-
getAliases
protected final java.lang.String[] getAliases()
Description copied from class:Loader
Get the SQL table aliases of entities whose associations are subselect-loadable, returning null if this loader does not support subselect loading- Overrides:
getAliases
in classLoader
-
getCollectionPersisters
protected final CollectionPersister[] getCollectionPersisters()
Description copied from class:Loader
An (optional) persister for a collection to be initialized; only collection loaders return a non-null value- Overrides:
getCollectionPersisters
in classLoader
-
getCollectionOwners
protected final int[] getCollectionOwners()
Description copied from class:Loader
Get the index of the entity that owns the collection, or -1 if there is no owner in the query results (ie. in the case of a collection initializer) or no collection.- Overrides:
getCollectionOwners
in classLoader
-
initFromWalker
protected void initFromWalker(JoinWalker walker)
-
-