Search in sources :

Example 31 with Sequence

use of commonj.sdo.Sequence in project eclipselink by eclipse-ee4j.

the class ChangeSummaryGetOldSequenceTestCases method testGetOldSequenceDetachedAddress.

public void testGetOldSequenceDetachedAddress() {
    cs.beginLogging();
    address1Object.detach();
    Sequence oldSeq = cs.getOldSequence(address1Object);
    assertNotNull(oldSeq);
    assertEquals(4, ((SDOSequence) oldSeq).getSettings().size());
    assertEquals("name", oldSeq.getProperty(0).getName());
    assertEquals("street", oldSeq.getProperty(1).getName());
    assertEquals("city", oldSeq.getProperty(2).getName());
    assertEquals("state", oldSeq.getProperty(3).getName());
    assertEquals("Alice Smith", oldSeq.getValue(0));
    assertEquals("123 Maple Street", oldSeq.getValue(1));
    assertEquals("Mill Valley", oldSeq.getValue(2));
    assertEquals("CA", oldSeq.getValue(3));
}
Also used : Sequence(commonj.sdo.Sequence) SDOSequence(org.eclipse.persistence.sdo.SDOSequence) SDOSequence(org.eclipse.persistence.sdo.SDOSequence)

Example 32 with Sequence

use of commonj.sdo.Sequence in project eclipselink by eclipse-ee4j.

the class ChangeSummaryGetOldSequenceTestCases method testGetOldSequenceNotLoggingNull.

public void testGetOldSequenceNotLoggingNull() {
    purchaseOrderObject.unset("address");
    cs.endLogging();
    address1Object.unset(address1Object.getInstanceProperty("city"));
    Sequence oldAddressSeq = cs.getOldSequence(address1Object);
    assertNotNull(oldAddressSeq);
}
Also used : Sequence(commonj.sdo.Sequence) SDOSequence(org.eclipse.persistence.sdo.SDOSequence)

Aggregations

Sequence (commonj.sdo.Sequence)32 SDOSequence (org.eclipse.persistence.sdo.SDOSequence)29 DataObject (commonj.sdo.DataObject)18 SDODataObject (org.eclipse.persistence.sdo.SDODataObject)12 List (java.util.List)10 ArrayList (java.util.ArrayList)8 ChangeSummary (commonj.sdo.ChangeSummary)7 SDOChangeSummary (org.eclipse.persistence.sdo.SDOChangeSummary)6 SDOType (org.eclipse.persistence.sdo.SDOType)4 Property (commonj.sdo.Property)3 DataHelper (commonj.sdo.helper.DataHelper)1 TypeHelper (commonj.sdo.helper.TypeHelper)1 Iterator (java.util.Iterator)1 SDOException (org.eclipse.persistence.exceptions.SDOException)1 XMLConversionManager (org.eclipse.persistence.internal.oxm.XMLConversionManager)1 XMLRoot (org.eclipse.persistence.oxm.XMLRoot)1 XMLUnmarshaller (org.eclipse.persistence.oxm.XMLUnmarshaller)1 SequencedObject (org.eclipse.persistence.oxm.sequenced.SequencedObject)1 SDOProperty (org.eclipse.persistence.sdo.SDOProperty)1 ListWrapper (org.eclipse.persistence.sdo.helper.ListWrapper)1