Class ResultSetMappingImpl
java.lang.Object
org.hibernate.query.results.internal.ResultSetMappingImpl
- All Implemented Interfaces:
ResultSetMapping
,JdbcValuesMappingProducer
ResultSetMapping implementation used while building
ResultSetMapping references.
-
Constructor Summary
ConstructorsConstructorDescriptionResultSetMappingImpl
(String mappingIdentifier) ResultSetMappingImpl
(String mappingIdentifier, boolean isDynamic) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAffectedTableNames
(Set<String> affectedTableNames, SessionFactoryImplementor sessionFactory) void
addLegacyFetchBuilder
(LegacyFetchBuilder fetchBuilder) Add a legacy fetch buildervoid
addResultBuilder
(ResultBuilder resultBuilder) Add a builderboolean
An identifier for the mappingint
The number of result builders currently associated with this mappingThe result builders currently associated with this mappingint
hashCode()
boolean
Indicates whether the mapping is dynamic perResultSetMapping
resolve
(JdbcValuesMetadata jdbcResultsMetadata, LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory) Resolve the JdbcValuesMapping.Create a memento from this mapping.void
visitLegacyFetchBuilders
(Consumer<LegacyFetchBuilder> resultBuilderConsumer) Visit the "legacy" fetch builders.void
visitResultBuilders
(BiConsumer<Integer, ResultBuilder> resultBuilderConsumer) Visit each result builder
-
Constructor Details
-
ResultSetMappingImpl
-
ResultSetMappingImpl
-
-
Method Details
-
getMappingIdentifier
Description copied from interface:ResultSetMapping
An identifier for the mapping- Specified by:
getMappingIdentifier
in interfaceResultSetMapping
-
isDynamic
public boolean isDynamic()Description copied from interface:ResultSetMapping
Indicates whether the mapping is dynamic perResultSetMapping
- Specified by:
isDynamic
in interfaceResultSetMapping
-
getNumberOfResultBuilders
public int getNumberOfResultBuilders()Description copied from interface:ResultSetMapping
The number of result builders currently associated with this mapping- Specified by:
getNumberOfResultBuilders
in interfaceResultSetMapping
-
getResultBuilders
Description copied from interface:ResultSetMapping
The result builders currently associated with this mapping- Specified by:
getResultBuilders
in interfaceResultSetMapping
-
visitResultBuilders
Description copied from interface:ResultSetMapping
Visit each result builder- Specified by:
visitResultBuilders
in interfaceResultSetMapping
-
visitLegacyFetchBuilders
Description copied from interface:ResultSetMapping
Visit the "legacy" fetch builders. Historically these mappings in Hibernate were defined such that results and fetches are unaware of each other. So whileResultBuilder
encapsulates the fetches (seeResultBuilder.visitFetchBuilders(java.util.function.BiConsumer<org.hibernate.sql.results.graph.Fetchable, org.hibernate.query.results.FetchBuilder>)
), fetches defined in the legacy way are unassociated to their "parent".- Specified by:
visitLegacyFetchBuilders
in interfaceResultSetMapping
-
addResultBuilder
Description copied from interface:ResultSetMapping
Add a builder- Specified by:
addResultBuilder
in interfaceResultSetMapping
-
addLegacyFetchBuilder
Description copied from interface:ResultSetMapping
Add a legacy fetch builder- Specified by:
addLegacyFetchBuilder
in interfaceResultSetMapping
-
addAffectedTableNames
public void addAffectedTableNames(Set<String> affectedTableNames, SessionFactoryImplementor sessionFactory) - Specified by:
addAffectedTableNames
in interfaceJdbcValuesMappingProducer
-
resolve
public JdbcValuesMapping resolve(JdbcValuesMetadata jdbcResultsMetadata, LoadQueryInfluencers loadQueryInfluencers, SessionFactoryImplementor sessionFactory) Description copied from interface:JdbcValuesMappingProducer
Resolve the JdbcValuesMapping. This involves resolving theDomainResult
andFetch
- Specified by:
resolve
in interfaceJdbcValuesMappingProducer
-
toMemento
Description copied from interface:ResultSetMapping
Create a memento from this mapping.- Specified by:
toMemento
in interfaceResultSetMapping
-
cacheKeyInstance
- Specified by:
cacheKeyInstance
in interfaceJdbcValuesMappingProducer
-
hashCode
public int hashCode() -
equals
-