Package org.hibernate.query.results
Interface ResultSetMapping
-
- All Superinterfaces:
JdbcValuesMappingProducer
- All Known Implementing Classes:
ResultSetMappingImpl
@Incubating public interface ResultSetMapping extends JdbcValuesMappingProducer
Acts as theJdbcValuesMappingProducerforNativeQueryorProcedureCall/StoredProcedureQueryinstances. These mappings can be defined-
statically via
SqlResultSetMappingor `hbm.xml` mapping - dynamically via Hibernate-specific APIs:
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddLegacyFetchBuilder(DynamicFetchBuilderLegacy fetchBuilder)Add a legacy fetch buildervoidaddResultBuilder(ResultBuilder resultBuilder)Add a builderStringgetMappingIdentifier()An identifier for the mappingintgetNumberOfResultBuilders()The number of result builders currently associated with this mappingList<ResultBuilder>getResultBuilders()The result builders currently associated with this mappingbooleanisDynamic()Indicates whether the mapping is dynamic perResultSetMappingstatic ResultSetMappingresolveResultSetMapping(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory)static ResultSetMappingresolveResultSetMapping(String name, SessionFactoryImplementor sessionFactory)NamedResultSetMappingMementotoMemento(String name)Create a memento from this mapping.voidvisitLegacyFetchBuilders(Consumer<DynamicFetchBuilderLegacy> resultBuilderConsumer)Visit the "legacy" fetch builders.voidvisitResultBuilders(BiConsumer<Integer,ResultBuilder> resultBuilderConsumer)Visit each result builder-
Methods inherited from interface org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducer
addAffectedTableNames, cacheKeyInstance, resolve
-
-
-
-
Method Detail
-
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
void visitResultBuilders(BiConsumer<Integer,ResultBuilder> resultBuilderConsumer)
Visit each result builder
-
visitLegacyFetchBuilders
void visitLegacyFetchBuilders(Consumer<DynamicFetchBuilderLegacy> resultBuilderConsumer)
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
void addResultBuilder(ResultBuilder resultBuilder)
Add a builder
-
addLegacyFetchBuilder
void addLegacyFetchBuilder(DynamicFetchBuilderLegacy fetchBuilder)
Add a legacy fetch builder
-
toMemento
NamedResultSetMappingMemento toMemento(String name)
Create a memento from this mapping.
-
resolveResultSetMapping
static ResultSetMapping resolveResultSetMapping(String name, SessionFactoryImplementor sessionFactory)
-
resolveResultSetMapping
static ResultSetMapping resolveResultSetMapping(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory)
-
-