Top Description Fields Constructors Methods
org.hibernate.query.sql.internal

public Class ResultSetMappingProcessor

extends Object
implements ParserContext
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sql.internal.SQLQueryParser.ParserContext
Imports
java.util.ArrayList, .Arrays, .Collections, .HashMap, .HashSet, .List, .Map, .Set, org.hibernate.HibernateException, .LockMode, .MappingException, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.collections.ArrayHelper, org.hibernate.loader.internal.AliasConstantsHelper, org.hibernate.metamodel.mapping.CollectionPart, .EntityMappingType, org.hibernate.persister.collection.CollectionPersister, .QueryableCollection, .SQLLoadableCollection, org.hibernate.persister.entity.EntityPersister, .Loadable, .SQLLoadable, org.hibernate.query.NativeQuery, org.hibernate.query.results.FetchBuilder, .ResultSetMapping, org.hibernate.query.results.complete.CompleteResultBuilderCollectionStandard, org.hibernate.query.results.dynamic.DynamicFetchBuilderContainer, .DynamicFetchBuilderLegacy, .DynamicResultBuilderEntityStandard, org.hibernate.spi.NavigablePath, org.hibernate.type.CollectionType, .ComponentType, .EntityType, .Type

Responsible for processing the ResultSetMapping defined by a org.hibernate.query.sql.spi.NativeSelectQueryDefinition and preprocessing it for consumption by SQLQueryParser.
Authors
Gavin King, Max Andersen, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Map<String, CollectionPersister>
private final Map<String, String>
private final Map<String, String>
private final Map<String, EntityPersister>
private final Map<String, NativeQuery.ResultNode>
private final Map<String, String>
private final Map<String, Map<String, String[]>>
private int
private final Map<String, Map<String, String[]>>
private int
private final SessionFactoryImplementor
factory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private static final CoreMessageLogger
private final ResultSetMapping

Constructor Summary

AccessConstructor and Description
public
ResultSetMappingProcessor(ResultSetMapping resultSetMapping, SessionFactoryImplementor factory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
private void
addCollection(String role, String alias, Map<String, String[]> propertyResults)

private void
addFetchBuilder(String suffix, SQLLoadable loadable, DynamicFetchBuilderContainer resultBuilderEntity, String tableAlias, String[] identifierAliases, String propertyName, String[] columnAliases, Type propertyType)

Deprecated as a consequence of SQLLoadable being deprecated.
private void
addPersister(String alias, Map<String, String[]> propertyResult, SQLLoadable persister)

Deprecated as a consequence of SQLLoadable being deprecated.
private void
applyFetchBuilder(ResultSetMapping resultSetMapping, DynamicFetchBuilderLegacy fetchBuilder, Set<String> visited)

private DynamicResultBuilderEntityStandard
private DynamicResultBuilderEntityStandard
createSuffixedResultBuilder(EntityMappingType entityMapping, String tableAlias, String suffix, LockMode lockMode, NavigablePath navigablePath)

private CompleteResultBuilderCollectionStandard
createSuffixedResultBuilder(NativeQuery.CollectionReturn collectionReturn, String suffix, String entitySuffix)

private NavigablePath
private Map<String, String[]>
filter(Map<String, String[]> propertyResults)

private String
private String
public ResultSetMapping
generateResultMapping(boolean queryHadAliases)

public SQLLoadableCollection
public String
public SQLLoadable
public String
public String
public Map<String, String[]>
private SQLLoadable
getSQLLoadable(String entityName)

Deprecated as a consequence of SQLLoadable being deprecated.
private Map<String, String[]>
public boolean
public boolean
public SQLQueryParser.ParserContext
private void
private void
processFetchBuilder(String attributeName, FetchBuilder fetchBuilder)

private void
private void
private void
private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

alias2CollectionPersisterback to summary
private final Map<String, CollectionPersister> alias2CollectionPersister
alias2CollectionSuffixback to summary
private final Map<String, String> alias2CollectionSuffix
alias2OwnerAliasback to summary
private final Map<String, String> alias2OwnerAlias
alias2Persisterback to summary
private final Map<String, EntityPersister> alias2Persister
alias2Returnback to summary
private final Map<String, NativeQuery.ResultNode> alias2Return
alias2Suffixback to summary
private final Map<String, String> alias2Suffix
collectionPropertyResultMapsback to summary
private final Map<String, Map<String, String[]>> collectionPropertyResultMaps
collectionSuffixSeedback to summary
private int collectionSuffixSeed
entityPropertyResultMapsback to summary
private final Map<String, Map<String, String[]>> entityPropertyResultMaps
entitySuffixSeedback to summary
private int entitySuffixSeed
factoryback to summary
private final SessionFactoryImplementor factory

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

LOGback to summary
private static final CoreMessageLogger LOG
resultSetMappingback to summary
private final ResultSetMapping resultSetMapping

Constructor Detail

ResultSetMappingProcessorback to summary
public ResultSetMappingProcessor(ResultSetMapping resultSetMapping, SessionFactoryImplementor factory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

addCollectionback to summary
private void addCollection(String role, String alias, Map<String, String[]> propertyResults)
addFetchBuilderback to summary
private void addFetchBuilder(String suffix, SQLLoadable loadable, DynamicFetchBuilderContainer resultBuilderEntity, String tableAlias, String[] identifierAliases, String propertyName, String[] columnAliases, Type propertyType)

Deprecated

as a consequence of SQLLoadable being deprecated. See corresponding docs for further information.

addPersisterback to summary
private void addPersister(String alias, Map<String, String[]> propertyResult, SQLLoadable persister)

Deprecated

as a consequence of SQLLoadable being deprecated. See corresponding docs for further information.

applyFetchBuilderback to summary
private void applyFetchBuilder(ResultSetMapping resultSetMapping, DynamicFetchBuilderLegacy fetchBuilder, Set<String> visited)
createSuffixedResultBuilderback to summary
private DynamicResultBuilderEntityStandard createSuffixedResultBuilder(NativeQuery.RootReturn rootReturn, String suffix)
createSuffixedResultBuilderback to summary
private DynamicResultBuilderEntityStandard createSuffixedResultBuilder(EntityMappingType entityMapping, String tableAlias, String suffix, LockMode lockMode, NavigablePath navigablePath)
createSuffixedResultBuilderback to summary
private CompleteResultBuilderCollectionStandard createSuffixedResultBuilder(NativeQuery.CollectionReturn collectionReturn, String suffix, String entitySuffix)
determineNavigablePathback to summary
private NavigablePath determineNavigablePath(DynamicFetchBuilderLegacy fetchBuilder)
filterback to summary
private Map<String, String[]> filter(Map<String, String[]> propertyResults)
generateCollectionSuffixback to summary
private String generateCollectionSuffix()
generateEntitySuffixback to summary
private String generateEntitySuffix()
generateResultMappingback to summary
public ResultSetMapping generateResultMapping(boolean queryHadAliases)
getCollectionPersisterback to summary
public SQLLoadableCollection getCollectionPersister(String alias)

Implements org.hibernate.query.sql.internal.SQLQueryParser.ParserContext.getCollectionPersister.

Deprecated

as a consequence of SQLLoadableCollection being deprecated. See corresponding docs for further information.

Annotations
@Override
getCollectionSuffixback to summary
public String getCollectionSuffix(String alias)

Implements org.hibernate.query.sql.internal.SQLQueryParser.ParserContext.getCollectionSuffix.

Annotations
@Override
getEntityPersisterback to summary
public SQLLoadable getEntityPersister(String alias)

Implements org.hibernate.query.sql.internal.SQLQueryParser.ParserContext.getEntityPersister.

Deprecated

as a consequence of SQLLoadable being deprecated. See corresponding docs for further information.

Annotations
@Override
getEntitySuffixback to summary
public String getEntitySuffix(String alias)

Implements org.hibernate.query.sql.internal.SQLQueryParser.ParserContext.getEntitySuffix.

Annotations
@Override
getOwnerAliasback to summary
public String getOwnerAlias(String alias)
getPropertyResultsMapback to summary
public Map<String, String[]> getPropertyResultsMap(String alias)

Implements org.hibernate.query.sql.internal.SQLQueryParser.ParserContext.getPropertyResultsMap.

Annotations
@Override
getSQLLoadableback to summary
private SQLLoadable getSQLLoadable(String entityName) throws MappingException

Deprecated

as a consequence of SQLLoadable being deprecated. See corresponding docs for further information.

internalGetPropertyResultsMapback to summary
private Map<String, String[]> internalGetPropertyResultsMap(String alias)
isCollectionAliasback to summary
public boolean isCollectionAlias(String alias)

Implements org.hibernate.query.sql.internal.SQLQueryParser.ParserContext.isCollectionAlias.

Annotations
@Override
isEntityAliasback to summary
public boolean isEntityAlias(String alias)

Implements org.hibernate.query.sql.internal.SQLQueryParser.ParserContext.isEntityAlias.

Annotations
@Override
processback to summary
public SQLQueryParser.ParserContext process()
processConstructorReturnback to summary
private void processConstructorReturn(NativeQuery.InstantiationResultNode<?> rtn)
processFetchBuilderback to summary
private void processFetchBuilder(String attributeName, FetchBuilder fetchBuilder)
processFetchReturnback to summary
private void processFetchReturn(NativeQuery.FetchReturn fetchReturn)
processPropertyReturnback to summary
private void processPropertyReturn(NativeQuery.ReturnableResultNode rtn)
processReturnback to summary
private void processReturn(NativeQuery.ResultNode rtn)
processRootReturnback to summary
private void processRootReturn(NativeQuery.RootReturn rootReturn)
processScalarReturnback to summary
private void processScalarReturn(NativeQuery.ReturnProperty typeReturn)