org.hibernate.loader

Class BasicLoader

Known Direct Subclasses:
OuterJoinLoader, QueryLoader, QueryTranslatorImpl

public abstract class BasicLoader
extends Loader

Uses the default mapping from property to result set column alias defined by the entities' persisters. Used when Hibernate is generating result set column aliases.
Author:
Gavin King

Field Summary

protected static String[]
NO_SUFFIX

Constructor Summary

BasicLoader(SessionFactoryImplementor factory)

Method Summary

static String[]
generateSuffixes(int length)
Utility method that generates 0_, 1_ suffixes.
static String[]
generateSuffixes(int seed, int length)
protected CollectionAliases[]
getCollectionAliases()
protected abstract String[]
getCollectionSuffixes()
protected EntityAliases[]
getEntityAliases()
Get the result set descriptor
protected abstract String[]
getSuffixes()
protected void
postInstantiate()
Calculate and cache select-clause suffixes.

Methods inherited from class org.hibernate.loader.Loader

applyLocks, autoDiscoverTypes, bindNamedParameters, bindParameterValues, bindPositionalParameters, checkScrollability, doList, getAliases, getCollectionAliases, getCollectionOwners, getCollectionPersisters, getEntityAliases, getEntityEagerPropertyFetches, getEntityPersisters, getFactory, getLockModes, getNamedParameterLocs, getOwnerAssociationTypes, getOwners, getQueryIdentifier, getResultColumnOrRow, getResultList, getResultSet, getSQLString, hasSubselectLoadableCollections, isSingleRowLoader, isSubselectLoadingEnabled, list, loadCollection, loadCollectionBatch, loadCollectionSubselect, loadEntity, loadEntity, loadEntityBatch, loadSequentialRowsForward, loadSequentialRowsReverse, loadSingleRow, needsFetchingScroll, postInstantiate, prepareQueryStatement, preprocessSQL, scroll, toString, upgradeLocks

Field Details

NO_SUFFIX

protected static final String[] NO_SUFFIX

Constructor Details

BasicLoader

public BasicLoader(SessionFactoryImplementor factory)

Method Details

generateSuffixes

public static String[] generateSuffixes(int length)
Utility method that generates 0_, 1_ suffixes. Subclasses don't necessarily need to use this algorithm, but it is intended that they will in most cases.

generateSuffixes

public static String[] generateSuffixes(int seed,
                                        int length)

getCollectionAliases

protected final CollectionAliases[] getCollectionAliases()
Overrides:
getCollectionAliases in interface Loader

getCollectionSuffixes

protected abstract String[] getCollectionSuffixes()

getEntityAliases

protected final EntityAliases[] getEntityAliases()
Get the result set descriptor
Overrides:
getEntityAliases in interface Loader

getSuffixes

protected abstract String[] getSuffixes()

postInstantiate

protected void postInstantiate()
Calculate and cache select-clause suffixes. Must be called by subclasses after instantiation.
Overrides:
postInstantiate in interface Loader