Interface HibernateQueryProvider<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      org.hibernate.query.Query<T>createQuery()
      Create the query object which type will be determined by the underline implementation (e.g.
      voidsetSession​(org.hibernate.Session session)
      Inject a Session that can be used as a factory for queries.
      voidsetStatelessSession​(org.hibernate.StatelessSession session)
      Inject a StatelessSession that can be used as a factory for queries.
    • Method Detail

      • createQuery

        org.hibernate.query.Query<T> createQuery()

        Create the query object which type will be determined by the underline implementation (e.g. Hibernate, JPA, etc.)

        Returns:
        created query
      • setSession

        void setSession​(org.hibernate.Session session)

        Inject a Session that can be used as a factory for queries. The state of the session is controlled by the caller (i.e. it should be closed if necessary).

        Use either this method or setStatelessSession(StatelessSession)

        Parameters:
        session - the Session to set
      • setStatelessSession

        void setStatelessSession​(org.hibernate.StatelessSession session)

        Inject a StatelessSession that can be used as a factory for queries. The state of the session is controlled by the caller (i.e. it should be closed if necessary).

        Use either this method or setSession(Session)

        Parameters:
        session - the StatelessSession to set