Package org.hibernate.query.results
Interface ResultSetMapping
-
- All Superinterfaces:
JdbcValuesMappingProducer
- All Known Implementing Classes:
ResultSetMappingImpl
@Incubating public interface ResultSetMapping extends JdbcValuesMappingProducer
Acts as theJdbcValuesMappingProducer
forNativeQuery
orProcedureCall
/StoredProcedureQuery
instances. These mappings can be defined-
statically via
SqlResultSetMapping
or `hbm.xml` mapping - dynamically via Hibernate-specific APIs:
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addLegacyFetchBuilder(DynamicFetchBuilderLegacy fetchBuilder)
Add a legacy fetch buildervoid
addResultBuilder(ResultBuilder resultBuilder)
Add a builderString
getMappingIdentifier()
An identifier for the mappingint
getNumberOfResultBuilders()
The number of result builders currently associated with this mappingList<ResultBuilder>
getResultBuilders()
The result builders currently associated with this mappingboolean
isDynamic()
Indicates whether the mapping is dynamic perResultSetMapping
static ResultSetMapping
resolveResultSetMapping(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory)
static ResultSetMapping
resolveResultSetMapping(String name, SessionFactoryImplementor sessionFactory)
NamedResultSetMappingMemento
toMemento(String name)
Create a memento from this mapping.void
visitLegacyFetchBuilders(Consumer<DynamicFetchBuilderLegacy> resultBuilderConsumer)
Visit the "legacy" fetch builders.void
visitResultBuilders(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 whileResultBuilder
encapsulates 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)
-
-