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.
Loader.SqlStatementWrapper
Modifier and Type | Field and Description |
---|---|
protected String[] |
aliases |
protected int[] |
collectionOwners |
protected CollectionPersister[] |
collectionPersisters |
protected String[] |
collectionSuffixes |
protected LockMode[] |
lockModeArray |
protected EntityType[] |
ownerAssociationTypes |
protected int[] |
owners |
protected Loadable[] |
persisters |
protected String |
sql |
protected String[] |
suffixes |
NO_SUFFIX
DEBUG_ENABLED, LOG, SELECT, SELECT_DISTINCT
Constructor and Description |
---|
OuterJoinLoader(SessionFactoryImplementor factory,
LoadQueryInfluencers loadQueryInfluencers) |
Modifier and Type | Method and 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
loading
|
protected 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 value
|
protected String[] |
getCollectionSuffixes() |
protected Dialect |
getDialect() |
protected Loadable[] |
getEntityPersisters()
An array of persisters of entity classes contained in each row of results;
implemented by all subclasses
|
LoadQueryInfluencers |
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 the
Loader.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").
|
String |
getSQLString()
The SQL query string to be called; implemented by all subclasses
|
protected String[] |
getSuffixes() |
protected void |
initFromWalker(JoinWalker walker) |
generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiate
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
protected Loadable[] persisters
protected CollectionPersister[] collectionPersisters
protected int[] collectionOwners
protected String[] aliases
protected LockMode[] lockModeArray
protected int[] owners
protected EntityType[] ownerAssociationTypes
protected String sql
protected String[] suffixes
protected String[] collectionSuffixes
public OuterJoinLoader(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
protected final Dialect getDialect()
protected String[] getSuffixes()
getSuffixes
in class BasicLoader
protected String[] getCollectionSuffixes()
getCollectionSuffixes
in class BasicLoader
public final String getSQLString()
Loader
The SQL query string to be called; implemented by all subclasses
getSQLString
in class Loader
ResultSet
.protected final Loadable[] getEntityPersisters()
Loader
An array of persisters of entity classes contained in each row of results; implemented by all subclasses
getEntityPersisters
in class Loader
protected int[] getOwners()
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 of
Loader.getEntityPersisters()
.
protected EntityType[] getOwnerAssociationTypes()
Loader
An array of the owner types corresponding to the Loader.getOwners()
returns. Indices indicating no owner would be null here.
getOwnerAssociationTypes
in class Loader
protected LockMode[] getLockModes(LockOptions lockOptions)
Loader
What lock options does this load entities with?
getLockModes
in class Loader
lockOptions
- a collection of lock options specified dynamically via the Query interfaceprotected LockOptions getLockOptions()
public LoadQueryInfluencers getLoadQueryInfluencers()
protected final String[] getAliases()
Loader
Get the SQL table aliases of entities whose associations are subselect-loadable, returning null if this loader does not support subselect loading
getAliases
in class Loader
protected final CollectionPersister[] getCollectionPersisters()
Loader
An (optional) persister for a collection to be initialized; only collection loaders return a non-null value
getCollectionPersisters
in class Loader
protected final int[] getCollectionOwners()
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.
getCollectionOwners
in class Loader
protected void initFromWalker(JoinWalker walker)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.