public class ChainingInterceptor
extends java.lang.Object
implements org.hibernate.Interceptor
HibernateSessionFactoryBean
to keep track of multiple interceptors Interceptor
are called for each interceptor that is added to this
classModifier and Type | Field and Description |
---|---|
java.util.Collection<org.hibernate.Interceptor> |
interceptors |
Constructor and Description |
---|
ChainingInterceptor() |
Modifier and Type | Method and Description |
---|---|
void |
addInterceptor(org.hibernate.Interceptor interceptor)
Adds the given interceptor to the list of interceptors to be applied to hibernate sessions.
|
void |
afterTransactionBegin(org.hibernate.Transaction tx) |
void |
afterTransactionCompletion(org.hibernate.Transaction tx) |
void |
beforeTransactionCompletion(org.hibernate.Transaction tx) |
int[] |
findDirty(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) |
java.lang.Object |
getEntity(java.lang.String entityName,
java.io.Serializable id) |
java.lang.String |
getEntityName(java.lang.Object object) |
java.lang.Object |
instantiate(java.lang.String entityName,
org.hibernate.EntityMode entityMode,
java.io.Serializable id) |
java.lang.Boolean |
isTransient(java.lang.Object entity) |
void |
onCollectionRecreate(java.lang.Object collection,
java.io.Serializable key) |
void |
onCollectionRemove(java.lang.Object collection,
java.io.Serializable key) |
void |
onCollectionUpdate(java.lang.Object collection,
java.io.Serializable key) |
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 |
onLoad(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] state,
java.lang.String[] propertyNames,
org.hibernate.type.Type[] types) |
java.lang.String |
onPrepareStatement(java.lang.String sql) |
boolean |
onSave(java.lang.Object entity,
java.io.Serializable id,
java.lang.Object[] state,
java.lang.String[] propertyNames,
org.hibernate.type.Type[] types) |
void |
postFlush(java.util.Iterator entities) |
void |
preFlush(java.util.Iterator entities) |
public void addInterceptor(org.hibernate.Interceptor interceptor)
interceptor
- the interceptor to add to the queuepublic 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
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
public boolean onLoad(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
onLoad
in interface org.hibernate.Interceptor
public boolean onSave(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
onSave
in interface org.hibernate.Interceptor
public void postFlush(java.util.Iterator entities)
postFlush
in interface org.hibernate.Interceptor
public void preFlush(java.util.Iterator entities)
preFlush
in interface org.hibernate.Interceptor
public java.lang.Boolean isTransient(java.lang.Object entity)
isTransient
in interface org.hibernate.Interceptor
public java.lang.Object instantiate(java.lang.String entityName, org.hibernate.EntityMode entityMode, java.io.Serializable id)
instantiate
in interface org.hibernate.Interceptor
public int[] findDirty(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)
findDirty
in interface org.hibernate.Interceptor
public java.lang.String getEntityName(java.lang.Object object)
getEntityName
in interface org.hibernate.Interceptor
public java.lang.Object getEntity(java.lang.String entityName, java.io.Serializable id)
getEntity
in interface org.hibernate.Interceptor
public void afterTransactionBegin(org.hibernate.Transaction tx)
afterTransactionBegin
in interface org.hibernate.Interceptor
public void afterTransactionCompletion(org.hibernate.Transaction tx)
afterTransactionCompletion
in interface org.hibernate.Interceptor
public void beforeTransactionCompletion(org.hibernate.Transaction tx)
beforeTransactionCompletion
in interface org.hibernate.Interceptor
public java.lang.String onPrepareStatement(java.lang.String sql)
onPrepareStatement
in interface org.hibernate.Interceptor
public void onCollectionRemove(java.lang.Object collection, java.io.Serializable key) throws org.hibernate.CallbackException
onCollectionRemove
in interface org.hibernate.Interceptor
org.hibernate.CallbackException
public void onCollectionRecreate(java.lang.Object collection, java.io.Serializable key) throws org.hibernate.CallbackException
onCollectionRecreate
in interface org.hibernate.Interceptor
org.hibernate.CallbackException
public void onCollectionUpdate(java.lang.Object collection, java.io.Serializable key) throws org.hibernate.CallbackException
onCollectionUpdate
in interface org.hibernate.Interceptor
org.hibernate.CallbackException
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.