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 String[]aliasesprotected int[]collectionOwnersprotected CollectionPersister[]collectionPersistersprotected String[]collectionSuffixesprotected LockMode[]lockModeArrayprotected EntityType[]ownerAssociationTypesprotected int[]ownersprotected Loadable[]persistersprotected Stringsqlprotected String[]suffixes-
Fields inherited from class org.hibernate.loader.BasicLoader
NO_SUFFIX
-
Fields inherited from class org.hibernate.loader.Loader
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 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.CollectionPersister[]getCollectionPersisters()An (optional) persister for a collection to be initialized; only collection loaders return a non-null valueprotected String[]getCollectionSuffixes()protected DialectgetDialect()Loadable[]getEntityPersisters()An array of persisters of entity classes contained in each row of results; implemented by all subclassesLoadQueryInfluencersgetLoadQueryInfluencers()protected LockMode[]getLockModes(LockOptions lockOptions)What lock options does this load entities with?protected LockOptionsgetLockOptions()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").StringgetSQLString()The SQL query string to be called; implemented by all subclassesprotected String[]getSuffixes()protected voidinitFromWalker(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, bindPreparedStatement, checkScrollability, createCacheableResultTransformer, createSubselects, determineFollowOnLockMode, doList, doQueryAndInitializeNonLazyCollections, doQueryAndInitializeNonLazyCollections, endCollectionLoad, executeQueryStatement, executeQueryStatement, extractKeysFromResultSet, generateQueryKey, getCompositeKeyManyToOneTargetIndices, getEntityEagerPerPropertyFetches, getEntityEagerPropertyFetches, getEntityPersister, getFactory, getLimitHandler, getNamedParameterLocs, getOptionalObjectKey, getQueryIdentifier, getResultColumnOrRow, getResultFromQueryCache, getResultList, getResultRow, getResultRowAliases, getResultSet, getResultSet, getRowsFromResultSet, handleEmptyCollections, hasSubselectLoadableCollections, includeInResultRow, instanceAlreadyLoaded, instanceNotYetLoaded, isSingleRowLoader, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessResultSet, preprocessSQL, processDistinctKeyword, processResultSet, putResultInQueryCache, registerNonExists, resolveResultTransformer, scroll, shouldUseFollowOnLocking, toString, upgradeLocks
-
-
-
-
Field Detail
-
persisters
protected Loadable[] persisters
-
collectionPersisters
protected CollectionPersister[] collectionPersisters
-
collectionOwners
protected int[] collectionOwners
-
aliases
protected String[] aliases
-
lockModeArray
protected LockMode[] lockModeArray
-
owners
protected int[] owners
-
ownerAssociationTypes
protected EntityType[] ownerAssociationTypes
-
sql
protected String sql
-
suffixes
protected String[] suffixes
-
collectionSuffixes
protected String[] collectionSuffixes
-
-
Constructor Detail
-
OuterJoinLoader
public OuterJoinLoader(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
-
Method Detail
-
getDialect
protected final Dialect getDialect()
-
getSuffixes
protected String[] getSuffixes()
- Specified by:
getSuffixesin classBasicLoader
-
getCollectionSuffixes
protected String[] getCollectionSuffixes()
- Specified by:
getCollectionSuffixesin classBasicLoader
-
getSQLString
public final String getSQLString()
Description copied from class:LoaderThe SQL query string to be called; implemented by all subclasses- Specified by:
getSQLStringin classLoader- Returns:
- The sql command this loader should use to get its
ResultSet.
-
getEntityPersisters
public final Loadable[] getEntityPersisters()
Description copied from class:LoaderAn array of persisters of entity classes contained in each row of results; implemented by all subclasses- Specified by:
getEntityPersistersin classLoader- Returns:
- The entity persisters.
-
getOwners
protected int[] getOwners()
Description copied from class:LoaderAn 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:LoaderAn array of the owner types corresponding to theLoader.getOwners()returns. Indices indicating no owner would be null here.- Overrides:
getOwnerAssociationTypesin classLoader- Returns:
- The types for the owners.
-
getLockModes
protected LockMode[] getLockModes(LockOptions lockOptions)
Description copied from class:LoaderWhat lock options does this load entities with?- Specified by:
getLockModesin 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 String[] getAliases()
Description copied from class:LoaderGet the SQL table aliases of entities whose associations are subselect-loadable, returning null if this loader does not support subselect loading- Overrides:
getAliasesin classLoader
-
getCollectionPersisters
public final CollectionPersister[] getCollectionPersisters()
Description copied from class:LoaderAn (optional) persister for a collection to be initialized; only collection loaders return a non-null value- Overrides:
getCollectionPersistersin classLoader
-
getCollectionOwners
protected final int[] getCollectionOwners()
Description copied from class:LoaderGet 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:
getCollectionOwnersin classLoader
-
initFromWalker
protected void initFromWalker(JoinWalker walker)
-
-