use of org.eclipse.persistence.sdo.helper.SDOXMLHelper in project eclipselink by eclipse-ee4j.
the class SDODataObjectGetPathTest method testGetPathFromAncestorDeletedFromChildToRootLoggingOn.
public void testGetPathFromAncestorDeletedFromChildToRootLoggingOn() {
SDODataObject anItem = (SDODataObject) aRoot5.get("billTo");
// start logging
SDOChangeSummary aCS = aRoot5.getChangeSummary();
aCS.beginLogging();
assertTrue(aCS.isLogging());
// delete source object
((SDODataObject) aRoot5.get("billTo")).detach();
String aPath = ((SDOMarshalListener) ((SDOXMLHelper) xmlHelper).getXmlMarshaller().getMarshalListener()).getPathFromAncestor(anItem, aRoot5, aRoot5.getChangeSummary());
assertNotNull(aPath);
assertEquals("ns0:billTo", aPath);
}
use of org.eclipse.persistence.sdo.helper.SDOXMLHelper in project eclipselink by eclipse-ee4j.
the class SDODataObjectGetPathTest method testGetPathFromAncestorDeletedFromChildToCurrentObjectLoggingOn.
public void testGetPathFromAncestorDeletedFromChildToCurrentObjectLoggingOn() {
SDODataObject anItem = (SDODataObject) aRoot5.get("items/item[2]");
// start logging
SDOChangeSummary aCS = aRoot5.getChangeSummary();
aCS.beginLogging();
assertTrue(aCS.isLogging());
// delete source object
anItem.delete();
String aPath = ((SDOMarshalListener) ((SDOXMLHelper) xmlHelper).getXmlMarshaller().getMarshalListener()).getPathFromAncestor(anItem, anItem, anItem.getChangeSummary());
assertNotNull(aPath);
assertEquals(SDOConstants.EMPTY_STRING, aPath);
}
use of org.eclipse.persistence.sdo.helper.SDOXMLHelper in project eclipselink by eclipse-ee4j.
the class SDODataObjectGetPathTest method testGetPathFromAncestorDeletedFromRootToSiblingLoggingOn.
public void testGetPathFromAncestorDeletedFromRootToSiblingLoggingOn() {
SDODataObject anItem = (SDODataObject) aRoot5.get("items/item[2]");
String aPath = ((SDOMarshalListener) ((SDOXMLHelper) xmlHelper).getXmlMarshaller().getMarshalListener()).getPathFromAncestor(aRoot5, anItem, aRoot5.getChangeSummary());
// start logging
SDOChangeSummary aCS = aRoot5.getChangeSummary();
aCS.beginLogging();
assertTrue(aCS.isLogging());
// delete source object
aRoot5.delete();
assertEquals(SDOConstants.SDO_XPATH_INVALID_PATH, aPath);
}
use of org.eclipse.persistence.sdo.helper.SDOXMLHelper in project eclipselink by eclipse-ee4j.
the class SDODataObjectGetPathTest method testGetPathFromAncestorFromChildToSibling.
// path would need to go up to common ancestor and back down to sibling - null for now
public void testGetPathFromAncestorFromChildToSibling() {
SDODataObject anItem = (SDODataObject) aRoot5.get("items/item[2]");
SDODataObject aSibling = (SDODataObject) aRoot5.get("shipTo");
String aPath = ((SDOMarshalListener) ((SDOXMLHelper) xmlHelper).getXmlMarshaller().getMarshalListener()).getPathFromAncestor(anItem, aSibling, anItem.getChangeSummary());
assertEquals(SDOConstants.SDO_XPATH_INVALID_PATH, aPath);
}
use of org.eclipse.persistence.sdo.helper.SDOXMLHelper in project eclipselink by eclipse-ee4j.
the class SDODataObjectGetPathTest method testGetPathFromAncestorFromChildToCurrentObject.
public void testGetPathFromAncestorFromChildToCurrentObject() {
SDODataObject anItem = (SDODataObject) aRoot5.get("items/item[2]");
String aPath = ((SDOMarshalListener) ((SDOXMLHelper) xmlHelper).getXmlMarshaller().getMarshalListener()).getPathFromAncestor(anItem, anItem, anItem.getChangeSummary());
assertNotNull(aPath);
assertEquals(SDOConstants.EMPTY_STRING, aPath);
}
Aggregations