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
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String[]protected int[]protected CollectionPersister[]protected String[]protected LockMode[]protected EntityType[]protected int[]protected Loadable[]protected Stringprotected String[]Fields inherited from class org.hibernate.loader.BasicLoader
NO_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionOuterJoinLoader(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) -
Method Summary
Modifier and TypeMethodDescriptionprotected final String[]Get the SQL table aliases of entities whose associations are subselect-loadable, returning null if this loader does not support subselect loadingprotected final int[]Get the index of the entity that owns the collection, or -1 if there is no owner in the query results (ie.protected final CollectionPersister[]An (optional) persister for a collection to be initialized; only collection loaders return a non-null valueprotected String[]protected final Dialectprotected final Loadable[]An array of persisters of entity classes contained in each row of results; implemented by all subclassesprotected LockMode[]getLockModes(LockOptions lockOptions) What lock options does this load entities with?protected LockOptionsprotected EntityType[]An array of the owner types corresponding to theLoader.getOwners()returns.protected int[]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").protected final StringThe SQL query string to be called; implemented by all subclassesprotected String[]protected voidinitFromWalker(JoinWalker walker) Methods inherited from class org.hibernate.loader.BasicLoader
generateSuffixes, generateSuffixes, getCollectionAliases, getEntityAliases, postInstantiateMethods inherited from class org.hibernate.loader.Loader
applyLocks, applyPostLoadLocks, areResultSetRowsTransformedImmediately, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, doList, extractKeysFromResultSet, getCompositeKeyManyToOneTargetIndices, getEntityEagerPropertyFetches, getFactory, getNamedParameterLocs, getQueryIdentifier, getResultColumnOrRow, getResultList, getResultSet, hasSubselectLoadableCollections, isSingleRowLoader, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, prepareQueryStatement, preprocessSQL, resolveResultTransformer, scroll, toString, upgradeLocks
-
Field Details
-
persisters
-
collectionPersisters
-
collectionOwners
protected int[] collectionOwners -
aliases
-
lockModeArray
-
owners
protected int[] owners -
ownerAssociationTypes
-
sql
-
suffixes
-
collectionSuffixes
-
-
Constructor Details
-
OuterJoinLoader
public OuterJoinLoader(SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers)
-
-
Method Details
-
getDialect
-
getSuffixes
- Specified by:
getSuffixesin classBasicLoader
-
getCollectionSuffixes
- Specified by:
getCollectionSuffixesin classBasicLoader
-
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
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
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
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
-
getLoadQueryInfluencers
-
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
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
-