Class BambooSessionFactoryUtils


  • public class BambooSessionFactoryUtils
    extends Object
    • Constructor Detail

      • BambooSessionFactoryUtils

        public BambooSessionFactoryUtils()
    • Method Detail

      • getNewSession

        public static org.hibernate.Session getNewSession​(org.hibernate.SessionFactory sessionFactory)
      • getConnection

        @NotNull
        public static @NotNull Connection getConnection​(org.hibernate.Session session)
      • applyTransactionTimeout

        public static void applyTransactionTimeout​(org.hibernate.query.Query query,
                                                   org.hibernate.SessionFactory sessionFactory)
        Apply the current transaction timeout, if any, to the given Hibernate Query object.
        Parameters:
        query - the Hibernate Query object
        sessionFactory - Hibernate SessionFactory that the Query was created for (may be null)
        See Also:
        Query.setTimeout(int)
      • applyTransactionTimeout

        public static void applyTransactionTimeout​(org.hibernate.Criteria criteria,
                                                   org.hibernate.SessionFactory sessionFactory)