org.jpox
Class LifecycleListenerSpecification

java.lang.Object
  extended byorg.jpox.LifecycleListenerSpecification

public class LifecycleListenerSpecification
extends java.lang.Object

Wrapper for a LifecycleListener for an array of classes. If the classes is null, applies to all classes.

Version:
$Revision: 1.6 $

Field Summary
static int EVENT_POST_ATTACH
          post attach
static int EVENT_POST_CLEAR
          post clear
static int EVENT_POST_CREATE
          post create
static int EVENT_POST_DELETE
          post delete
static int EVENT_POST_DETACH
          post detach
static int EVENT_POST_DIRTY
          post dirty
static int EVENT_POST_LOAD
          post load
static int EVENT_POST_STORE
          post store
static int EVENT_PRE_ATTACH
          pre attach
static int EVENT_PRE_CLEAR
          pre clear
static int EVENT_PRE_DELETE
          pre delete
static int EVENT_PRE_DETACH
          pre detach
static int EVENT_PRE_DIRTY
          pre dirty
static int EVENT_PRE_STORE
          pre store
 
Constructor Summary
LifecycleListenerSpecification(javax.jdo.listener.InstanceLifecycleListener listener, java.lang.Class[] classes)
          Constructor.
 
Method Summary
 boolean forClass(java.lang.Class cls)
          Accessor for whether the listener supported the class.
 java.lang.Class[] getClasses()
          Accessor for the classes in this specification
 javax.jdo.listener.InstanceLifecycleListener getListener()
          Accessor for the listener for this specification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EVENT_POST_CREATE

public static final int EVENT_POST_CREATE
post create

See Also:
Constant Field Values

EVENT_POST_LOAD

public static final int EVENT_POST_LOAD
post load

See Also:
Constant Field Values

EVENT_PRE_STORE

public static final int EVENT_PRE_STORE
pre store

See Also:
Constant Field Values

EVENT_POST_STORE

public static final int EVENT_POST_STORE
post store

See Also:
Constant Field Values

EVENT_PRE_CLEAR

public static final int EVENT_PRE_CLEAR
pre clear

See Also:
Constant Field Values

EVENT_POST_CLEAR

public static final int EVENT_POST_CLEAR
post clear

See Also:
Constant Field Values

EVENT_PRE_DELETE

public static final int EVENT_PRE_DELETE
pre delete

See Also:
Constant Field Values

EVENT_POST_DELETE

public static final int EVENT_POST_DELETE
post delete

See Also:
Constant Field Values

EVENT_PRE_DIRTY

public static final int EVENT_PRE_DIRTY
pre dirty

See Also:
Constant Field Values

EVENT_POST_DIRTY

public static final int EVENT_POST_DIRTY
post dirty

See Also:
Constant Field Values

EVENT_PRE_DETACH

public static final int EVENT_PRE_DETACH
pre detach

See Also:
Constant Field Values

EVENT_POST_DETACH

public static final int EVENT_POST_DETACH
post detach

See Also:
Constant Field Values

EVENT_PRE_ATTACH

public static final int EVENT_PRE_ATTACH
pre attach

See Also:
Constant Field Values

EVENT_POST_ATTACH

public static final int EVENT_POST_ATTACH
post attach

See Also:
Constant Field Values
Constructor Detail

LifecycleListenerSpecification

public LifecycleListenerSpecification(javax.jdo.listener.InstanceLifecycleListener listener,
                                      java.lang.Class[] classes)
Constructor.

Parameters:
listener - The listener
classes - The classes supported by the listener
Method Detail

getListener

public javax.jdo.listener.InstanceLifecycleListener getListener()
Accessor for the listener for this specification

Returns:
The listener

getClasses

public java.lang.Class[] getClasses()
Accessor for the classes in this specification

Returns:
The classes

forClass

public boolean forClass(java.lang.Class cls)
Accessor for whether the listener supported the class. Actually checks if the passed class is a subclass of one of the listener classes.

Parameters:
cls - The class
Returns:
Whether it is supported


Copyright © -2007 . All Rights Reserved.