Class AbstractEntityInterceptor

java.lang.Object
org.hibernate.EmptyInterceptor
pl.matsuo.core.service.db.interceptor.AbstractEntityInterceptor
All Implemented Interfaces:
Serializable, org.hibernate.Interceptor
Direct Known Subclasses:
AuditTrailInterceptor, IdBucketInterceptor

public abstract class AbstractEntityInterceptor
extends org.hibernate.EmptyInterceptor
See Also:
Serialized Form
  • Field Details

    • sessionState

      @Autowired protected SessionState sessionState
  • Constructor Details

    • AbstractEntityInterceptor

      public AbstractEntityInterceptor()
  • Method Details

    • onFlushDirty

      public boolean onFlushDirty​(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types)
      Specified by:
      onFlushDirty in interface org.hibernate.Interceptor
      Overrides:
      onFlushDirty in class org.hibernate.EmptyInterceptor
    • onSave

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

      protected void setValue​(Object[] currentState, String[] propertyNames, String propertyToSet, Supplier<Object> valueProvider)
    • getValue

      protected <E> E getValue​(Object[] currentState, String[] propertyNames, String propertyToGet)