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:
SqlResultSetMappingorm.xmlmapping.xmlhbm.xml- Hibernate-specific APIs:
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLegacyFetchBuilder(LegacyFetchBuilder fetchBuilder) Add a legacy fetch buildervoidaddResultBuilder(ResultBuilder resultBuilder) Add a builderAn identifier for the mappingintThe number of result builders currently associated with this mappingThe result builders currently associated with this mappingbooleanIndicates whether the mapping is dynamic perResultSetMappingstatic ResultSetMappingresolveResultSetMapping(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory) static ResultSetMappingresolveResultSetMapping(String name, SessionFactoryImplementor sessionFactory) Create a memento from this mapping.voidvisitLegacyFetchBuilders(Consumer<LegacyFetchBuilder> resultBuilderConsumer) Visit the "legacy" fetch builders.voidvisitResultBuilders(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 whileResultBuilderencapsulates 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)
-