Class TransactionScopedStatelessSession

java.lang.Object
io.quarkus.hibernate.orm.runtime.session.TransactionScopedStatelessSession
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable, org.hibernate.query.QueryProducer, org.hibernate.SharedSessionContract, org.hibernate.StatelessSession

public class TransactionScopedStatelessSession extends Object implements org.hibernate.StatelessSession
See Also:
  • Field Details

  • Constructor Details

    • TransactionScopedStatelessSession

      public TransactionScopedStatelessSession(jakarta.transaction.TransactionManager transactionManager, jakarta.transaction.TransactionSynchronizationRegistry transactionSynchronizationRegistry, org.hibernate.SessionFactory sessionFactory, String unitName, jakarta.enterprise.inject.Instance<RequestScopedStatelessSessionHolder> requestScopedSessions)
  • Method Details

    • acquireSession

    • refresh

      public void refresh(Object entity)
      Specified by:
      refresh in interface org.hibernate.StatelessSession
    • createQuery

      @Deprecated public org.hibernate.query.Query createQuery(String qlString)
      Deprecated.
      Specified by:
      createQuery in interface org.hibernate.query.QueryProducer
    • createQuery

      public <T> org.hibernate.query.Query<T> createQuery(jakarta.persistence.criteria.CriteriaQuery<T> criteriaQuery)
      Specified by:
      createQuery in interface org.hibernate.query.QueryProducer
    • createQuery

      @Deprecated public org.hibernate.query.Query createQuery(jakarta.persistence.criteria.CriteriaUpdate updateQuery)
      Deprecated.
      Specified by:
      createQuery in interface org.hibernate.query.QueryProducer
    • createQuery

      @Deprecated public org.hibernate.query.Query createQuery(jakarta.persistence.criteria.CriteriaDelete deleteQuery)
      Deprecated.
      Specified by:
      createQuery in interface org.hibernate.query.QueryProducer
    • createQuery

      public <T> org.hibernate.query.Query<T> createQuery(String qlString, Class<T> resultClass)
      Specified by:
      createQuery in interface org.hibernate.query.QueryProducer
    • createNamedQuery

      @Deprecated public org.hibernate.query.Query createNamedQuery(String name)
      Deprecated.
      Specified by:
      createNamedQuery in interface org.hibernate.query.QueryProducer
    • createNamedQuery

      public <T> org.hibernate.query.Query<T> createNamedQuery(String name, Class<T> resultClass)
      Specified by:
      createNamedQuery in interface org.hibernate.query.QueryProducer
    • createNativeQuery

      @Deprecated public org.hibernate.query.NativeQuery createNativeQuery(String sqlString)
      Deprecated.
      Specified by:
      createNativeQuery in interface org.hibernate.query.QueryProducer
    • createNativeQuery

      @Deprecated public org.hibernate.query.NativeQuery createNativeQuery(String sqlString, Class resultClass)
      Deprecated.
      Specified by:
      createNativeQuery in interface org.hibernate.query.QueryProducer
    • createNativeQuery

      @Deprecated public org.hibernate.query.NativeQuery createNativeQuery(String sqlString, String resultSetMapping)
      Deprecated.
      Specified by:
      createNativeQuery in interface org.hibernate.query.QueryProducer
    • createNamedStoredProcedureQuery

      public org.hibernate.procedure.ProcedureCall createNamedStoredProcedureQuery(String name)
      Specified by:
      createNamedStoredProcedureQuery in interface org.hibernate.SharedSessionContract
    • createStoredProcedureQuery

      public org.hibernate.procedure.ProcedureCall createStoredProcedureQuery(String procedureName)
      Specified by:
      createStoredProcedureQuery in interface org.hibernate.SharedSessionContract
    • createStoredProcedureQuery

      public org.hibernate.procedure.ProcedureCall createStoredProcedureQuery(String procedureName, Class... resultClasses)
      Specified by:
      createStoredProcedureQuery in interface org.hibernate.SharedSessionContract
    • createStoredProcedureQuery

      public org.hibernate.procedure.ProcedureCall createStoredProcedureQuery(String procedureName, String... resultSetMappings)
      Specified by:
      createStoredProcedureQuery in interface org.hibernate.SharedSessionContract
    • joinTransaction

      public void joinTransaction()
      Specified by:
      joinTransaction in interface org.hibernate.SharedSessionContract
    • isJoinedToTransaction

      public boolean isJoinedToTransaction()
      Specified by:
      isJoinedToTransaction in interface org.hibernate.SharedSessionContract
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.hibernate.SharedSessionContract
      Specified by:
      close in interface org.hibernate.StatelessSession
    • insert

      public Object insert(Object o)
      Specified by:
      insert in interface org.hibernate.StatelessSession
    • insert

      public Object insert(String s, Object o)
      Specified by:
      insert in interface org.hibernate.StatelessSession
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface org.hibernate.SharedSessionContract
    • getTransaction

      public org.hibernate.Transaction getTransaction()
      Specified by:
      getTransaction in interface org.hibernate.SharedSessionContract
    • getCriteriaBuilder

      public org.hibernate.query.criteria.HibernateCriteriaBuilder getCriteriaBuilder()
      Specified by:
      getCriteriaBuilder in interface org.hibernate.SharedSessionContract
    • update

      @Deprecated public void update(Object object)
      Deprecated.
      Specified by:
      update in interface org.hibernate.StatelessSession
    • update

      @Deprecated public void update(String entityName, Object object)
      Deprecated.
      Specified by:
      update in interface org.hibernate.StatelessSession
    • delete

      @Deprecated public void delete(Object object)
      Deprecated.
      Specified by:
      delete in interface org.hibernate.StatelessSession
    • delete

      @Deprecated public void delete(String entityName, Object object)
      Deprecated.
      Specified by:
      delete in interface org.hibernate.StatelessSession
    • refresh

      @Deprecated public void refresh(String entityName, Object object)
      Deprecated.
      Specified by:
      refresh in interface org.hibernate.StatelessSession
    • refresh

      public void refresh(Object object, org.hibernate.LockMode lockMode)
      Specified by:
      refresh in interface org.hibernate.StatelessSession
    • refresh

      public void refresh(String s, Object o, org.hibernate.LockMode lockMode)
      Specified by:
      refresh in interface org.hibernate.StatelessSession
    • fetch

      public void fetch(Object o)
      Specified by:
      fetch in interface org.hibernate.StatelessSession
    • get

      public <T> T get(Class<T> entityType, Object id)
      Specified by:
      get in interface org.hibernate.StatelessSession
    • get

      public <T> T get(Class<T> entityType, Object id, org.hibernate.LockMode lockMode)
      Specified by:
      get in interface org.hibernate.StatelessSession
    • get

      public Object get(String entityName, Object id)
      Specified by:
      get in interface org.hibernate.StatelessSession
    • get

      public Object get(String entityName, Object id, org.hibernate.LockMode lockMode)
      Specified by:
      get in interface org.hibernate.StatelessSession
    • getTenantIdentifier

      public String getTenantIdentifier()
      Specified by:
      getTenantIdentifier in interface org.hibernate.SharedSessionContract
    • getTenantIdentifierValue

      public Object getTenantIdentifierValue()
      Specified by:
      getTenantIdentifierValue in interface org.hibernate.SharedSessionContract
    • isConnected

      public boolean isConnected()
      Specified by:
      isConnected in interface org.hibernate.SharedSessionContract
    • beginTransaction

      public org.hibernate.Transaction beginTransaction()
      Specified by:
      beginTransaction in interface org.hibernate.SharedSessionContract
    • getNamedQuery

      @Deprecated public org.hibernate.query.Query getNamedQuery(String queryName)
      Deprecated.
      Specified by:
      getNamedQuery in interface org.hibernate.query.QueryProducer
    • getNamedProcedureCall

      public org.hibernate.procedure.ProcedureCall getNamedProcedureCall(String name)
      Specified by:
      getNamedProcedureCall in interface org.hibernate.SharedSessionContract
    • createStoredProcedureCall

      public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName)
      Specified by:
      createStoredProcedureCall in interface org.hibernate.SharedSessionContract
    • createStoredProcedureCall

      public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName, Class... resultClasses)
      Specified by:
      createStoredProcedureCall in interface org.hibernate.SharedSessionContract
    • createStoredProcedureCall

      public org.hibernate.procedure.ProcedureCall createStoredProcedureCall(String procedureName, String... resultSetMappings)
      Specified by:
      createStoredProcedureCall in interface org.hibernate.SharedSessionContract
    • getJdbcBatchSize

      public Integer getJdbcBatchSize()
      Specified by:
      getJdbcBatchSize in interface org.hibernate.SharedSessionContract
    • setJdbcBatchSize

      public void setJdbcBatchSize(Integer jdbcBatchSize)
      Specified by:
      setJdbcBatchSize in interface org.hibernate.SharedSessionContract
    • doWork

      public void doWork(org.hibernate.jdbc.Work work) throws org.hibernate.HibernateException
      Specified by:
      doWork in interface org.hibernate.SharedSessionContract
      Throws:
      org.hibernate.HibernateException
    • doReturningWork

      public <T> T doReturningWork(org.hibernate.jdbc.ReturningWork<T> work) throws org.hibernate.HibernateException
      Specified by:
      doReturningWork in interface org.hibernate.SharedSessionContract
      Throws:
      org.hibernate.HibernateException
    • getNamedNativeQuery

      @Deprecated public org.hibernate.query.NativeQuery getNamedNativeQuery(String name)
      Deprecated.
      Specified by:
      getNamedNativeQuery in interface org.hibernate.query.QueryProducer
    • createNativeQuery

      public <R> org.hibernate.query.NativeQuery<R> createNativeQuery(String sqlString, Class<R> resultClass, String tableAlias)
      Specified by:
      createNativeQuery in interface org.hibernate.query.QueryProducer
    • createNativeQuery

      public <R> org.hibernate.query.NativeQuery<R> createNativeQuery(String sqlString, String resultSetMappingName, Class<R> resultClass)
      Specified by:
      createNativeQuery in interface org.hibernate.query.QueryProducer
    • createSelectionQuery

      public org.hibernate.query.SelectionQuery<?> createSelectionQuery(String hqlString)
      Specified by:
      createSelectionQuery in interface org.hibernate.query.QueryProducer
    • createSelectionQuery

      public <R> org.hibernate.query.SelectionQuery<R> createSelectionQuery(String hqlString, Class<R> resultType)
      Specified by:
      createSelectionQuery in interface org.hibernate.query.QueryProducer
    • createSelectionQuery

      public <R> org.hibernate.query.SelectionQuery<R> createSelectionQuery(jakarta.persistence.criteria.CriteriaQuery<R> criteria)
      Specified by:
      createSelectionQuery in interface org.hibernate.query.QueryProducer
    • createMutationQuery

      public org.hibernate.query.MutationQuery createMutationQuery(String hqlString)
      Specified by:
      createMutationQuery in interface org.hibernate.query.QueryProducer
    • createMutationQuery

      public org.hibernate.query.MutationQuery createMutationQuery(jakarta.persistence.criteria.CriteriaUpdate updateQuery)
      Specified by:
      createMutationQuery in interface org.hibernate.query.QueryProducer
    • createMutationQuery

      public org.hibernate.query.MutationQuery createMutationQuery(jakarta.persistence.criteria.CriteriaDelete deleteQuery)
      Specified by:
      createMutationQuery in interface org.hibernate.query.QueryProducer
    • createMutationQuery

      public org.hibernate.query.MutationQuery createMutationQuery(org.hibernate.query.criteria.JpaCriteriaInsertSelect insertSelect)
      Specified by:
      createMutationQuery in interface org.hibernate.query.QueryProducer
    • createNativeMutationQuery

      public org.hibernate.query.MutationQuery createNativeMutationQuery(String sqlString)
      Specified by:
      createNativeMutationQuery in interface org.hibernate.query.QueryProducer
    • createNamedSelectionQuery

      public org.hibernate.query.SelectionQuery<?> createNamedSelectionQuery(String name)
      Specified by:
      createNamedSelectionQuery in interface org.hibernate.query.QueryProducer
    • createNamedSelectionQuery

      public <R> org.hibernate.query.SelectionQuery<R> createNamedSelectionQuery(String name, Class<R> resultType)
      Specified by:
      createNamedSelectionQuery in interface org.hibernate.query.QueryProducer
    • createNamedMutationQuery

      public org.hibernate.query.MutationQuery createNamedMutationQuery(String name)
      Specified by:
      createNamedMutationQuery in interface org.hibernate.query.QueryProducer
    • getNamedNativeQuery

      @Deprecated public org.hibernate.query.NativeQuery getNamedNativeQuery(String name, String resultSetMapping)
      Deprecated.
      Specified by:
      getNamedNativeQuery in interface org.hibernate.query.QueryProducer
    • createEntityGraph

      public <T> org.hibernate.graph.RootGraph<T> createEntityGraph(Class<T> rootType)
      Specified by:
      createEntityGraph in interface org.hibernate.SharedSessionContract
    • createEntityGraph

      public org.hibernate.graph.RootGraph<?> createEntityGraph(String graphName)
      Specified by:
      createEntityGraph in interface org.hibernate.SharedSessionContract
    • createEntityGraph

      public <T> org.hibernate.graph.RootGraph<T> createEntityGraph(Class<T> rootType, String graphName)
      Specified by:
      createEntityGraph in interface org.hibernate.SharedSessionContract
    • getEntityGraph

      public org.hibernate.graph.RootGraph<?> getEntityGraph(String graphName)
      Specified by:
      getEntityGraph in interface org.hibernate.SharedSessionContract
    • getEntityGraphs

      public <T> List<jakarta.persistence.EntityGraph<? super T>> getEntityGraphs(Class<T> entityClass)
      Specified by:
      getEntityGraphs in interface org.hibernate.SharedSessionContract
    • getFactory

      public org.hibernate.SessionFactory getFactory()
      Specified by:
      getFactory in interface org.hibernate.SharedSessionContract
    • upsert

      public void upsert(Object entity)
      Specified by:
      upsert in interface org.hibernate.StatelessSession
    • upsert

      public void upsert(String entityName, Object entity)
      Specified by:
      upsert in interface org.hibernate.StatelessSession
    • get

      public <T> T get(jakarta.persistence.EntityGraph<T> graph, org.hibernate.graph.GraphSemantic graphSemantic, Object id)
      Specified by:
      get in interface org.hibernate.StatelessSession
    • get

      public <T> T get(jakarta.persistence.EntityGraph<T> graph, org.hibernate.graph.GraphSemantic graphSemantic, Object id, org.hibernate.LockMode lockMode)
      Specified by:
      get in interface org.hibernate.StatelessSession