Package play.db.jpa

Class HibernateInterceptor

  • All Implemented Interfaces:
    java.io.Serializable, org.hibernate.Interceptor

    public class HibernateInterceptor
    extends org.hibernate.EmptyInterceptor
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.ThreadLocal<java.lang.Object> entities  
      • Fields inherited from class org.hibernate.EmptyInterceptor

        INSTANCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterTransactionCompletion​(org.hibernate.Transaction tx)  
      int[] findDirty​(java.lang.Object o, java.io.Serializable id, java.lang.Object[] arg2, java.lang.Object[] arg3, java.lang.String[] arg4, org.hibernate.type.Type[] arg5)  
      void onCollectionRecreate​(java.lang.Object collection, java.io.Serializable key)  
      void onCollectionRemove​(java.lang.Object collection, java.io.Serializable key)  
      void onCollectionUpdate​(java.lang.Object collection, java.io.Serializable key)  
      boolean onSave​(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)  
      • Methods inherited from class org.hibernate.EmptyInterceptor

        afterTransactionBegin, beforeTransactionCompletion, getEntity, getEntityName, instantiate, isTransient, onDelete, onFlushDirty, onLoad, onPrepareStatement, postFlush, preFlush
      • Methods inherited from class java.lang.Object

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

      • entities

        protected final java.lang.ThreadLocal<java.lang.Object> entities
    • Constructor Detail

      • HibernateInterceptor

        public HibernateInterceptor()
    • Method Detail

      • findDirty

        public int[] findDirty​(java.lang.Object o,
                               java.io.Serializable id,
                               java.lang.Object[] arg2,
                               java.lang.Object[] arg3,
                               java.lang.String[] arg4,
                               org.hibernate.type.Type[] arg5)
        Specified by:
        findDirty in interface org.hibernate.Interceptor
        Overrides:
        findDirty in class org.hibernate.EmptyInterceptor
      • onCollectionUpdate

        public void onCollectionUpdate​(java.lang.Object collection,
                                       java.io.Serializable key)
                                throws org.hibernate.CallbackException
        Specified by:
        onCollectionUpdate in interface org.hibernate.Interceptor
        Overrides:
        onCollectionUpdate in class org.hibernate.EmptyInterceptor
        Throws:
        org.hibernate.CallbackException
      • onCollectionRecreate

        public void onCollectionRecreate​(java.lang.Object collection,
                                         java.io.Serializable key)
                                  throws org.hibernate.CallbackException
        Specified by:
        onCollectionRecreate in interface org.hibernate.Interceptor
        Overrides:
        onCollectionRecreate in class org.hibernate.EmptyInterceptor
        Throws:
        org.hibernate.CallbackException
      • onCollectionRemove

        public void onCollectionRemove​(java.lang.Object collection,
                                       java.io.Serializable key)
                                throws org.hibernate.CallbackException
        Specified by:
        onCollectionRemove in interface org.hibernate.Interceptor
        Overrides:
        onCollectionRemove in class org.hibernate.EmptyInterceptor
        Throws:
        org.hibernate.CallbackException
      • onSave

        public boolean onSave​(java.lang.Object entity,
                              java.io.Serializable id,
                              java.lang.Object[] state,
                              java.lang.String[] propertyNames,
                              org.hibernate.type.Type[] types)
        Specified by:
        onSave in interface org.hibernate.Interceptor
        Overrides:
        onSave in class org.hibernate.EmptyInterceptor
      • afterTransactionCompletion

        public void afterTransactionCompletion​(org.hibernate.Transaction tx)
        Specified by:
        afterTransactionCompletion in interface org.hibernate.Interceptor
        Overrides:
        afterTransactionCompletion in class org.hibernate.EmptyInterceptor