public abstract class ChainedInterceptorSupport extends Object implements org.hibernate.Interceptor
Interceptor| Modifier and Type | Field and Description |
|---|---|
protected org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
ChainedInterceptorSupport() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterTransactionBegin(org.hibernate.Transaction transaction) |
void |
afterTransactionCompletion(org.hibernate.Transaction transaction) |
void |
beforeTransactionCompletion(org.hibernate.Transaction transaction) |
int[] |
findDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
org.hibernate.type.Type[] types) |
Object |
getEntity(String entityName,
Serializable serializable) |
String |
getEntityName(Object object) |
org.hibernate.Interceptor |
getNextInterceptor() |
Object |
instantiate(String beanClass,
org.hibernate.EntityMode entityMode,
Serializable id) |
Boolean |
isTransient(Object entity) |
void |
onCollectionRecreate(Object collection,
Serializable key) |
void |
onCollectionRemove(Object collection,
Serializable key) |
void |
onCollectionUpdate(Object collection,
Serializable key) |
void |
onDelete(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
org.hibernate.type.Type[] types) |
boolean |
onFlushDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
org.hibernate.type.Type[] types) |
boolean |
onLoad(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
org.hibernate.type.Type[] types) |
String |
onPrepareStatement(String sql) |
boolean |
onSave(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
org.hibernate.type.Type[] types) |
void |
postFlush(Iterator entities) |
void |
preFlush(Iterator entities) |
protected static void |
setIdOnNewEntity(org.hibernate.SessionFactory sessionFactory,
Class<?> persistentClass,
Serializable id,
Object newEntity)
Convenience methods subclasses can use to apply the id to a new entity if they override
the instantiate method.
|
void |
setNextInterceptor(org.hibernate.Interceptor nextInterceptor)
As Hibernate doesn't support chaining of interceptors natively, we add the ability for
chaining via a delegate.
|
public void setNextInterceptor(org.hibernate.Interceptor nextInterceptor)
nextInterceptor - public org.hibernate.Interceptor getNextInterceptor()
public Object instantiate(String beanClass, org.hibernate.EntityMode entityMode, Serializable id) throws org.hibernate.CallbackException
instantiate in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionInterceptor.instantiate(java.lang.String, org.hibernate.EntityMode, java.io.Serializable)public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException
onLoad in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionInterceptor.onLoad(java.lang.Object, java.io.Serializable,
java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException
onFlushDirty in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionInterceptor.onFlushDirty(java.lang.Object, java.io.Serializable,
java.lang.Object[], java.lang.Object[], java.lang.String[],
org.hibernate.type.Type[])public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException
onSave in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionInterceptor.onSave(java.lang.Object, java.io.Serializable,
java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException
onDelete in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionInterceptor.onDelete(java.lang.Object, java.io.Serializable,
java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])public void preFlush(Iterator entities) throws org.hibernate.CallbackException
preFlush in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionInterceptor.preFlush(java.util.Iterator)public void postFlush(Iterator entities) throws org.hibernate.CallbackException
postFlush in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionInterceptor.postFlush(java.util.Iterator)public Boolean isTransient(Object entity)
isTransient in interface org.hibernate.InterceptorInterceptor.isTransient(Object)public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types)
findDirty in interface org.hibernate.InterceptorInterceptor.findDirty(java.lang.Object, java.io.Serializable,
java.lang.Object[], java.lang.Object[], java.lang.String[],
org.hibernate.type.Type[])public void afterTransactionCompletion(org.hibernate.Transaction transaction)
afterTransactionCompletion in interface org.hibernate.Interceptorpublic String getEntityName(Object object) throws org.hibernate.CallbackException
getEntityName in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionpublic Object getEntity(String entityName, Serializable serializable) throws org.hibernate.CallbackException
getEntity in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionpublic void afterTransactionBegin(org.hibernate.Transaction transaction)
afterTransactionBegin in interface org.hibernate.Interceptorpublic void beforeTransactionCompletion(org.hibernate.Transaction transaction)
beforeTransactionCompletion in interface org.hibernate.Interceptorpublic void onCollectionRecreate(Object collection, Serializable key) throws org.hibernate.CallbackException
onCollectionRecreate in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionpublic void onCollectionRemove(Object collection, Serializable key) throws org.hibernate.CallbackException
onCollectionRemove in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionpublic void onCollectionUpdate(Object collection, Serializable key) throws org.hibernate.CallbackException
onCollectionUpdate in interface org.hibernate.Interceptororg.hibernate.CallbackExceptionpublic String onPrepareStatement(String sql)
onPrepareStatement in interface org.hibernate.Interceptorprotected static void setIdOnNewEntity(org.hibernate.SessionFactory sessionFactory,
Class<?> persistentClass,
Serializable id,
Object newEntity)
throws org.hibernate.CallbackException
persistentClass - id - newEntity - org.hibernate.CallbackExceptionCopyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.