Class CompositeInterceptor
java.lang.Object
com.atlassian.confluence.core.persistence.hibernate.CompositeInterceptor
- All Implemented Interfaces:
org.hibernate.Interceptor
Hibernate interceptor that allows the chaining of multiple sub-interceptors. Because this is going to be
called a _lot_, it's coded for speed over use of pretty idiomatic Java collections. For interceptors that
can not be logically chained (isUnsaved, findDirty, instantiate) the first in the chain to provide a
non-null answer wins.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterTransactionBegin
(org.hibernate.Transaction tx) void
afterTransactionCompletion
(org.hibernate.Transaction tx) void
beforeTransactionCompletion
(org.hibernate.Transaction tx) int[]
findDirty
(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types) getEntity
(String entityName, Serializable id) getEntityName
(Object object) instantiate
(String entityName, org.hibernate.EntityMode entityMode, Serializable id) 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) onPrepareStatement
(String sql) boolean
onSave
(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types) void
void
-
Constructor Details
-
CompositeInterceptor
-
-
Method Details
-
onLoad
public boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException - Specified by:
onLoad
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
onFlushDirty
public boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException - Specified by:
onFlushDirty
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
onSave
public boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException - Specified by:
onSave
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
onDelete
public void onDelete(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types) throws org.hibernate.CallbackException - Specified by:
onDelete
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
onCollectionRecreate
public void onCollectionRecreate(Object collection, Serializable key) throws org.hibernate.CallbackException - Specified by:
onCollectionRecreate
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
onCollectionRemove
public void onCollectionRemove(Object collection, Serializable key) throws org.hibernate.CallbackException - Specified by:
onCollectionRemove
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
onCollectionUpdate
public void onCollectionUpdate(Object collection, Serializable key) throws org.hibernate.CallbackException - Specified by:
onCollectionUpdate
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
preFlush
- Specified by:
preFlush
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
postFlush
- Specified by:
postFlush
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
isTransient
- Specified by:
isTransient
in interfaceorg.hibernate.Interceptor
-
findDirty
public int[] findDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types) - Specified by:
findDirty
in interfaceorg.hibernate.Interceptor
-
instantiate
public Object instantiate(String entityName, org.hibernate.EntityMode entityMode, Serializable id) throws org.hibernate.CallbackException - Specified by:
instantiate
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
getEntityName
- Specified by:
getEntityName
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
getEntity
- Specified by:
getEntity
in interfaceorg.hibernate.Interceptor
- Throws:
org.hibernate.CallbackException
-
afterTransactionBegin
public void afterTransactionBegin(org.hibernate.Transaction tx) - Specified by:
afterTransactionBegin
in interfaceorg.hibernate.Interceptor
-
beforeTransactionCompletion
public void beforeTransactionCompletion(org.hibernate.Transaction tx) - Specified by:
beforeTransactionCompletion
in interfaceorg.hibernate.Interceptor
-
afterTransactionCompletion
public void afterTransactionCompletion(org.hibernate.Transaction tx) - Specified by:
afterTransactionCompletion
in interfaceorg.hibernate.Interceptor
-
onPrepareStatement
- Specified by:
onPrepareStatement
in interfaceorg.hibernate.Interceptor
-