Top Description Methods
org.hibernate.query.results

public Interface ResultSetMapping

extends JdbcValuesMappingProducer
Known Direct Implementers
org.hibernate.query.results.ResultSetMappingImpl
Annotations
@Incubating
Imports
java.util.List, java.util.function.BiConsumer, .Consumer, org.hibernate.Incubating, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.query.NativeQuery, org.hibernate.query.named.NamedResultSetMappingMemento, org.hibernate.query.results.dynamic.DynamicFetchBuilderLegacy, org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducer

Acts as the JdbcValuesMappingProducer for NativeQuery or org.hibernate.procedure.ProcedureCall / jakarta.persistence.StoredProcedureQuery instances. These mappings can be defined
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public void
addLegacyFetchBuilder(DynamicFetchBuilderLegacy fetchBuilder)

Add a legacy fetch builder

public void
addResultBuilder(ResultBuilder resultBuilder)

Add a builder

public String
getMappingIdentifier()

An identifier for the mapping

public int
getNumberOfResultBuilders()

The number of result builders currently associated with this mapping

public List<ResultBuilder>
getResultBuilders()

The result builders currently associated with this mapping

public boolean
isDynamic()

Indicates whether the mapping is dynamic per ResultSetMapping

public static ResultSetMapping
resolveResultSetMapping(String name, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public static ResultSetMapping
resolveResultSetMapping(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
public NamedResultSetMappingMemento
toMemento(String name)

Create a memento from this mapping.

public void
visitLegacyFetchBuilders(Consumer<DynamicFetchBuilderLegacy> resultBuilderConsumer)

Visit the "legacy" fetch builders.

public void
visitResultBuilders(BiConsumer<Integer, ResultBuilder> resultBuilderConsumer)

Visit each result builder

Inherited from org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingProducer:
addAffectedTableNamescacheKeyInstanceresolve

Method Detail

addLegacyFetchBuilderback to summary
public void addLegacyFetchBuilder(DynamicFetchBuilderLegacy fetchBuilder)

Add a legacy fetch builder

addResultBuilderback to summary
public void addResultBuilder(ResultBuilder resultBuilder)

Add a builder

getMappingIdentifierback to summary
public String getMappingIdentifier()

An identifier for the mapping

getNumberOfResultBuildersback to summary
public int getNumberOfResultBuilders()

The number of result builders currently associated with this mapping

getResultBuildersback to summary
public List<ResultBuilder> getResultBuilders()

The result builders currently associated with this mapping

isDynamicback to summary
public boolean isDynamic()

Indicates whether the mapping is dynamic per ResultSetMapping

resolveResultSetMappingback to summary
public static ResultSetMapping resolveResultSetMapping(String name, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

resolveResultSetMappingback to summary
public static ResultSetMapping resolveResultSetMapping(String name, boolean isDynamic, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

toMementoback to summary
public NamedResultSetMappingMemento toMemento(String name)

Create a memento from this mapping.

visitLegacyFetchBuildersback to summary
public 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 while ResultBuilder encapsulates the fetches (see ResultBuilder#visitFetchBuilders), fetches defined in the legacy way are unassociated to their "parent".

visitResultBuildersback to summary
public void visitResultBuilders(BiConsumer<Integer, ResultBuilder> resultBuilderConsumer)

Visit each result builder