com.atlassian.confluence.content.persistence.hibernate
Class PluginContentHibernateInterceptor
java.lang.Object
com.atlassian.confluence.content.persistence.hibernate.PluginContentHibernateInterceptor
- All Implemented Interfaces:
- net.sf.hibernate.Interceptor
public class PluginContentHibernateInterceptor
- extends Object
- implements net.sf.hibernate.Interceptor
Interceptor responsible for adding the pluggable content adapter to any content loaded from the database. Because
of loading order problems (the plugin system isn't available when hibernate is configured), responsibility for
providing the Plugin Accessor to this class is given to the PluginContentHibernateDao after it is initialised.
Method Summary |
int[] |
findDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
|
Object |
instantiate(Class clazz,
Serializable id)
|
Boolean |
isUnsaved(Object entity)
|
void |
onDelete(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
|
boolean |
onFlushDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
|
boolean |
onLoad(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
|
boolean |
onSave(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
|
void |
postFlush(Iterator entities)
|
void |
preFlush(Iterator entities)
|
void |
setContentTypeManager(ContentTypeManager contentTypeManager)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluginContentHibernateInterceptor
public PluginContentHibernateInterceptor()
onLoad
public boolean onLoad(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
throws net.sf.hibernate.CallbackException
- Specified by:
onLoad
in interface net.sf.hibernate.Interceptor
- Throws:
net.sf.hibernate.CallbackException
onFlushDirty
public boolean onFlushDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
throws net.sf.hibernate.CallbackException
- Specified by:
onFlushDirty
in interface net.sf.hibernate.Interceptor
- Throws:
net.sf.hibernate.CallbackException
onSave
public boolean onSave(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
throws net.sf.hibernate.CallbackException
- Specified by:
onSave
in interface net.sf.hibernate.Interceptor
- Throws:
net.sf.hibernate.CallbackException
onDelete
public void onDelete(Object entity,
Serializable id,
Object[] state,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
throws net.sf.hibernate.CallbackException
- Specified by:
onDelete
in interface net.sf.hibernate.Interceptor
- Throws:
net.sf.hibernate.CallbackException
preFlush
public void preFlush(Iterator entities)
throws net.sf.hibernate.CallbackException
- Specified by:
preFlush
in interface net.sf.hibernate.Interceptor
- Throws:
net.sf.hibernate.CallbackException
postFlush
public void postFlush(Iterator entities)
throws net.sf.hibernate.CallbackException
- Specified by:
postFlush
in interface net.sf.hibernate.Interceptor
- Throws:
net.sf.hibernate.CallbackException
isUnsaved
public Boolean isUnsaved(Object entity)
- Specified by:
isUnsaved
in interface net.sf.hibernate.Interceptor
findDirty
public int[] findDirty(Object entity,
Serializable id,
Object[] currentState,
Object[] previousState,
String[] propertyNames,
net.sf.hibernate.type.Type[] types)
- Specified by:
findDirty
in interface net.sf.hibernate.Interceptor
instantiate
public Object instantiate(Class clazz,
Serializable id)
throws net.sf.hibernate.CallbackException
- Specified by:
instantiate
in interface net.sf.hibernate.Interceptor
- Throws:
net.sf.hibernate.CallbackException
setContentTypeManager
public void setContentTypeManager(ContentTypeManager contentTypeManager)