public abstract class ImmutableEntityInterceptor
extends org.hibernate.EmptyInterceptor
NOTE: Subclasses MUST not make any changes to the persistent object because they get called last, if they make any changes other interceptors would never know about them.
Constructor and Description |
---|
ImmutableEntityInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String[] |
getMutablePropertyNames()
Subclasses can override this to return fields that are allowed to be edited, returning null
or an empty array implies the entity is immutable
|
protected abstract java.lang.Class<?> |
getSupportedType()
Returns the class handled by the interceptor
|
protected boolean |
ignoreVoidedOrRetiredObjects()
Subclasses can override this to specify whether voided or retired items are mutable
|
boolean |
onFlushDirty(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] currentState,
java.lang.Object[] previousState,
java.lang.String[] propertyNames,
org.hibernate.type.Type[] types) |
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, getEntityName, instantiate, isTransient, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onDelete, onLoad, onPrepareStatement, onSave, postFlush, preFlush
protected abstract java.lang.Class<?> getSupportedType()
protected java.lang.String[] getMutablePropertyNames()
protected boolean ignoreVoidedOrRetiredObjects()
public boolean onFlushDirty(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] currentState, java.lang.Object[] previousState, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
onFlushDirty
in interface org.hibernate.Interceptor
onFlushDirty
in class org.hibernate.EmptyInterceptor
EmptyInterceptor.onFlushDirty(Object, java.io.Serializable, Object[],
Object[], String[], org.hibernate.type.Type[])
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.