org.hibernate.event.def
Class DefaultPersistEventListener

java.lang.Object
  extended by org.hibernate.event.def.AbstractReassociateEventListener
      extended by org.hibernate.event.def.AbstractSaveEventListener
          extended by org.hibernate.event.def.DefaultPersistEventListener
All Implemented Interfaces:
Serializable, PersistEventListener
Direct Known Subclasses:
DefaultPersistOnFlushEventListener, EJB3PersistEventListener

public class DefaultPersistEventListener
extends AbstractSaveEventListener
implements PersistEventListener

Defines the default create event listener used by hibernate for creating transient entities in response to generated create events.

Author:
Gavin King
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hibernate.event.def.AbstractSaveEventListener
DELETED, DETACHED, PERSISTENT, TRANSIENT
 
Constructor Summary
DefaultPersistEventListener()
           
 
Method Summary
protected  void entityIsPersistent(PersistEvent event, Map createCache)
           
protected  void entityIsTransient(PersistEvent event, Map createCache)
          Handle the given create event.
protected  Boolean getAssumedUnsaved()
           
protected  CascadingAction getCascadeAction()
           
 void onPersist(PersistEvent event)
          Handle the given create event.
 void onPersist(PersistEvent event, Map createCache)
          Handle the given create event.
 
Methods inherited from class org.hibernate.event.def.AbstractSaveEventListener
cascadeAfterSave, cascadeBeforeSave, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, 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

DefaultPersistEventListener

public DefaultPersistEventListener()
Method Detail

getCascadeAction

protected CascadingAction getCascadeAction()
Specified by:
getCascadeAction in class AbstractSaveEventListener

getAssumedUnsaved

protected Boolean getAssumedUnsaved()
Overrides:
getAssumedUnsaved in class AbstractSaveEventListener

onPersist

public void onPersist(PersistEvent event)
               throws HibernateException
Handle the given create event.

Specified by:
onPersist in interface PersistEventListener
Parameters:
event - The create event to be handled.
Throws:
HibernateException

onPersist

public void onPersist(PersistEvent event,
                      Map createCache)
               throws HibernateException
Handle the given create event.

Specified by:
onPersist in interface PersistEventListener
Parameters:
event - The create event to be handled.
Throws:
HibernateException

entityIsPersistent

protected void entityIsPersistent(PersistEvent event,
                                  Map createCache)

entityIsTransient

protected void entityIsTransient(PersistEvent event,
                                 Map createCache)
                          throws HibernateException
Handle the given create event.

Parameters:
event - The save event to be handled.
Throws:
HibernateException


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.