use of org.eclipse.persistence.sdo.SDOChangeSummary in project eclipselink by eclipse-ee4j.
the class SDOTestCase method assertValueStoresInitializedAfterLoggingOn.
/**
*/
// test undo when logging is off (with previous changes)
protected void assertValueStoresInitializedAfterLoggingOn(DataObject aRootObject) {
// verify logging is on
assertTrue(aRootObject.getChangeSummary().isLogging());
// verify original VS is null and save a copy of current VS for object
// identity testing after undo
ValueStore aCurrentValueStore = ((SDODataObject) aRootObject)._getCurrentValueStore();
assertNotNull(aCurrentValueStore);
ValueStore anOriginalValueStore = (ValueStore) ((SDOChangeSummary) aRootObject.getChangeSummary()).getOriginalValueStores().get(aRootObject);
assertNull(anOriginalValueStore);
}
use of org.eclipse.persistence.sdo.SDOChangeSummary in project eclipselink by eclipse-ee4j.
the class SDOTestCase method assertValueStoresReturnedToStartStateAfterUndoChanges.
/**
*/
protected void assertValueStoresReturnedToStartStateAfterUndoChanges(DataObject aRootObject, ValueStore aCurrentValueStoreAfterLoggingFirstOnParam) {
// verify logging is on
assertTrue(aRootObject.getChangeSummary().isLogging());
ValueStore anOriginalValueStoreAfterUndo = (ValueStore) ((SDOChangeSummary) aRootObject.getChangeSummary()).getOriginalValueStores().get(aRootObject);
ValueStore aCurrentValueStoreAfterUndo = ((SDODataObject) aRootObject)._getCurrentValueStore();
assertNull(anOriginalValueStoreAfterUndo);
assertNotNull(aCurrentValueStoreAfterUndo);
// we return the original value store back to the current VS
assertTrue(aCurrentValueStoreAfterUndo == aCurrentValueStoreAfterLoggingFirstOnParam);
}
use of org.eclipse.persistence.sdo.SDOChangeSummary in project eclipselink by eclipse-ee4j.
the class SDOTestCase method assertValueStoresCopiedAndSwappedAfterFirstModifyOperation.
/**
*/
protected void assertValueStoresCopiedAndSwappedAfterFirstModifyOperation(DataObject aRootObject, ValueStore aCurrentValueStoreAfterLoggingFirstOnParam) {
// verify logging is on
assertTrue(aRootObject.getChangeSummary().isLogging());
assertNotNull(aCurrentValueStoreAfterLoggingFirstOnParam);
ValueStore anOriginalValueStoreAfterOperation = (ValueStore) ((SDOChangeSummary) aRootObject.getChangeSummary()).getOriginalValueStores().get(aRootObject);
ValueStore aCurrentValueStoreAfterOperation = ((SDODataObject) aRootObject)._getCurrentValueStore();
assertNotNull(anOriginalValueStoreAfterOperation);
assertNotNull(aCurrentValueStoreAfterOperation);
assertTrue(anOriginalValueStoreAfterOperation == aCurrentValueStoreAfterLoggingFirstOnParam);
}
use of org.eclipse.persistence.sdo.SDOChangeSummary in project eclipselink by eclipse-ee4j.
the class SDOTestCase method assertSequencesReturnedToStartStateAfterUndoChanges.
/**
*/
protected void assertSequencesReturnedToStartStateAfterUndoChanges(DataObject aRootObject, Sequence aCurrentSequenceAfterLoggingFirstOnParam) {
// verify logging is on
assertTrue(aRootObject.getChangeSummary().isLogging());
SDOSequence anOriginalSequenceAfterUndo = (SDOSequence) ((SDOChangeSummary) aRootObject.getChangeSummary()).getOriginalSequences().get(aRootObject);
SDOSequence aCurrentSequenceAfterUndo = ((SDODataObject) aRootObject).getSequence();
assertNull(anOriginalSequenceAfterUndo);
assertNotNull(aCurrentSequenceAfterUndo);
// we return the sequence back to the current VS
assertEquals(aCurrentSequenceAfterUndo.size(), aCurrentSequenceAfterLoggingFirstOnParam.size());
assertTrue(compareSequences(aCurrentSequenceAfterUndo, (SDOSequence) aCurrentSequenceAfterLoggingFirstOnParam, true));
}
use of org.eclipse.persistence.sdo.SDOChangeSummary in project eclipselink by eclipse-ee4j.
the class SDOTestCase method assertSequencesCopiedAndSwappedAfterFirstModifyOperation.
protected void assertSequencesCopiedAndSwappedAfterFirstModifyOperation(DataObject aRootObject, Sequence aCurrentSequenceAfterLoggingFirstOnParam) {
// verify logging is on
assertTrue(aRootObject.getChangeSummary().isLogging());
assertNotNull(aCurrentSequenceAfterLoggingFirstOnParam);
Sequence anOriginalSequenceAfterOperation = (Sequence) ((SDOChangeSummary) aRootObject.getChangeSummary()).getOriginalSequences().get(aRootObject);
Sequence aCurrentSequenceAfterOperation = ((SDODataObject) aRootObject).getSequence();
assertNotNull(anOriginalSequenceAfterOperation);
assertNotNull(aCurrentSequenceAfterOperation);
assertTrue(anOriginalSequenceAfterOperation == aCurrentSequenceAfterLoggingFirstOnParam);
}
Aggregations