Interface NamedResultSetMappingMemento
Used to keep information about named result mappings defined by the
application which can then be applied to native-sql and stored-procedure
queries.
These can be defined in a number of ways:
SqlResultSetMapping- JPA Class-based mapping
- Hibernate's legacy XML-defined mapping
-
Method Summary
Modifier and TypeMethodDescription<R> booleancanBeTreatedAsResultSetMapping(Class<R> resultType, SessionFactory sessionFactory) Whether the "inferred result type is assignable to the given Java type".getName()The name associated with this mementoObtain the memento for each result in the mapping.voidresolve(ResultSetMapping resultSetMapping, Consumer<String> querySpaceConsumer, org.hibernate.query.internal.ResultSetMappingResolutionContext context) Resolve this memento.<R> jakarta.persistence.sql.ResultSetMapping<R> toJpaMapping(SessionFactory sessionFactory) Converts this named mapping into a ResultSetMapping.
-
Method Details
-
getName
String getName()The name associated with this memento -
getResultMementos
List<ResultMemento> getResultMementos()Obtain the memento for each result in the mapping. -
resolve
void resolve(ResultSetMapping resultSetMapping, Consumer<String> querySpaceConsumer, org.hibernate.query.internal.ResultSetMappingResolutionContext context) Resolve this memento. This involves buildingResultBuilderinstances for each defined result and registering them with the passedresultSetMapping. Any known query spaces should be passed to thequerySpaceConsumer. -
canBeTreatedAsResultSetMapping
Whether the "inferred result type is assignable to the given Java type".- Since:
- 8.0
- See Also:
-
toJpaMapping
Converts this named mapping into a ResultSetMapping.- Since:
- 8.0
- See Also:
-