Class AuditReaderFactory


  • public class AuditReaderFactory
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static AuditReader get​(EntityManager entityManager)
      Create an audit reader associated with an open entity manager.
      static AuditReader get​(org.hibernate.Session session)
      Create an audit reader associated with an open session.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • get

        public static AuditReader get​(org.hibernate.Session session)
                               throws AuditException
        Create an audit reader associated with an open session.
        Parameters:
        session - An open session.
        Returns:
        An audit reader associated with the given sesison. It shouldn't be used after the session is closed.
        Throws:
        AuditException - When the given required listeners aren't installed.
      • get

        public static AuditReader get​(EntityManager entityManager)
                               throws AuditException
        Create an audit reader associated with an open entity manager.
        Parameters:
        entityManager - An open entity manager.
        Returns:
        An audit reader associated with the given entity manager. It shouldn't be used after the entity manager is closed.
        Throws:
        AuditException - When the given entity manager is not based on Hibernate, or if the required listeners aren't installed.