org.trails.hibernate
Class TrailsInterceptor

java.lang.Object
  extended by org.trails.hibernate.TrailsInterceptor
All Implemented Interfaces:
java.io.Serializable, org.hibernate.Interceptor

public class TrailsInterceptor
extends java.lang.Object
implements org.hibernate.Interceptor, java.io.Serializable

Created: Apr 27, 2004

Description:
Class required by Hibernate when you have an object with composite primary key. The isUnsaved() method is what we're interested in here.


Revision History:

----------------------------------------------------------------------------------
Version Date Author Comments
----------------------------------------------------------------------------------
1.0 Apr 27, 2004 CRD3036 Initial Version.

Version:
1.0
Author:
CRD3036
See Also:
Serialized Form

Constructor Summary
TrailsInterceptor()
           
 
Method Summary
 void afterTransactionBegin(org.hibernate.Transaction arg0)
           
 void afterTransactionCompletion(org.hibernate.Transaction arg0)
           
 void beforeTransactionCompletion(org.hibernate.Transaction arg0)
           
 int[] findDirty(java.lang.Object arg0, java.io.Serializable arg1, java.lang.Object[] arg2, java.lang.Object[] arg3, java.lang.String[] arg4, org.hibernate.type.Type[] arg5)
           
 java.lang.Object getEntity(java.lang.String arg0, java.io.Serializable arg1)
           
 java.lang.String getEntityName(java.lang.Object arg0)
           
 java.lang.Object instantiate(java.lang.Class arg0, java.io.Serializable arg1)
           
 java.lang.Object instantiate(java.lang.String arg0, org.hibernate.EntityMode arg1, java.io.Serializable arg2)
           
 java.lang.Boolean isTransient(java.lang.Object arg0)
           
 java.lang.Boolean isUnsaved(java.lang.Object arg0)
           
 void onCollectionRecreate(java.lang.Object arg0, java.io.Serializable arg1)
           
 void onCollectionRemove(java.lang.Object arg0, java.io.Serializable arg1)
           
 void onCollectionUpdate(java.lang.Object arg0, java.io.Serializable arg1)
           
 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 statement)
           
 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 arg0)
           
 void preFlush(java.util.Iterator arg0)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrailsInterceptor

public TrailsInterceptor()
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)
Specified by:
onLoad in interface org.hibernate.Interceptor

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

postFlush

public void postFlush(java.util.Iterator arg0)
               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 arg0)

findDirty

public int[] findDirty(java.lang.Object arg0,
                       java.io.Serializable arg1,
                       java.lang.Object[] arg2,
                       java.lang.Object[] arg3,
                       java.lang.String[] arg4,
                       org.hibernate.type.Type[] arg5)
Specified by:
findDirty in interface org.hibernate.Interceptor

instantiate

public java.lang.Object instantiate(java.lang.Class arg0,
                                    java.io.Serializable arg1)
                             throws org.hibernate.CallbackException
Throws:
org.hibernate.CallbackException

isTransient

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

instantiate

public java.lang.Object instantiate(java.lang.String arg0,
                                    org.hibernate.EntityMode arg1,
                                    java.io.Serializable arg2)
                             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 arg0)
                               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 arg0,
                                  java.io.Serializable arg1)
                           throws org.hibernate.CallbackException
Specified by:
getEntity in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

afterTransactionBegin

public void afterTransactionBegin(org.hibernate.Transaction arg0)
Specified by:
afterTransactionBegin in interface org.hibernate.Interceptor

beforeTransactionCompletion

public void beforeTransactionCompletion(org.hibernate.Transaction arg0)
Specified by:
beforeTransactionCompletion in interface org.hibernate.Interceptor

afterTransactionCompletion

public void afterTransactionCompletion(org.hibernate.Transaction arg0)
Specified by:
afterTransactionCompletion in interface org.hibernate.Interceptor

onCollectionRecreate

public void onCollectionRecreate(java.lang.Object arg0,
                                 java.io.Serializable arg1)
                          throws org.hibernate.CallbackException
Specified by:
onCollectionRecreate in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onCollectionRemove

public void onCollectionRemove(java.lang.Object arg0,
                               java.io.Serializable arg1)
                        throws org.hibernate.CallbackException
Specified by:
onCollectionRemove in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onCollectionUpdate

public void onCollectionUpdate(java.lang.Object arg0,
                               java.io.Serializable arg1)
                        throws org.hibernate.CallbackException
Specified by:
onCollectionUpdate in interface org.hibernate.Interceptor
Throws:
org.hibernate.CallbackException

onPrepareStatement

public java.lang.String onPrepareStatement(java.lang.String statement)
Specified by:
onPrepareStatement in interface org.hibernate.Interceptor


Copyright © 2004-2007. All Rights Reserved.