org.tynamo.hibernate
Class TynamoInterceptor

java.lang.Object
  extended by org.hibernate.EmptyInterceptor
      extended by org.tynamo.hibernate.TynamoInterceptor
All Implemented Interfaces:
Serializable, org.hibernate.Interceptor

public class TynamoInterceptor
extends org.hibernate.EmptyInterceptor
implements org.hibernate.Interceptor, Serializable

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
 
Constructor Summary
TynamoInterceptor()
           
 
Method Summary
 Boolean isTransient(Object arg0)
          (non-Javadoc)
 boolean onFlushDirty(Object entity, Serializable id, Object[] currentState, Object[] previousState, String[] propertyNames, org.hibernate.type.Type[] types)
          (non-Javadoc)
 boolean onLoad(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types)
          (non-Javadoc)
 boolean onSave(Object entity, Serializable id, Object[] state, String[] propertyNames, org.hibernate.type.Type[] types)
          (non-Javadoc)
 
Methods inherited from class org.hibernate.EmptyInterceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, getEntityName, instantiate, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onDelete, onPrepareStatement, postFlush, preFlush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.hibernate.Interceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntity, getEntityName, instantiate, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onDelete, onPrepareStatement, postFlush, preFlush
 

Constructor Detail

TynamoInterceptor

public TynamoInterceptor()
Method Detail

onLoad

public boolean onLoad(Object entity,
                      Serializable id,
                      Object[] state,
                      String[] propertyNames,
                      org.hibernate.type.Type[] types)
(non-Javadoc)

Specified by:
onLoad in interface org.hibernate.Interceptor
Overrides:
onLoad in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.onLoad(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

onFlushDirty

public boolean onFlushDirty(Object entity,
                            Serializable id,
                            Object[] currentState,
                            Object[] previousState,
                            String[] propertyNames,
                            org.hibernate.type.Type[] types)
                     throws org.hibernate.CallbackException
(non-Javadoc)

Specified by:
onFlushDirty in interface org.hibernate.Interceptor
Overrides:
onFlushDirty in class org.hibernate.EmptyInterceptor
Throws:
org.hibernate.CallbackException
See Also:
Interceptor.onFlushDirty(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

onSave

public boolean onSave(Object entity,
                      Serializable id,
                      Object[] state,
                      String[] propertyNames,
                      org.hibernate.type.Type[] types)
               throws org.hibernate.CallbackException
(non-Javadoc)

Specified by:
onSave in interface org.hibernate.Interceptor
Overrides:
onSave in class org.hibernate.EmptyInterceptor
Throws:
org.hibernate.CallbackException
See Also:
Interceptor.onSave(java.lang.Object, java.io.Serializable, java.lang.Object[], java.lang.String[], org.hibernate.type.Type[])

isTransient

public Boolean isTransient(Object arg0)
(non-Javadoc)

Specified by:
isTransient in interface org.hibernate.Interceptor
Overrides:
isTransient in class org.hibernate.EmptyInterceptor
See Also:
Interceptor.isTransient(java.lang.Object)


Copyright © 2004-2013. All Rights Reserved.