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.apache.openjpa.persistence
Class PersistenceListenerAdapter

    java.lang.Object
      org.apache.openjpa.persistence.PersistenceListenerAdapter

All Implemented Interfaces:
  DeleteListener, LifecycleEventManager.ListenerAdapter, LoadListener, PersistListener, PostDeleteListener, PostPersistListener, UpdateListener

     class PersistenceListenerAdapter

extends Object
implements LifecycleEventManager.ListenerAdapter, PersistListener, PostPersistListener, LoadListener, UpdateListener, DeleteListener, PostDeleteListener

Constructor Summary
`PersistenceListenerAdapter(Collection<LifecycleCallbacks>[] calls)`
`PersistenceListenerAdapter(LifecycleCallbacks[][] callbacks)`

Method Summary
`void` | `afterDelete(LifecycleEvent event)` Invoked after the instance transferred to a deleted state.
`void` | `afterDeletePerformed(LifecycleEvent event)` Receives notifications before an update is performed.
`void` | `afterLoad(LifecycleEvent event)` Invoked after state has been loaded into the instance.
`void` | `afterPersist(LifecycleEvent event)` Invoked when an instance is persisted.
`void` | `afterPersistPerformed(LifecycleEvent event)` Receives notifications after a persist operation has been written to the data store.
`void` | `afterRefresh(LifecycleEvent event)` Invoked after state has been refreshed.
`void` | `afterUpdatePerformed(LifecycleEvent event)` Receives notifications before an update is performed.
`void` | `beforeDelete(LifecycleEvent event)` Invoked before the instance transferred to a deleted state.
`void` | `beforePersist(LifecycleEvent event)` Invoked before an instance is persisted.
`void` | `beforeUpdate(LifecycleEvent event)` Receives notifications before an update is performed.
`boolean` | `respondsTo(int eventType)` Return whether this instance responds to the given event type from `LifecycleEvent`.

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

Constructor Detail

### PersistenceListenerAdapter

    public PersistenceListenerAdapter(LifecycleCallbacks[][] callbacks)

### PersistenceListenerAdapter

    public PersistenceListenerAdapter(Collection<LifecycleCallbacks>[] calls)

Method Detail

### respondsTo

    public boolean respondsTo(int eventType)

  Description copied from interface: `LifecycleEventManager.ListenerAdapter`
  Return whether this instance responds to the given event type from `LifecycleEvent`.

  Specified by:
    `respondsTo` in interface `LifecycleEventManager.ListenerAdapter`

### beforePersist

    public void beforePersist(LifecycleEvent event)

  Description copied from interface: `PersistListener`
  Invoked before an instance is persisted.

  Specified by:
    `beforePersist` in interface `PersistListener`

### afterPersist

    public void afterPersist(LifecycleEvent event)

  Description copied from interface: `PersistListener`
  Invoked when an instance is persisted.

  Specified by:
    `afterPersist` in interface `PersistListener`

### afterPersistPerformed

    public void afterPersistPerformed(LifecycleEvent event)

  Description copied from interface: `PostPersistListener`
  Receives notifications after a persist operation has been written to the data store. Differs from `PersistListener.afterPersist(org.apache.openjpa.event.LifecycleEvent)` in that the latter is called at the end of the persist() operation itself, not after the flush.

  Specified by:
    `afterPersistPerformed` in interface `PostPersistListener`

### afterLoad

    public void afterLoad(LifecycleEvent event)

  Description copied from interface: `LoadListener`
  Invoked after state has been loaded into the instance.

  Specified by:
    `afterLoad` in interface `LoadListener`

### afterRefresh

    public void afterRefresh(LifecycleEvent event)

  Description copied from interface: `LoadListener`
  Invoked after state has been refreshed.

  Specified by:
    `afterRefresh` in interface `LoadListener`

### beforeUpdate

    public void beforeUpdate(LifecycleEvent event)

  Description copied from interface: `UpdateListener`
  Receives notifications before an update is performed. Differs from `StoreListener.beforeStore(org.apache.openjpa.event.LifecycleEvent)` in that the latter is called for updated and new records, whereas this is only invoked for updated records.

  Specified by:
    `beforeUpdate` in interface `UpdateListener`

### afterUpdatePerformed

    public void afterUpdatePerformed(LifecycleEvent event)

  Description copied from interface: `UpdateListener`
  Receives notifications before an update is performed. Differs from `StoreListener.afterStore(org.apache.openjpa.event.LifecycleEvent)` in that the latter is called for updated and new records, whereas this is only invoked for updated records, and that this is called after the record is actually flushed to the store.

  Specified by:
    `afterUpdatePerformed` in interface `UpdateListener`

### beforeDelete

    public void beforeDelete(LifecycleEvent event)

  Description copied from interface: `DeleteListener`
  Invoked before the instance transferred to a deleted state.

  Specified by:
    `beforeDelete` in interface `DeleteListener`

### afterDelete

    public void afterDelete(LifecycleEvent event)

  Description copied from interface: `DeleteListener`
  Invoked after the instance transferred to a deleted state.

  Specified by:
    `afterDelete` in interface `DeleteListener`

### afterDeletePerformed

    public void afterDeletePerformed(LifecycleEvent event)

  Description copied from interface: `PostDeleteListener`
  Receives notifications before an update is performed. Differs from `DeleteListener.afterDelete(LifecycleEvent)` in that the latter is called after the delete operation, whereas this is called after the delete statements have been sent to the data store.

  Specified by:
    `afterDeletePerformed` in interface `PostDeleteListener`

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 © 2006-2013 Apache Software Foundation. All Rights Reserved.