|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.jdo.tck.JDO_Test
org.apache.jdo.tck.api.instancecallbacks.AbstractInstanceLifecycleListener
Title: Abstract test AbstractInstanceLifecycleListener
Keywords: LifeCycleListener lifecycle listener callback
Assertion IDs: A12.15-1, A12.15-2, A12.15-3, A12.15-4, A12.15-5,
A12.15-6, A12.15-7, A12.15-8, A12.15-9, A12.15-10, A12.15-11, A12.15-12,
A12.15-13, A12.15-14,
Assertion Description:
A12.15-1 void postCreate(InstanceLifecycleEvent event);
This method is called whenever a persistent instance is created,
during makePersistent. It is called after the instance transitions
to persistent-new.
A12.15-2 void postLoad(InstanceLifecycleEvent event);
This method is called whenever a persistent instance is loaded.
It is called after the jdoPostLoad method is invoked on the instance.
A12.15-3 void preStore(InstanceLifecycleEvent event);
This method is called whenever a persistent instance is stored,
for example during flush or commit. It is called
before the jdoPreStore method is invoked on the instance.
A12.15-4 void postStore(InstanceLifecycleEvent event);
This method is called whenever a persistent instance is stored,
for example during flush or commit. It is called
after the jdoPreStore method is invoked on the instance.
An object identity for a per?sistent-new instance must have been assigned
to the instance when this callback is invoked.
A12.15-5 void preClear(InstanceLifecycleEvent event);
This method is called whenever a persistent instance
is cleared, for example during afterCompletion. It is called
before the jdoPreClear method is invoked on the instance.
A12.15-6 void postClear(InstanceLifecycleEvent event);
This method is called whenever a persistent instance
is cleared, for example during afterCom?pletion. It is called
after the jdoPreClear method is invoked on the instance and the fields
have been cleared by the JDO implementation.
A12.15-7 void preDelete(InstanceLifecycleEvent event);
This method is called whenever a persistent instance
is deleted, during deletePersistent. It is called before
the state transition and before the jdoPreDelete method
is invoked on the instance.
A12.15-8 void postDelete(InstanceLifecycleEvent event);
This method is called whenever a persistent instance
is deleted, during deletePersistent. It is called
after the jdoPreDelete method is invoked on the instance
and after the state transition.
A12.15-9 void preDirty(InstanceLifecycleEvent event);
This method is called whenever a persistent clean instance
is first made dirty, during an operation that modifies
the value of a persistent or transactional field. It is called
before the field value is changed.
A12.15-10 void postDirty(InstanceLifecycleEvent event);
This method is called whenever a persistent clean instance
is first made dirty, during an operation that modifies
the value of a persistent or transactional field. It is called
after the field value was changed.
A12.15-11 void preDetach(InstanceLifecycleEvent event);
This method is called before a persistent instance is copied
for detachment.
A12.15-12 void postDetach(InstanceLifecycleEvent event);
This method is called whenever a persistent instance is copied
for detachment.
The source instance is the detached copy; the target instance
is the persistent instance.
A12.15-13 void preAttach(InstanceLifecycleEvent event);
This method is called before a detached instance is attached.
The source instance is the detached instance].
A12.15-14 void postAttach(InstanceLifecycleEvent event);
This method is called after a detached instance is attached.
The source instance is the corresponding persistent instance in the cache;
the target instance is the detached instance.
This is the abstract base class for the lifecycle listener test classes.
It contains constants, variables, and methods used by each listener test
class. This class implements the setup and teardown methods used by each
concrete test class.
This class also includes the listener base class that is extended by
each specific listener.
The strategy of each test case is the same. A specific listener is
implemented that responds only to events for that specific test; a
specific persistence-capable class is also implemented, that responds
only to callbacks for the specific test. A sequence of operations that
stimulates the callbacks is executed. During these operations, listener
events and callbacks are collected by the listener instance. Finally,
the actual events and callbacks that were collected are analyzed and
differences are reported.
Nested Class Summary | |
protected static class |
AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl
The LifeCycleListener to be registered with the PersistenceManager. |
Field Summary | |
protected static java.lang.String |
ASSERTION1_FAILED
|
protected static java.lang.String |
ASSERTION10_FAILED
|
protected static java.lang.String |
ASSERTION11_FAILED
|
protected static java.lang.String |
ASSERTION12_FAILED
|
protected static java.lang.String |
ASSERTION13_FAILED
|
protected static java.lang.String |
ASSERTION14_FAILED
|
protected static java.lang.String |
ASSERTION2_FAILED
|
protected static java.lang.String |
ASSERTION3_FAILED
|
protected static java.lang.String |
ASSERTION4_FAILED
|
protected static java.lang.String |
ASSERTION5_FAILED
|
protected static java.lang.String |
ASSERTION6_FAILED
|
protected static java.lang.String |
ASSERTION7_FAILED
|
protected static java.lang.String |
ASSERTION8_FAILED
|
protected static java.lang.String |
ASSERTION9_FAILED
|
Fields inherited from class org.apache.jdo.tck.JDO_Test |
APPLICATION_IDENTITY, cleanupData, closePMFAfterEachTest, DATASTORE_IDENTITY, debug, DETACHED_CLEAN, DETACHED_DIRTY, HOLLOW, identitytype, ILLEGAL_STATE, logger, messages, NL, NUM_STATES, PERSISTENT_CLEAN, PERSISTENT_DELETED, PERSISTENT_DIRTY, PERSISTENT_NEW, PERSISTENT_NEW_DELETED, PERSISTENT_NONTRANSACTIONAL, PERSISTENT_NONTRANSACTIONAL_DIRTY, pm, pmf, PMFProperties, PMFPropertiesObject, states, testSucceeded, TRANSIENT, TRANSIENT_CLEAN, TRANSIENT_DIRTY |
Constructor Summary | |
AbstractInstanceLifecycleListener()
|
Method Summary | |
protected void |
addListener()
Register a new InstanceLifecycleListenerImpl with the PersistenceManager. |
protected abstract AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl |
getListener()
The listener to be used for the test. |
protected abstract java.lang.Class[] |
getPersistentClasses()
The classes to be used for the test. |
protected void |
localSetUp()
Set up for lifecycle tests: Register the LifecycleListener; add PCPoint to tearDownClasses. |
protected void |
localTearDown()
Clean up after lifecycle tests: Unregister the LifecycleListener. |
protected void |
removeListener()
Unregister the InstanceLifecycleListenerImpl with the PersistenceManager. |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final java.lang.String ASSERTION1_FAILED
protected static final java.lang.String ASSERTION2_FAILED
protected static final java.lang.String ASSERTION3_FAILED
protected static final java.lang.String ASSERTION4_FAILED
protected static final java.lang.String ASSERTION5_FAILED
protected static final java.lang.String ASSERTION6_FAILED
protected static final java.lang.String ASSERTION7_FAILED
protected static final java.lang.String ASSERTION8_FAILED
protected static final java.lang.String ASSERTION9_FAILED
protected static final java.lang.String ASSERTION10_FAILED
protected static final java.lang.String ASSERTION11_FAILED
protected static final java.lang.String ASSERTION12_FAILED
protected static final java.lang.String ASSERTION13_FAILED
protected static final java.lang.String ASSERTION14_FAILED
Constructor Detail |
public AbstractInstanceLifecycleListener()
Method Detail |
protected abstract AbstractInstanceLifecycleListener.InstanceLifecycleListenerImpl getListener()
protected abstract java.lang.Class[] getPersistentClasses()
protected void addListener()
protected void removeListener()
protected void localSetUp()
localSetUp
in class JDO_Test
protected void localTearDown()
localTearDown
in class JDO_Test
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |