Package org.hibernate.query.results
Interface ResultSetMapping
- All Superinterfaces:
JdbcValuesMappingProducer
- All Known Implementing Classes:
ResultSetMappingImpl
Acts as the
JdbcValuesMappingProducer for NativeQuery
or ProcedureCall / StoredProcedureQuery
instances. These mappings can be defined-
statically via
SqlResultSetMappingor `hbm.xml` mapping - dynamically via Hibernate-specific APIs:
- Author:
- Steve Ebersole
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddLegacyFetchBuilder(DynamicFetchBuilderLegacy 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<DynamicFetchBuilderLegacy> 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<java.lang.String, 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)
-