Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.ejb.event
Class EJB3SaveOrUpdateEventListener

    java.lang.Object
      org.hibernate.event.internal.AbstractReassociateEventListener
          org.hibernate.event.internal.AbstractSaveEventListener
              org.hibernate.event.internal.DefaultSaveOrUpdateEventListener
                  org.hibernate.ejb.event.EJB3SaveOrUpdateEventListener

All Implemented Interfaces:
  Serializable, CallbackHandlerConsumer, HibernateEntityManagerEventListener, SaveOrUpdateEventListener

    public class EJB3SaveOrUpdateEventListener

extends DefaultSaveOrUpdateEventListener
implements CallbackHandlerConsumer

Overrides the LifeCycle OnSave call to call the PrePersist operation

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.hibernate.event.internal.AbstractSaveEventListener
`AbstractSaveEventListener.EntityState`

Constructor Summary
`EJB3SaveOrUpdateEventListener()`
`EJB3SaveOrUpdateEventListener(EntityCallbackHandler callbackHandler)`

Method Summary
`protected Serializable` | `saveWithGeneratedId(Object entity, String entityName, Object anything, EventSource source, boolean requiresImmediateIdAccess)` Prepares the save call using a newly generated id.
`protected Serializable` | `saveWithRequestedId(Object entity, Serializable requestedId, String entityName, Object anything, EventSource source)` Prepares the save call using the given requested id.
`void` | `setCallbackHandler(EntityCallbackHandler callbackHandler)`

Methods inherited from class org.hibernate.event.internal.DefaultSaveOrUpdateEventListener
`entityIsDetached, entityIsPersistent, entityIsTransient, getCascadeAction, getUpdateId, invokeUpdateLifecycle, onSaveOrUpdate, performSaveOrUpdate, performUpdate, reassociateIfUninitializedProxy, saveWithGeneratedOrRequestedId`

Methods inherited from class org.hibernate.event.internal.AbstractSaveEventListener
`cascadeAfterSave, cascadeBeforeSave, getAssumedUnsaved, getEntityState, getLoggableName, getMergeMap, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, substituteValuesIfNecessary, visitCollectionsBeforeSave`

Methods inherited from class org.hibernate.event.internal.AbstractReassociateEventListener
`reassociate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EJB3SaveOrUpdateEventListener

    public EJB3SaveOrUpdateEventListener()

### EJB3SaveOrUpdateEventListener

    public EJB3SaveOrUpdateEventListener(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,
                                               EventSource source)

  Description copied from class: `AbstractSaveEventListener`
  Prepares the save call using the given requested id.

  Overrides:
    `saveWithRequestedId` in class `AbstractSaveEventListener`
  Parameters:
    `entity` - The entity to be saved.
    `requestedId` - The id to which to associate the entity.
    `entityName` - The name of the entity being saved.
    `anything` - Generally cascade-specific information.
    `source` - The session which is the source of this save event.
  Returns:
    The id used to save the entity.

### saveWithGeneratedId

    protected Serializable saveWithGeneratedId(Object entity,
                                               String entityName,
                                               Object anything,
                                               EventSource source,
                                               boolean requiresImmediateIdAccess)

  Description copied from class: `AbstractSaveEventListener`
  Prepares the save call using a newly generated id.

  Overrides:
    `saveWithGeneratedId` in class `AbstractSaveEventListener`
  Parameters:
    `entity` - The entity to be saved
    `entityName` - The entity-name for the entity to be saved
    `anything` - Generally cascade-specific information.
    `source` - The session which is the source of this save event.
    `requiresImmediateIdAccess` - does the event context require access to the identifier immediately after execution of this method (if not, post-insert style id generators may be postponed if we are outside a transaction).
  Returns:
    The id used to save the entity; may be null depending on the type of id generator used and the requiresImmediateIdAccess value

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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