org.apache.jdo.tck.api.instancecallbacks
Class AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl
java.lang.Object
org.apache.jdo.tck.api.instancecallbacks.AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl
- All Implemented Interfaces:
- javax.jdo.listener.AttachLifecycleListener, javax.jdo.listener.ClearLifecycleListener, javax.jdo.listener.CreateLifecycleListener, javax.jdo.listener.DeleteLifecycleListener, javax.jdo.listener.DetachLifecycleListener, javax.jdo.listener.DirtyLifecycleListener, javax.jdo.listener.InstanceLifecycleListener, javax.jdo.listener.LoadLifecycleListener, javax.jdo.listener.StoreLifecycleListener
- Enclosing class:
- AbstractInstanceLifecycleListener
- protected abstract static class AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl
- extends java.lang.Object
- implements javax.jdo.listener.AttachLifecycleListener, javax.jdo.listener.ClearLifecycleListener, javax.jdo.listener.CreateLifecycleListener, javax.jdo.listener.DeleteLifecycleListener, javax.jdo.listener.DetachLifecycleListener, javax.jdo.listener.DirtyLifecycleListener, javax.jdo.listener.LoadLifecycleListener, javax.jdo.listener.StoreLifecycleListener
The LifeCycleListener to be registered with the
PersistenceManager. This is the base class that is extended
by each test.
Method Summary |
protected void |
checkDeleted(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkDirty(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkEventSource(java.lang.String where,
java.lang.Object eventSource)
|
protected void |
checkEventTarget(java.lang.String where,
java.lang.Object eventTarget)
|
protected void |
checkEventType(java.lang.String where,
int expected,
int actual)
|
protected void |
checkNew(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkNotDeleted(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkNotDirty(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkNotNew(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkNotPersistent(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkPersistent(java.lang.String where,
java.lang.Object obj)
|
protected void |
checkSame(java.lang.String where,
java.lang.Object expected,
java.lang.Object actual)
|
protected void |
checkTrue(java.lang.String where,
boolean condition)
|
void |
notifyEvent(int event)
|
void |
postAttach(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
postClear(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
postCreate(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
postDelete(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
postDetach(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
postDirty(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
postLoad(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
postStore(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
preAttach(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
preClear(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
preDelete(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
preDetach(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
preDirty(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
preStore(javax.jdo.listener.InstanceLifecycleEvent event)
|
void |
setExpectedSource(java.lang.Object source)
|
void |
setExpectedTarget(java.lang.Object target)
|
void |
verifyCallbacks(java.lang.String where,
int[] expected)
Verify the actual sequence of callbacks and listeners
against the expected. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expectedSource
protected java.lang.Object expectedSource
expectedTarget
protected java.lang.Object expectedTarget
PRE_ATTACH_CALLBACK
public static final int PRE_ATTACH_CALLBACK
- These are indexes into the sequence array. Each index
represents the position in the sequence array for the
corresponding callback or listener event.
POST_ATTACH_CALLBACK
public static final int POST_ATTACH_CALLBACK
PRE_ATTACH_LISTENER
public static final int PRE_ATTACH_LISTENER
POST_ATTACH_LISTENER
public static final int POST_ATTACH_LISTENER
PRE_CLEAR_CALLBACK
public static final int PRE_CLEAR_CALLBACK
PRE_CLEAR_LISTENER
public static final int PRE_CLEAR_LISTENER
POST_CLEAR_LISTENER
public static final int POST_CLEAR_LISTENER
POST_CREATE_LISTENER
public static final int POST_CREATE_LISTENER
PRE_DELETE_CALLBACK
public static final int PRE_DELETE_CALLBACK
PRE_DELETE_LISTENER
public static final int PRE_DELETE_LISTENER
POST_DELETE_LISTENER
public static final int POST_DELETE_LISTENER
PRE_DETACH_CALLBACK
public static final int PRE_DETACH_CALLBACK
POST_DETACH_CALLBACK
public static final int POST_DETACH_CALLBACK
PRE_DETACH_LISTENER
public static final int PRE_DETACH_LISTENER
POST_DETACH_LISTENER
public static final int POST_DETACH_LISTENER
PRE_DIRTY_LISTENER
public static final int PRE_DIRTY_LISTENER
POST_DIRTY_LISTENER
public static final int POST_DIRTY_LISTENER
POST_LOAD_CALLBACK
public static final int POST_LOAD_CALLBACK
POST_LOAD_LISTENER
public static final int POST_LOAD_LISTENER
PRE_STORE_CALLBACK
public static final int PRE_STORE_CALLBACK
PRE_STORE_LISTENER
public static final int PRE_STORE_LISTENER
POST_STORE_LISTENER
public static final int POST_STORE_LISTENER
messages
protected java.lang.StringBuffer messages
- The error message buffer to report exceptions.
AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl
protected AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl()
setExpectedSource
public void setExpectedSource(java.lang.Object source)
setExpectedTarget
public void setExpectedTarget(java.lang.Object target)
notifyEvent
public void notifyEvent(int event)
checkEventType
protected void checkEventType(java.lang.String where,
int expected,
int actual)
checkEventSource
protected void checkEventSource(java.lang.String where,
java.lang.Object eventSource)
checkEventTarget
protected void checkEventTarget(java.lang.String where,
java.lang.Object eventTarget)
checkTrue
protected void checkTrue(java.lang.String where,
boolean condition)
checkSame
protected void checkSame(java.lang.String where,
java.lang.Object expected,
java.lang.Object actual)
checkPersistent
protected void checkPersistent(java.lang.String where,
java.lang.Object obj)
checkNotPersistent
protected void checkNotPersistent(java.lang.String where,
java.lang.Object obj)
checkDirty
protected void checkDirty(java.lang.String where,
java.lang.Object obj)
checkNotDirty
protected void checkNotDirty(java.lang.String where,
java.lang.Object obj)
checkNew
protected void checkNew(java.lang.String where,
java.lang.Object obj)
checkNotNew
protected void checkNotNew(java.lang.String where,
java.lang.Object obj)
checkDeleted
protected void checkDeleted(java.lang.String where,
java.lang.Object obj)
checkNotDeleted
protected void checkNotDeleted(java.lang.String where,
java.lang.Object obj)
verifyCallbacks
public void verifyCallbacks(java.lang.String where,
int[] expected)
- Verify the actual sequence of callbacks and listeners
against the expected. Each of the expected and actual are
int arrays in which each listener and callback have one
position in the array and the value of the array at that
position is the order, starting with 1, of the callback.
If the callback or listener was never invoked, the value
is 0.
postAttach
public void postAttach(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postAttach
in interface javax.jdo.listener.AttachLifecycleListener
postClear
public void postClear(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postClear
in interface javax.jdo.listener.ClearLifecycleListener
postCreate
public void postCreate(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postCreate
in interface javax.jdo.listener.CreateLifecycleListener
postDelete
public void postDelete(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postDelete
in interface javax.jdo.listener.DeleteLifecycleListener
postDetach
public void postDetach(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postDetach
in interface javax.jdo.listener.DetachLifecycleListener
postDirty
public void postDirty(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postDirty
in interface javax.jdo.listener.DirtyLifecycleListener
postLoad
public void postLoad(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postLoad
in interface javax.jdo.listener.LoadLifecycleListener
postStore
public void postStore(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
postStore
in interface javax.jdo.listener.StoreLifecycleListener
preAttach
public void preAttach(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
preAttach
in interface javax.jdo.listener.AttachLifecycleListener
preClear
public void preClear(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
preClear
in interface javax.jdo.listener.ClearLifecycleListener
preDelete
public void preDelete(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
preDelete
in interface javax.jdo.listener.DeleteLifecycleListener
preDetach
public void preDetach(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
preDetach
in interface javax.jdo.listener.DetachLifecycleListener
preDirty
public void preDirty(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
preDirty
in interface javax.jdo.listener.DirtyLifecycleListener
preStore
public void preStore(javax.jdo.listener.InstanceLifecycleEvent event)
- Specified by:
preStore
in interface javax.jdo.listener.StoreLifecycleListener
Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.