Class SessionHelper


  • public final class SessionHelper
    extends Object
    A helper to abstract away all the complexity of wrapping sections of code in a session (and transaction).

    Particularly useful for unit testing of code that abstracts away from Hibernate ORM sessions.

    • Constructor Detail

      • SessionHelper

        public SessionHelper​(org.hibernate.engine.spi.SessionFactoryImplementor sessionFactory,
                             String tenantId)
    • Method Detail

      • openSession

        public org.hibernate.engine.spi.SessionImplementor openSession()