Class ValidationInterceptor

java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.validation.ValidationInterceptor
All Implemented Interfaces:
org.hibernate.Interceptor

public class ValidationInterceptor extends Object implements org.hibernate.Interceptor
Interceptor that validates entities upon save and update (flush).
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    isDirty(Entity entity)
     
    void
    postFlush(Iterator entities)
     
    void
    preFlush(Iterator entities)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.hibernate.Interceptor

    afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, findDirty, getEntity, getEntity, getEntityName, instantiate, instantiate, isTransient, onCollectionRecreate, onCollectionRecreate, onCollectionRemove, onCollectionRemove, onCollectionUpdate, onCollectionUpdate, onDelete, onDelete, onDelete, onFlushDirty, onFlushDirty, onInsert, onLoad, onLoad, onPersist, onRemove, onSave, onSave, onUpdate, onUpsert
  • Constructor Details

  • Method Details

    • preFlush

      public void preFlush(Iterator entities)
      Specified by:
      preFlush in interface org.hibernate.Interceptor
    • postFlush

      public void postFlush(Iterator entities)
      Specified by:
      postFlush in interface org.hibernate.Interceptor
    • isDirty

      protected boolean isDirty(Entity entity)