@Component
public class CdmSecurityHibernateInterceptor
extends org.hibernate.EmptyInterceptor
Modifier and Type | Field and Description |
---|---|
static java.util.Map<java.lang.Class<? extends CdmBase>,java.util.Set<java.lang.String>> |
exculdeMap
The exculdeMap must map every property to the CdmBase type !!!
|
static Logger |
logger |
Constructor and Description |
---|
CdmSecurityHibernateInterceptor() |
Modifier and Type | Method and Description |
---|---|
ICdmPermissionEvaluator |
getPermissionEvaluator() |
void |
onDelete(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] state,
java.lang.String[] propertyNames,
org.hibernate.type.Type[] types) |
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) |
boolean |
onSave(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] state,
java.lang.String[] propertyNames,
org.hibernate.type.Type[] type) |
void |
setPermissionEvaluator(ICdmPermissionEvaluator permissionEvaluator) |
protected java.util.Collection<? extends java.lang.String> |
unprotectedCacheFields(java.lang.Object[] currentState,
java.lang.Object[] previousState,
java.lang.String[] propertyNames)
Detects all cache fields and the according protection flags.
|
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, getEntityName, instantiate, isTransient, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onLoad, onPrepareStatement, postFlush, preFlush
public static final Logger logger
public static final java.util.Map<java.lang.Class<? extends CdmBase>,java.util.Set<java.lang.String>> exculdeMap
public ICdmPermissionEvaluator getPermissionEvaluator()
public void setPermissionEvaluator(ICdmPermissionEvaluator permissionEvaluator)
public boolean onSave(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] type)
onSave
in interface org.hibernate.Interceptor
onSave
in class org.hibernate.EmptyInterceptor
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
protected java.util.Collection<? extends java.lang.String> unprotectedCacheFields(java.lang.Object[] currentState, java.lang.Object[] previousState, java.lang.String[] propertyNames)
This method relies on the convention that the protection flag for cache fields are named like
protected{CacheFieldName}
whereas the cache fields a always ending with "Cache"
currentState
- previousState
- propertyNames
- public void onDelete(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
onDelete
in interface org.hibernate.Interceptor
onDelete
in class org.hibernate.EmptyInterceptor
Copyright © 2007-2020 EDIT. All Rights Reserved.