org.hibernate.ejb.event
Class EJB3SaveEventListener

java.lang.Object
  extended by org.hibernate.event.def.AbstractReassociateEventListener
      extended by org.hibernate.event.def.AbstractSaveEventListener
          extended by org.hibernate.event.def.DefaultSaveOrUpdateEventListener
              extended by org.hibernate.event.def.DefaultSaveEventListener
                  extended by org.hibernate.ejb.event.EJB3SaveEventListener
All Implemented Interfaces:
Serializable, CallbackHandlerConsumer, org.hibernate.event.SaveOrUpdateEventListener

public class EJB3SaveEventListener
extends org.hibernate.event.def.DefaultSaveEventListener
implements CallbackHandlerConsumer

Overrides the LifeCycle OnSave call to call the PrePersist operation

Author:
Emmanuel Bernard
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.event.def.AbstractSaveEventListener
DELETED, DETACHED, PERSISTENT, TRANSIENT
 
Constructor Summary
EJB3SaveEventListener()
           
EJB3SaveEventListener(EntityCallbackHandler callbackHandler)
           
 
Method Summary
protected  Serializable saveWithGeneratedId(Object entity, String entityName, Object anything, org.hibernate.event.EventSource source, boolean requiresImmediateIdAccess)
           
protected  Serializable saveWithRequestedId(Object entity, Serializable requestedId, String entityName, Object anything, org.hibernate.event.EventSource source)
           
 void setCallbackHandler(EntityCallbackHandler callbackHandler)
           
 
Methods inherited from class org.hibernate.event.def.DefaultSaveEventListener
performSaveOrUpdate, reassociateIfUninitializedProxy, saveWithGeneratedOrRequestedId
 
Methods inherited from class org.hibernate.event.def.DefaultSaveOrUpdateEventListener
entityIsDetached, entityIsPersistent, entityIsTransient, getCascadeAction, getUpdateId, invokeUpdateLifecycle, onSaveOrUpdate, performUpdate
 
Methods inherited from class org.hibernate.event.def.AbstractSaveEventListener
cascadeAfterSave, cascadeBeforeSave, getAssumedUnsaved, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, substituteValuesIfNecessary, validate, visitCollectionsBeforeSave
 
Methods inherited from class org.hibernate.event.def.AbstractReassociateEventListener
reassociate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJB3SaveEventListener

public EJB3SaveEventListener()

EJB3SaveEventListener

public EJB3SaveEventListener(EntityCallbackHandler callbackHandler)
Method Detail

setCallbackHandler

public void setCallbackHandler(EntityCallbackHandler callbackHandler)
Specified by:
setCallbackHandler in interface CallbackHandlerConsumer

saveWithRequestedId

protected Serializable saveWithRequestedId(Object entity,
                                           Serializable requestedId,
                                           String entityName,
                                           Object anything,
                                           org.hibernate.event.EventSource source)
Overrides:
saveWithRequestedId in class org.hibernate.event.def.AbstractSaveEventListener

saveWithGeneratedId

protected Serializable saveWithGeneratedId(Object entity,
                                           String entityName,
                                           Object anything,
                                           org.hibernate.event.EventSource source,
                                           boolean requiresImmediateIdAccess)
Overrides:
saveWithGeneratedId in class org.hibernate.event.def.AbstractSaveEventListener


Copyright © 2011. All Rights Reserved.