Package org.hibernate.query.results
Interface ResultSetMapping
- All Superinterfaces:
JdbcValuesMappingProducer
- All Known Implementing Classes:
ResultSetMappingImpl
JdbcValuesMappingProducer implementation based on a graph of ResultBuilder
and FetchBuilder reference. Used to model result-set mappings from:
SqlResultSetMapping
orm.xml
mapping.xml
hbm.xml
- Hibernate-specific APIs:
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLegacyFetchBuilder
(LegacyFetchBuilder fetchBuilder) Add a legacy fetch buildervoid
addResultBuilder
(ResultBuilder resultBuilder) Add a builderAn identifier for the mappingint
The number of result builders currently associated with this mappingThe result builders currently associated with this mappingboolean
Indicates whether the mapping is dynamic perResultSetMapping
static ResultSetMapping
resolveResultSetMapping
(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory) static ResultSetMapping
resolveResultSetMapping
(String name, SessionFactoryImplementor sessionFactory) 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 builderMethods inherited from interface org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducer
addAffectedTableNames, cacheKeyInstance, resolve
-
Method Details
-
getMappingIdentifier
String getMappingIdentifier()An identifier for the mapping -
isDynamic
boolean isDynamic()Indicates whether the mapping is dynamic perResultSetMapping
-
getNumberOfResultBuilders
int getNumberOfResultBuilders()The number of result builders currently associated with this mapping -
getResultBuilders
List<ResultBuilder> getResultBuilders()The result builders currently associated with this mapping -
visitResultBuilders
Visit each result builder -
visitLegacyFetchBuilders
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". -
addResultBuilder
Add a builder -
addLegacyFetchBuilder
Add a legacy fetch builder -
toMemento
Create a memento from this mapping. -
resolveResultSetMapping
static ResultSetMapping resolveResultSetMapping(String name, SessionFactoryImplementor sessionFactory) -
resolveResultSetMapping
static ResultSetMapping resolveResultSetMapping(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory)
-