EclipseLink 1.2.0, build 'v20091016-r5565' API Reference

org.eclipse.persistence.descriptors
Class DescriptorEventAdapter

java.lang.Object
  extended by org.eclipse.persistence.descriptors.DescriptorEventAdapter
All Implemented Interfaces:
java.util.EventListener, DescriptorEventListener

public class DescriptorEventAdapter
extends java.lang.Object
implements DescriptorEventListener

Purpose: Provides an empty implementation of DescriptorEventListener. Users who do not require the full DescritorEventListener API can subclass this class and implement only the methods required.

See Also:
DescriptorEventManager, DescriptorEvent

Constructor Summary
DescriptorEventAdapter()
           
 
Method Summary
 void aboutToDelete(DescriptorEvent event)
          This event is raised before an object is deleted from the database.
 void aboutToInsert(DescriptorEvent event)
          This event is raised before a new object is inserted to the database.
 void aboutToUpdate(DescriptorEvent event)
          This event is raised before an object is updated in the database.
 boolean isOverriddenEvent(DescriptorEvent event, java.util.Vector eventManagers)
          Implementers should define this method if they need or want to restrict the calling of inherited events.
 void postBuild(DescriptorEvent event)
          This event is raised after an object is built from its row on a read operation.
 void postClone(DescriptorEvent event)
          This event is raised after an object is cloned into a unit of work.
 void postDelete(DescriptorEvent event)
          This event is raised after an object is deleted from the database.
 void postInsert(DescriptorEvent event)
          This event is raised after an object is inserted to the database.
 void postMerge(DescriptorEvent event)
          This event is raised after an object is merged from a unit of work into its parent.
 void postRefresh(DescriptorEvent event)
          This event is raised after an object is refreshed from its row on a refresh operation.
 void postUpdate(DescriptorEvent event)
          This event is raised after an object updated in the database.
 void postWrite(DescriptorEvent event)
          This event is raised after an object is inserted or updated in the database.
 void preDelete(DescriptorEvent event)
          This event is raised before an object is deleted from the database.
 void preInsert(DescriptorEvent event)
          This event is raised before an object is inserted to the database.
 void prePersist(DescriptorEvent event)
          This event is only raised by the EntityManager.
 void preRemove(DescriptorEvent event)
          This event is raised when the remove operation is initiated on an object.
 void preUpdate(DescriptorEvent event)
          This event is raised for all existing objects written or committed in a unit of work.
 void preUpdateWithChanges(DescriptorEvent event)
          This event is raised before an object is updated regardless if the object has any database changes.
 void preWrite(DescriptorEvent event)
          This event is raised for all new or existing objects written or committed in a unit of work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DescriptorEventAdapter

public DescriptorEventAdapter()
Method Detail

aboutToInsert

public void aboutToInsert(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised before a new object is inserted to the database. The object's row has already been built and is accessible from the event. This event can be used to amend an object's insert row.

Specified by:
aboutToInsert in interface DescriptorEventListener

aboutToUpdate

public void aboutToUpdate(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised before an object is updated in the database. This event is only raised for object's that have changes and will be updated. The object's row has already been built and is accessible from the event. This event can be used to amend an object's update row.

Specified by:
aboutToUpdate in interface DescriptorEventListener

aboutToDelete

public void aboutToDelete(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised before an object is deleted from the database. The object's row has already been built and is accessible from the event. This event can be used to amend an object's delete row.

Specified by:
aboutToDelete in interface DescriptorEventListener

isOverriddenEvent

public boolean isOverriddenEvent(DescriptorEvent event,
                                 java.util.Vector eventManagers)
Description copied from interface: DescriptorEventListener
Implementers should define this method if they need or want to restrict the calling of inherited events.

Specified by:
isOverriddenEvent in interface DescriptorEventListener

postBuild

public void postBuild(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object is built from its row on a read operation. This event can be used to initialize non-persistent or non-mapped state in the object.

Specified by:
postBuild in interface DescriptorEventListener

postClone

public void postClone(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object is cloned into a unit of work. This event can be used to initialize non-mapped state in the object. The event source/object is the unit of work clone, the event originalObject is the original object from the session cache.

Specified by:
postClone in interface DescriptorEventListener

postDelete

public void postDelete(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object is deleted from the database.

Specified by:
postDelete in interface DescriptorEventListener

postInsert

public void postInsert(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object is inserted to the database.

Specified by:
postInsert in interface DescriptorEventListener

postMerge

public void postMerge(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object is merged from a unit of work into its parent. This event can be used to initialize non-mapped state in the parent object. The event source/object is the parent session object that was merged into, the event originalObject is the unit of work clone that was merged from.

Specified by:
postMerge in interface DescriptorEventListener

postRefresh

public void postRefresh(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object is refreshed from its row on a refresh operation. This event can be used to initialize non-persistent or non-mapped state in the object.

Specified by:
postRefresh in interface DescriptorEventListener

postUpdate

public void postUpdate(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object updated in the database. This event is only raised for objects that had changes and were updated.

Specified by:
postUpdate in interface DescriptorEventListener

postWrite

public void postWrite(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised after an object is inserted or updated in the database. This event is only raised for new objects or objects that had changes and were updated.

Specified by:
postWrite in interface DescriptorEventListener

prePersist

public void prePersist(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is only raised by the EntityManager. It is raised when the create operation is initiated on an object.

Specified by:
prePersist in interface DescriptorEventListener

preDelete

public void preDelete(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised before an object is deleted from the database.

Specified by:
preDelete in interface DescriptorEventListener

preRemove

public void preRemove(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised when the remove operation is initiated on an object.

Specified by:
preRemove in interface DescriptorEventListener

preInsert

public void preInsert(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised before an object is inserted to the database.

Specified by:
preInsert in interface DescriptorEventListener

preUpdate

public void preUpdate(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised for all existing objects written or committed in a unit of work. This event is raised before the object's changes are computed, so the object may still be modified by the event. If the object has no changes, it will not be updated in a unit of work.

Specified by:
preUpdate in interface DescriptorEventListener

preUpdateWithChanges

public void preUpdateWithChanges(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised before an object is updated regardless if the object has any database changes. This event was created to support EJB 3.0 events. The object in this case will not have a row accessible from the event. For objects that have database changes, an aboutToUpdate will also be triggered.

Specified by:
preUpdateWithChanges in interface DescriptorEventListener

preWrite

public void preWrite(DescriptorEvent event)
Description copied from interface: DescriptorEventListener
This event is raised for all new or existing objects written or committed in a unit of work. This event is raised before the object's changes are computed, so the object may still be modified by the event. If the object is existing and has no changes, it will not be updated in a unit of work.

Specified by:
preWrite in interface DescriptorEventListener

EclipseLink 1.2.0, build 'v20091016-r5565' API Reference