Class StageStatelessSessionImpl
java.lang.Object
org.hibernate.reactive.stage.impl.StageStatelessSessionImpl
- All Implemented Interfaces:
Stage.Closeable,Stage.QueryProducer,Stage.StatelessSession
Implements the
Stage.StatelessSession API. This delegating
class is needed to avoid name clashes when implementing both
StatelessSession and StatelessSession.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclose()Close the reactive session and release the underlying database connection.<T> jakarta.persistence.EntityGraph<T>createEntityGraph(Class<T> rootType) Create a new mutableEntityGraph<T> jakarta.persistence.EntityGraph<T>createEntityGraph(Class<T> rootType, String graphName) Create a new mutable copy of a namedEntityGraphcreateMutationQuery(jakarta.persistence.criteria.CriteriaDelete<?> deleteQuery) Create an instance ofStage.MutationQueryfor the given delete tree.createMutationQuery(jakarta.persistence.criteria.CriteriaUpdate<?> updateQuery) Create an instance ofStage.MutationQueryfor the given update tree.createMutationQuery(String queryString) Create an instance ofStage.MutationQueryfor the given HQL/JPQL update or delete statement.createMutationQuery(org.hibernate.query.criteria.JpaCriteriaInsert<?> insert) Create aStage.MutationQueryfrom the given insert select criteria tree<R> Stage.Query<R>createNamedQuery(String queryName) Create an instance ofStage.Queryfor the named query.<R> Stage.SelectionQuery<R>createNamedQuery(String queryName, Class<R> resultType) Create an instance ofStage.SelectionQueryfor the named query.<R> Stage.Query<R>createNativeQuery(String queryString) Create an instance ofStage.Queryfor the given SQL query string, or SQL update, insert, or delete statement.<R> Stage.SelectionQuery<R>createNativeQuery(String queryString, Class<R> resultType) Create an instance ofStage.Queryfor the given SQL query string, using the givenresultTypeto interpret the results.<R> Stage.SelectionQuery<R>createNativeQuery(String queryString, Class<R> resultType, AffectedEntities affectedEntities) Create an instance ofStage.SelectionQueryfor the given SQL query string, using the givenresultTypeto interpret the results.<R> Stage.Query<R>createNativeQuery(String queryString, AffectedEntities affectedEntities) Create an instance ofStage.Queryfor the given SQL query string, or SQL update, insert, or delete statement.<R> Stage.SelectionQuery<R>createNativeQuery(String queryString, ResultSetMapping<R> resultSetMapping) Create an instance ofStage.SelectionQueryfor the given SQL query string, using the givenResultSetMappingto interpret the result set.<R> Stage.SelectionQuery<R>createNativeQuery(String queryString, ResultSetMapping<R> resultSetMapping, AffectedEntities affectedEntities) Create an instance ofStage.SelectionQueryfor the given SQL query string, using the givenResultSetMappingto interpret the result set.createQuery(jakarta.persistence.criteria.CriteriaDelete<R> criteriaDelete) Create an instance ofStage.MutationQueryfor the given criteria delete.<R> Stage.SelectionQuery<R>createQuery(jakarta.persistence.criteria.CriteriaQuery<R> criteriaQuery) Create an instance ofStage.SelectionQueryfor the given criteria query.createQuery(jakarta.persistence.criteria.CriteriaUpdate<R> criteriaUpdate) Create an instance ofStage.MutationQueryfor the given criteria update.<R> Stage.Query<R>createQuery(jakarta.persistence.TypedQueryReference<R> typedQueryReference) Create a typedStage.Queryinstance for the given typed query reference.<R> Stage.Query<R>createQuery(String queryString) Deprecated.<R> Stage.SelectionQuery<R>createQuery(String queryString, Class<R> resultType) Create an instance ofStage.SelectionQueryfor the given HQL/JPQL query string and query result type.<R> Stage.SelectionQuery<R>createSelectionQuery(String queryString, Class<R> resultType) Create an instance ofStage.SelectionQueryfor the given HQL/JPQL query string.Obtain the transaction currently associated with this session, if any.Delete multiple rows.Delete a row.Delete multiple rows, using the number of the given entities as the batch size.deleteMultiple(List<?> entities) Delete multiple rows, using the size of the given list as the batch size.<T> CompletionStage<T>fetch(T association) Asynchronously fetch an association that's configured for lazy loading.<T> CompletionStage<T>Retrieve a row, using the givenEntityGraphas a fetch plan.<T> CompletionStage<T>Retrieve a row.<T> CompletionStage<List<T>>Retrieve multiple rows.<T> CompletionStage<T>Retrieve a row, obtaining the specified lock mode.jakarta.persistence.criteria.CriteriaBuilderConvenience method to obtain theCriteriaBuilder.<T> jakarta.persistence.EntityGraph<T>getEntityGraph(Class<T> rootType, String graphName) Obtain a namedEntityGraphTheStage.SessionFactorywhich created this session.getIdentifier(Object entity) Return the identifier value of the given entity, which may be detached.<T> ResultSetMapping<T>getResultSetMapping(Class<T> resultType, String mappingName) Obtain a native SQL result set mapping defined via the annotationSqlResultSetMapping.Insert multiple rows.Insert a row.Insert multiple rows, using the number of the given entities as the batch size.insertMultiple(List<?> entities) Insert multiple rows, using the size of the given list as the batch size.booleanisOpen()Refresh the entity instance state from the database.Refresh the entity instance state from the database.Refresh the entity instance state from the database, using the number of the given entities as the batch size.Refresh the entity instance state from the database.refreshMultiple(List<?> entities) Refresh the entity instance state from the database, using the size of the given list as the batch size.Update multiple rows.Update a row.Update multiple rows, using the number of the given entities as the batch size.updateMultiple(List<?> entities) Update multiple rows, using the size of the given list as the batch size.Use a SQLmerge intostatement to perform an upsert on multiple rows using the specified batch size.Use a SQLmerge intostatement to perform an upsert on multiple rows using the size of the given array as batch size.upsertMultiple(List<?> entities) Use a SQLmerge intostatement to perform an upsert on multiple rows using the size of the given list as batch size.<T> CompletionStage<T>Performs the given work within the scope of a database transaction, automatically flushing the session.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.reactive.stage.Stage.StatelessSession
get, refresh
-
Constructor Details
-
StageStatelessSessionImpl
-
-
Method Details
-
getReactiveConnection
-
get
Description copied from interface:Stage.StatelessSessionRetrieve a row.- Specified by:
getin interfaceStage.StatelessSession- Parameters:
entityClass- The class of the entity to retrieveid- The id of the entity to retrieve- Returns:
- a detached entity instance, via a
CompletionStage - See Also:
-
StatelessSession.get(Class, Object)
-
get
Description copied from interface:Stage.StatelessSessionRetrieve multiple rows.- Specified by:
getin interfaceStage.StatelessSession- Parameters:
entityClass- The class of the entity to retrieveids- The ids of the entities to retrieve- Returns:
- a list of detached entity instances, via a
Uni - See Also:
-
StatelessSession.getMultiple(Class, List)
-
get
Description copied from interface:Stage.StatelessSessionRetrieve a row, obtaining the specified lock mode.- Specified by:
getin interfaceStage.StatelessSession- Parameters:
entityClass- The class of the entity to retrieveid- The id of the entity to retrievelockMode- The lock mode to apply to the entity- Returns:
- a detached entity instance, via a
CompletionStage - See Also:
-
StatelessSession.get(Class, Object, LockMode)
-
insert
Description copied from interface:Stage.StatelessSessionInsert a row.- Specified by:
insertin interfaceStage.StatelessSession- Parameters:
entity- a new transient instance- See Also:
-
StatelessSession.insert(Object)
-
insert
Description copied from interface:Stage.StatelessSessionInsert multiple rows, using the number of the given entities as the batch size.- Specified by:
insertin interfaceStage.StatelessSession- Parameters:
entities- new transient instances- See Also:
-
StatelessSession.insert(Object)
-
insert
Description copied from interface:Stage.StatelessSessionInsert multiple rows.- Specified by:
insertin interfaceStage.StatelessSession- Parameters:
batchSize- the batch sizeentities- new transient instances- See Also:
-
StatelessSession.insert(Object)
-
insertMultiple
Description copied from interface:Stage.StatelessSessionInsert multiple rows, using the size of the given list as the batch size.- Specified by:
insertMultiplein interfaceStage.StatelessSession- Parameters:
entities- new transient instances- See Also:
-
StatelessSession.insert(Object)
-
delete
Description copied from interface:Stage.StatelessSessionDelete a row.- Specified by:
deletein interfaceStage.StatelessSession- Parameters:
entity- a detached entity instance- See Also:
-
StatelessSession.delete(Object)
-
delete
Description copied from interface:Stage.StatelessSessionDelete multiple rows, using the number of the given entities as the batch size.- Specified by:
deletein interfaceStage.StatelessSession- Parameters:
entities- detached entity instances- See Also:
-
StatelessSession.delete(Object)
-
delete
Description copied from interface:Stage.StatelessSessionDelete multiple rows.- Specified by:
deletein interfaceStage.StatelessSession- Parameters:
batchSize- the batch sizeentities- detached entity instances- See Also:
-
StatelessSession.delete(Object)
-
deleteMultiple
Description copied from interface:Stage.StatelessSessionDelete multiple rows, using the size of the given list as the batch size.- Specified by:
deleteMultiplein interfaceStage.StatelessSession- Parameters:
entities- detached entity instances- See Also:
-
StatelessSession.delete(Object)
-
update
Description copied from interface:Stage.StatelessSessionUpdate a row.- Specified by:
updatein interfaceStage.StatelessSession- Parameters:
entity- a detached entity instance- See Also:
-
StatelessSession.update(Object)
-
update
Description copied from interface:Stage.StatelessSessionUpdate multiple rows, using the number of the given entities as the batch size.- Specified by:
updatein interfaceStage.StatelessSession- Parameters:
entities- a detached entity instance- See Also:
-
StatelessSession.update(Object)
-
update
Description copied from interface:Stage.StatelessSessionUpdate multiple rows.- Specified by:
updatein interfaceStage.StatelessSession- Parameters:
batchSize- the batch sizeentities- a detached entity instance- See Also:
-
StatelessSession.update(Object)
-
updateMultiple
Description copied from interface:Stage.StatelessSessionUpdate multiple rows, using the size of the given list as the batch size.- Specified by:
updateMultiplein interfaceStage.StatelessSession- Parameters:
entities- a detached entity instance- See Also:
-
StatelessSession.update(Object)
-
refresh
Description copied from interface:Stage.StatelessSessionRefresh the entity instance state from the database.- Specified by:
refreshin interfaceStage.StatelessSession- Parameters:
entity- The entity to be refreshed.- See Also:
-
StatelessSession.refresh(Object)
-
refresh
Description copied from interface:Stage.StatelessSessionRefresh the entity instance state from the database, using the number of the given entities as the batch size.- Specified by:
refreshin interfaceStage.StatelessSession- Parameters:
entities- The entities to be refreshed.- See Also:
-
StatelessSession.refresh(Object)
-
refresh
Description copied from interface:Stage.StatelessSessionRefresh the entity instance state from the database.- Specified by:
refreshin interfaceStage.StatelessSession- Parameters:
batchSize- the batch sizeentities- The entities to be refreshed.- See Also:
-
StatelessSession.refresh(Object)
-
refreshMultiple
Description copied from interface:Stage.StatelessSessionRefresh the entity instance state from the database, using the size of the given list as the batch size.- Specified by:
refreshMultiplein interfaceStage.StatelessSession- Parameters:
entities- The entities to be refreshed.- See Also:
-
StatelessSession.refresh(Object)
-
refresh
Description copied from interface:Stage.StatelessSessionRefresh the entity instance state from the database.- Specified by:
refreshin interfaceStage.StatelessSession- Parameters:
entity- The entity to be refreshed.lockMode- The LockMode to be applied.- See Also:
-
StatelessSession.refresh(Object, LockMode)
-
upsert
- Specified by:
upsertin interfaceStage.StatelessSession- Parameters:
entity- a detached entity instance- See Also:
-
StatelessSession.upsert(Object)
-
upsertAll
Description copied from interface:Stage.StatelessSessionUse a SQLmerge intostatement to perform an upsert on multiple rows using the size of the given array as batch size.- Specified by:
upsertAllin interfaceStage.StatelessSession- Parameters:
entities- the entities to upsert- See Also:
-
StatelessSession.upsert(Object)
-
upsertAll
Description copied from interface:Stage.StatelessSessionUse a SQLmerge intostatement to perform an upsert on multiple rows using the specified batch size.- Specified by:
upsertAllin interfaceStage.StatelessSession- Parameters:
batchSize- the batch sizeentities- the list of entities to upsert- See Also:
-
StatelessSession.upsert(Object)
-
upsertMultiple
Description copied from interface:Stage.StatelessSessionUse a SQLmerge intostatement to perform an upsert on multiple rows using the size of the given list as batch size.- Specified by:
upsertMultiplein interfaceStage.StatelessSession- Parameters:
entities- the entities to upsert- See Also:
-
StatelessSession.upsert(Object)
-
fetch
Description copied from interface:Stage.StatelessSessionAsynchronously fetch an association that's configured for lazy loading.
Warning: this operation in a stateless session is quite sensitive to data aliasing effects and should be used with great care.session.fetch(author.getBook()).thenAccept(book -> print(book.getTitle()))- Specified by:
fetchin interfaceStage.StatelessSession- Parameters:
association- a lazy-loaded association- Returns:
- the fetched association, via a
CompletionStage - See Also:
-
Hibernate.initialize(Object)
-
getIdentifier
Description copied from interface:Stage.StatelessSessionReturn the identifier value of the given entity, which may be detached.- Specified by:
getIdentifierin interfaceStage.StatelessSession- Parameters:
entity- a persistent instance associated with this session- Returns:
- the identifier
-
withTransaction
Description copied from interface:Stage.StatelessSessionPerforms the given work within the scope of a database transaction, automatically flushing the session. The transaction will be rolled back if the work completes with an uncaught exception, or ifStage.Transaction.markForRollback()is called.- If there is already a transaction associated with this session, the work is executed in the context of the existing transaction, and no new transaction is initiated.
- If there is no transaction associated with this session, a new transaction is started, and the work is executed in the context of the new transaction.
- Specified by:
withTransactionin interfaceStage.StatelessSession- Parameters:
work- a function which acceptsStage.Transactionand returns the result of the work as aCompletionStage.- See Also:
-
close
Description copied from interface:Stage.StatelessSessionClose the reactive session and release the underlying database connection.- Specified by:
closein interfaceStage.Closeable- Specified by:
closein interfaceStage.StatelessSession
-
isOpen
public boolean isOpen()- Specified by:
isOpenin interfaceStage.StatelessSession- Returns:
- false if
Stage.StatelessSession.close()has been called
-
getFactory
Description copied from interface:Stage.StatelessSessionTheStage.SessionFactorywhich created this session.- Specified by:
getFactoryin interfaceStage.StatelessSession
-
getCriteriaBuilder
public jakarta.persistence.criteria.CriteriaBuilder getCriteriaBuilder()Description copied from interface:Stage.StatelessSessionConvenience method to obtain theCriteriaBuilder.- Specified by:
getCriteriaBuilderin interfaceStage.QueryProducer- Specified by:
getCriteriaBuilderin interfaceStage.StatelessSession
-
currentTransaction
Description copied from interface:Stage.StatelessSessionObtain the transaction currently associated with this session, if any.- Specified by:
currentTransactionin interfaceStage.StatelessSession- Returns:
- the
Stage.Transaction, or null if no transaction was started usingStage.StatelessSession.withTransaction(Function). - See Also:
-
get
Description copied from interface:Stage.StatelessSessionRetrieve a row, using the givenEntityGraphas a fetch plan.- Specified by:
getin interfaceStage.StatelessSession- Parameters:
entityGraph- anEntityGraphspecifying the entity and associations to be fetchedid- The id of the entity to retrieve- Returns:
- a detached entity instance, via a
CompletionStage
-
createQuery
Deprecated.Description copied from interface:Stage.QueryProducerCreate an instance ofStage.Queryfor the given HQL/JPQL query string or HQL/JPQL update or delete statement. In the case of an update or delete, the returnedStage.Querymust be executed usingStage.MutationQuery.executeUpdate()which returns an affected row count.- Specified by:
createQueryin interfaceStage.QueryProducer- Parameters:
queryString- The HQL/JPQL query, update or delete statement- Returns:
- The
Stage.Queryinstance for manipulation and execution - See Also:
-
EntityManager.createQuery(String)
-
createQuery
public <R> Stage.Query<R> createQuery(jakarta.persistence.TypedQueryReference<R> typedQueryReference) Description copied from interface:Stage.QueryProducerCreate a typedStage.Queryinstance for the given typed query reference.- Specified by:
createQueryin interfaceStage.QueryProducer- Parameters:
typedQueryReference- the type query reference- Returns:
- The
Stage.Queryinstance for execution - See Also:
-
QueryProducer.createQuery(TypedQueryReference)
-
createSelectionQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.SelectionQueryfor the given HQL/JPQL query string.- Specified by:
createSelectionQueryin interfaceStage.QueryProducer- Parameters:
queryString- The HQL/JPQL query- Returns:
- The
Stage.SelectionQueryinstance for manipulation and execution - See Also:
-
EntityManager.createQuery(String, Class)
-
createMutationQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.MutationQueryfor the given HQL/JPQL update or delete statement.- Specified by:
createMutationQueryin interfaceStage.QueryProducer- Parameters:
queryString- The HQL/JPQL query, update or delete statement- Returns:
- The
Stage.MutationQueryinstance for manipulation and execution - See Also:
-
EntityManager.createQuery(String)
-
createMutationQuery
public Stage.MutationQuery createMutationQuery(jakarta.persistence.criteria.CriteriaUpdate<?> updateQuery) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.MutationQueryfor the given update tree.- Specified by:
createMutationQueryin interfaceStage.QueryProducer- Parameters:
updateQuery- the update criteria query- Returns:
- The
Stage.MutationQueryinstance for manipulation and execution - See Also:
-
QueryProducer.createMutationQuery(CriteriaUpdate)
-
createMutationQuery
public Stage.MutationQuery createMutationQuery(jakarta.persistence.criteria.CriteriaDelete<?> deleteQuery) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.MutationQueryfor the given delete tree.- Specified by:
createMutationQueryin interfaceStage.QueryProducer- Parameters:
deleteQuery- the delete criteria query- Returns:
- The
Stage.MutationQueryinstance for manipulation and execution - See Also:
-
QueryProducer.createMutationQuery(CriteriaDelete)
-
createMutationQuery
public Stage.MutationQuery createMutationQuery(org.hibernate.query.criteria.JpaCriteriaInsert<?> insert) Description copied from interface:Stage.QueryProducerCreate aStage.MutationQueryfrom the given insert select criteria tree- Specified by:
createMutationQueryin interfaceStage.QueryProducer- Parameters:
insert- the insert select criteria query- Returns:
- The
Stage.MutationQueryinstance for manipulation and execution - See Also:
-
QueryProducer.createMutationQuery(JpaCriteriaInsert)
-
createQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.SelectionQueryfor the given HQL/JPQL query string and query result type.- Specified by:
createQueryin interfaceStage.QueryProducer- Parameters:
queryString- The HQL/JPQL queryresultType- the Java type returned in each row of query results- Returns:
- The
Stage.Queryinstance for manipulation and execution - See Also:
-
EntityManager.createQuery(String, Class)
-
createNativeQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.Queryfor the given SQL query string, or SQL update, insert, or delete statement. In the case of an update, insert, or delete, the returnedStage.Querymust be executed usingStage.MutationQuery.executeUpdate()which returns an affected row count. In the case of a query:- If the result set has a single column, the results will be returned as scalars.
- Otherwise, if the result set has multiple columns, the results will
be returned as elements of arrays of type
Object[].
- Specified by:
createNativeQueryin interfaceStage.QueryProducer- Parameters:
queryString- The SQL select, update, insert, or delete statement
-
createNativeQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.Queryfor the given SQL query string, or SQL update, insert, or delete statement. In the case of an update, insert, or delete, the returnedStage.Querymust be executed usingStage.MutationQuery.executeUpdate()which returns an affected row count. In the case of a query:- If the result set has a single column, the results will be returned as scalars.
- Otherwise, if the result set has multiple columns, the results will
be returned as elements of arrays of type
Object[].
affected entitiesare synchronized with the database before execution of the statement.- Specified by:
createNativeQueryin interfaceStage.QueryProducer- Parameters:
queryString- The SQL select, update, insert, or delete statementaffectedEntities- The entities which are affected by the statement
-
createNamedQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.Queryfor the named query.- Specified by:
createNamedQueryin interfaceStage.QueryProducer- Parameters:
queryName- The name of the query- Returns:
- The
Stage.Queryinstance for manipulation and execution - See Also:
-
EntityManager.createQuery(String)
-
createNamedQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.SelectionQueryfor the named query.- Specified by:
createNamedQueryin interfaceStage.QueryProducer- Parameters:
queryName- The name of the queryresultType- the Java type returned in each row of query results- Returns:
- The
Stage.SelectionQueryinstance for manipulation and execution - See Also:
-
EntityManager.createQuery(String, Class)
-
createNativeQuery
Description copied from interface:Stage.QueryProducerCreate an instance ofStage.Queryfor the given SQL query string, using the givenresultTypeto interpret the results.- If the given result type is
Object, or a built-in type such asStringorInteger, the result set must have a single column, which will be returned as a scalar. - If the given result type is
Object[], then the result set must have multiple columns, which will be returned as elements of arrays of typeObject[]. - Otherwise, the given result type must be an entity class, in which case the result set column aliases must map to the fields of the entity, and the query will return instances of the entity.
- Specified by:
createNativeQueryin interfaceStage.QueryProducer- Parameters:
queryString- The SQL queryresultType- the Java type returned in each row of query results- Returns:
- The
Stage.SelectionQueryinstance for manipulation and execution - See Also:
-
EntityManager.createNativeQuery(String, Class)
- If the given result type is
-
createNativeQuery
public <R> Stage.SelectionQuery<R> createNativeQuery(String queryString, Class<R> resultType, AffectedEntities affectedEntities) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.SelectionQueryfor the given SQL query string, using the givenresultTypeto interpret the results.- If the given result type is
Object, or a built-in type such asStringorInteger, the result set must have a single column, which will be returned as a scalar. - If the given result type is
Object[], then the result set must have multiple columns, which will be returned as elements of arrays of typeObject[]. - Otherwise, the given result type must be an entity class, in which case the result set column aliases must map to the fields of the entity, and the query will return instances of the entity.
affected entitiesare synchronized with the database before execution of the query.- Specified by:
createNativeQueryin interfaceStage.QueryProducer- Parameters:
queryString- The SQL queryresultType- the Java type returned in each row of query resultsaffectedEntities- The entities which are affected by the query- Returns:
- The
Stage.Queryinstance for manipulation and execution - See Also:
-
EntityManager.createNativeQuery(String, Class)
- If the given result type is
-
createNativeQuery
public <R> Stage.SelectionQuery<R> createNativeQuery(String queryString, ResultSetMapping<R> resultSetMapping) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.SelectionQueryfor the given SQL query string, using the givenResultSetMappingto interpret the result set.- Specified by:
createNativeQueryin interfaceStage.QueryProducer- Parameters:
queryString- The SQL queryresultSetMapping- the result set mapping- Returns:
- The
Stage.Queryinstance for manipulation and execution - See Also:
-
Stage.QueryProducer.getResultSetMapping(Class, String)EntityManager.createNativeQuery(String, String)
-
createNativeQuery
public <R> Stage.SelectionQuery<R> createNativeQuery(String queryString, ResultSetMapping<R> resultSetMapping, AffectedEntities affectedEntities) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.SelectionQueryfor the given SQL query string, using the givenResultSetMappingto interpret the result set.Any
affected entitiesare synchronized with the database before execution of the query.- Specified by:
createNativeQueryin interfaceStage.QueryProducer- Parameters:
queryString- The SQL queryresultSetMapping- the result set mappingaffectedEntities- The entities which are affected by the query- Returns:
- The
Stage.Queryinstance for manipulation and execution - See Also:
-
Stage.QueryProducer.getResultSetMapping(Class, String)EntityManager.createNativeQuery(String, String)
-
createQuery
public <R> Stage.SelectionQuery<R> createQuery(jakarta.persistence.criteria.CriteriaQuery<R> criteriaQuery) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.SelectionQueryfor the given criteria query.- Specified by:
createQueryin interfaceStage.QueryProducer- Parameters:
criteriaQuery- TheCriteriaQuery- Returns:
- The
Stage.SelectionQueryinstance for manipulation and execution - See Also:
-
EntityManager.createQuery(String)
-
createQuery
public <R> Stage.MutationQuery createQuery(jakarta.persistence.criteria.CriteriaUpdate<R> criteriaUpdate) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.MutationQueryfor the given criteria update.- Specified by:
createQueryin interfaceStage.QueryProducer- Parameters:
criteriaUpdate- TheCriteriaUpdate- Returns:
- The
Stage.MutationQueryinstance for manipulation and execution
-
createQuery
public <R> Stage.MutationQuery createQuery(jakarta.persistence.criteria.CriteriaDelete<R> criteriaDelete) Description copied from interface:Stage.QueryProducerCreate an instance ofStage.MutationQueryfor the given criteria delete.- Specified by:
createQueryin interfaceStage.QueryProducer- Parameters:
criteriaDelete- TheCriteriaDelete- Returns:
- The
Stage.MutationQueryinstance for manipulation and execution
-
getResultSetMapping
Description copied from interface:Stage.QueryProducerObtain a native SQL result set mapping defined via the annotationSqlResultSetMapping.- Specified by:
getResultSetMappingin interfaceStage.QueryProducer
-
getEntityGraph
Description copied from interface:Stage.QueryProducerObtain a namedEntityGraph- Specified by:
getEntityGraphin interfaceStage.QueryProducer
-
createEntityGraph
Description copied from interface:Stage.QueryProducerCreate a new mutableEntityGraph- Specified by:
createEntityGraphin interfaceStage.QueryProducer
-
createEntityGraph
public <T> jakarta.persistence.EntityGraph<T> createEntityGraph(Class<T> rootType, String graphName) Description copied from interface:Stage.QueryProducerCreate a new mutable copy of a namedEntityGraph- Specified by:
createEntityGraphin interfaceStage.QueryProducer
-