org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.interceptor
Class NakedInterceptor

java.lang.Object
  extended by org.hibernate.EmptyInterceptor
      extended by org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.interceptor.NakedInterceptor
All Implemented Interfaces:
java.io.Serializable, org.hibernate.Interceptor

public class NakedInterceptor
extends org.hibernate.EmptyInterceptor

A Hibernate Interceptor to ensure process Naked Objects correctly.

It does several things including:

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.EmptyInterceptor
INSTANCE
 
Constructor Summary
NakedInterceptor()
           
 
Method Summary
 java.lang.Object getEntity(java.lang.String entityName, java.io.Serializable id)
           
 java.lang.Object instantiate(java.lang.String entityName, org.hibernate.EntityMode entityMode, java.io.Serializable id)
           
 java.lang.Boolean isTransient(java.lang.Object entity)
           
 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)
          Updates the user name and timestamp, if possible.
 boolean onSave(java.lang.Object entity, java.io.Serializable id, java.lang.Object[] state, java.lang.String[] propertyNames, org.hibernate.type.Type[] types)
          Updates the user name and timestamp, if possible.
 
Methods inherited from class org.hibernate.EmptyInterceptor
afterTransactionBegin, afterTransactionCompletion, beforeTransactionCompletion, findDirty, getEntityName, onCollectionRecreate, onCollectionRemove, onCollectionUpdate, onDelete, onLoad, onPrepareStatement, postFlush, preFlush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NakedInterceptor

public NakedInterceptor()
Method Detail

isTransient

public java.lang.Boolean isTransient(java.lang.Object entity)
Specified by:
isTransient in interface org.hibernate.Interceptor
Overrides:
isTransient in class org.hibernate.EmptyInterceptor

instantiate

public java.lang.Object instantiate(java.lang.String entityName,
                                    org.hibernate.EntityMode entityMode,
                                    java.io.Serializable id)
                             throws org.hibernate.CallbackException
Specified by:
instantiate in interface org.hibernate.Interceptor
Overrides:
instantiate in class org.hibernate.EmptyInterceptor
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
Overrides:
getEntity in class org.hibernate.EmptyInterceptor
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)
Updates the user name and timestamp, if possible.

Specified by:
onFlushDirty in interface org.hibernate.Interceptor
Overrides:
onFlushDirty in class org.hibernate.EmptyInterceptor

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)
Updates the user name and timestamp, if possible.

Specified by:
onSave in interface org.hibernate.Interceptor
Overrides:
onSave in class org.hibernate.EmptyInterceptor


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.