net.sf.joyaop.extension.hibernate
Class JoyInterceptor

java.lang.Object
  extended by net.sf.joyaop.extension.hibernate.JoyInterceptor
All Implemented Interfaces:
org.hibernate.Interceptor

public class JoyInterceptor
extends java.lang.Object
implements org.hibernate.Interceptor

only for hibernate3

Author:
Shen Li

Constructor Summary
JoyInterceptor(ObjectFactory objectFactory, org.hibernate.cfg.Configuration configuration)
           
 
Method Summary
 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, java.io.Serializable id)
           
 java.lang.Boolean isUnsaved(java.lang.Object entity)
           
 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)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoyInterceptor

public JoyInterceptor(ObjectFactory objectFactory,
                      org.hibernate.cfg.Configuration configuration)
Method Detail

onLoad

public boolean onLoad(java.lang.Object entity,
                      java.io.Serializable id,
                      java.lang.Object[] state,
                      java.lang.String[] propertyNames,
                      org.hibernate.type.Type[] types)
               throws org.hibernate.CallbackException
Specified by:
onLoad in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onFlushDirty

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)
                     throws org.hibernate.CallbackException
Specified by:
onFlushDirty in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onSave

public boolean onSave(java.lang.Object entity,
                      java.io.Serializable id,
                      java.lang.Object[] state,
                      java.lang.String[] propertyNames,
                      org.hibernate.type.Type[] types)
               throws org.hibernate.CallbackException
Specified by:
onSave in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onDelete

public void onDelete(java.lang.Object entity,
                     java.io.Serializable id,
                     java.lang.Object[] state,
                     java.lang.String[] propertyNames,
                     org.hibernate.type.Type[] types)
              throws org.hibernate.CallbackException
Specified by:
onDelete in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

preFlush

public void preFlush(java.util.Iterator entities)
              throws org.hibernate.CallbackException
Specified by:
preFlush in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

postFlush

public void postFlush(java.util.Iterator entities)
               throws org.hibernate.CallbackException
Specified by:
postFlush in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

isUnsaved

public java.lang.Boolean isUnsaved(java.lang.Object entity)
Specified by:
isUnsaved in interface org.hibernate.Interceptor

findDirty

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)
Specified by:
findDirty in interface org.hibernate.Interceptor

instantiate

public java.lang.Object instantiate(java.lang.String entityName,
                                    java.io.Serializable id)
                             throws org.hibernate.CallbackException
Specified by:
instantiate in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

getEntityName

public java.lang.String getEntityName(java.lang.Object object)
                               throws org.hibernate.CallbackException
Specified by:
getEntityName in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

getEntity

public java.lang.Object getEntity(java.lang.String entityName,
                                  java.io.Serializable id)
                           throws org.hibernate.CallbackException
Specified by:
getEntity in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException