use of org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping in project eclipselink by eclipse-ee4j.
the class AnyObjectAndAnyCollectionUC14NoDefaultRootComplexChildrenTestCases method buildRootDescriptor.
protected //
ClassDescriptor buildRootDescriptor(//
boolean firstMappingIsAnyCollection, //
boolean firstMappingXPathSet, //
boolean secondMappingIsAnyCollection, boolean secondMappingXPathSet) {
//
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(Customer.class);
descriptor.setDefaultRootElement("customer");
DatabaseMapping anyMapping1 = null;
// First Mapping
if (!firstMappingIsAnyCollection) {
anyMapping1 = new XMLAnyObjectMapping();
anyMapping1.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping1).setSetMethodName("setAnyObject");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyObjectMapping) anyMapping1).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping1);
} else {
anyMapping1 = new XMLAnyCollectionMapping();
anyMapping1.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping1).setSetMethodName("setAnyCollection");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyCollectionMapping) anyMapping1).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping1);
}
// Second Mapping
DatabaseMapping anyMapping2 = null;
if (!secondMappingIsAnyCollection) {
anyMapping2 = new XMLAnyObjectMapping();
anyMapping2.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping2).setSetMethodName("setAnyObject");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyObjectMapping) anyMapping2).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping2);
} else {
anyMapping2 = new XMLAnyCollectionMapping();
anyMapping2.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping2).setSetMethodName("setAnyCollection");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyCollectionMapping) anyMapping2).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping2);
}
return descriptor;
}
use of org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping in project eclipselink by eclipse-ee4j.
the class AnyObjectAndAnyCollectionUC15NoDefaultRootComplexChildrenTestCases method buildRootDescriptor.
protected //
ClassDescriptor buildRootDescriptor(//
boolean firstMappingIsAnyCollection, //
boolean firstMappingXPathSet, //
boolean secondMappingIsAnyCollection, boolean secondMappingXPathSet) {
//
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(Customer.class);
descriptor.setDefaultRootElement("customer");
DatabaseMapping anyMapping1 = null;
// First Mapping
if (!firstMappingIsAnyCollection) {
anyMapping1 = new XMLAnyObjectMapping();
anyMapping1.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping1).setSetMethodName("setAnyObject");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyObjectMapping) anyMapping1).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping1);
} else {
anyMapping1 = new XMLAnyCollectionMapping();
anyMapping1.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping1).setSetMethodName("setAnyCollection");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyCollectionMapping) anyMapping1).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping1);
}
// Second Mapping
DatabaseMapping anyMapping2 = null;
if (!secondMappingIsAnyCollection) {
anyMapping2 = new XMLAnyObjectMapping();
anyMapping2.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping2).setSetMethodName("setAnyObject");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyObjectMapping) anyMapping2).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping2);
} else {
anyMapping2 = new XMLAnyCollectionMapping();
anyMapping2.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping2).setSetMethodName("setAnyCollection");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyCollectionMapping) anyMapping2).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping2);
}
return descriptor;
}
use of org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping in project eclipselink by eclipse-ee4j.
the class AnyObjectAndAnyCollectionUC03NoDefaultRootComplexChildrenTestCases method buildRootDescriptor.
protected //
ClassDescriptor buildRootDescriptor(//
boolean firstMappingIsAnyCollection, //
boolean firstMappingXPathSet, //
boolean secondMappingIsAnyCollection, boolean secondMappingXPathSet) {
//
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(Customer.class);
descriptor.setDefaultRootElement("customer");
DatabaseMapping anyMapping1 = null;
// First Mapping
if (!firstMappingIsAnyCollection) {
anyMapping1 = new XMLAnyObjectMapping();
anyMapping1.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping1).setSetMethodName("setAnyObject");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyObjectMapping) anyMapping1).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping1);
} else {
anyMapping1 = new XMLAnyCollectionMapping();
anyMapping1.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping1).setSetMethodName("setAnyCollection");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyCollectionMapping) anyMapping1).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping1);
}
// Second Mapping
DatabaseMapping anyMapping2 = null;
if (!secondMappingIsAnyCollection) {
anyMapping2 = new XMLAnyObjectMapping();
anyMapping2.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping2).setSetMethodName("setAnyObject");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyObjectMapping) anyMapping2).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping2);
} else {
anyMapping2 = new XMLAnyCollectionMapping();
anyMapping2.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping2).setSetMethodName("setAnyCollection");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyCollectionMapping) anyMapping2).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping2);
}
return descriptor;
}
use of org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping in project eclipselink by eclipse-ee4j.
the class AnyObjectAndAnyCollectionUC04NoDefaultRootComplexChildrenTestCases method buildRootDescriptor.
protected //
ClassDescriptor buildRootDescriptor(//
boolean firstMappingIsAnyCollection, //
boolean firstMappingXPathSet, //
boolean secondMappingIsAnyCollection, boolean secondMappingXPathSet) {
//
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(Customer.class);
descriptor.setDefaultRootElement("customer");
DatabaseMapping anyMapping1 = null;
// First Mapping
if (!firstMappingIsAnyCollection) {
anyMapping1 = new XMLAnyObjectMapping();
anyMapping1.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping1).setSetMethodName("setAnyObject");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyObjectMapping) anyMapping1).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping1);
} else {
anyMapping1 = new XMLAnyCollectionMapping();
anyMapping1.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping1).setSetMethodName("setAnyCollection");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyCollectionMapping) anyMapping1).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping1);
}
// Second Mapping
DatabaseMapping anyMapping2 = null;
if (!secondMappingIsAnyCollection) {
anyMapping2 = new XMLAnyObjectMapping();
anyMapping2.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping2).setSetMethodName("setAnyObject");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyObjectMapping) anyMapping2).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping2);
} else {
anyMapping2 = new XMLAnyCollectionMapping();
anyMapping2.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping2).setSetMethodName("setAnyCollection");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyCollectionMapping) anyMapping2).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping2);
}
return descriptor;
}
use of org.eclipse.persistence.oxm.mappings.XMLAnyObjectMapping in project eclipselink by eclipse-ee4j.
the class AnyObjectAndAnyCollectionUC05NoDefaultRootComplexChildrenTestCases method buildRootDescriptor.
protected //
ClassDescriptor buildRootDescriptor(//
boolean firstMappingIsAnyCollection, //
boolean firstMappingXPathSet, //
boolean secondMappingIsAnyCollection, boolean secondMappingXPathSet) {
//
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(Customer.class);
descriptor.setDefaultRootElement("customer");
DatabaseMapping anyMapping1 = null;
// First Mapping
if (!firstMappingIsAnyCollection) {
anyMapping1 = new XMLAnyObjectMapping();
anyMapping1.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping1).setSetMethodName("setAnyObject");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyObjectMapping) anyMapping1).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping1);
} else {
anyMapping1 = new XMLAnyCollectionMapping();
anyMapping1.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping1).setSetMethodName("setAnyCollection");
if (firstMappingXPathSet) {
// set first mapping XPath
((XMLAnyCollectionMapping) anyMapping1).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping1);
}
// Second Mapping
DatabaseMapping anyMapping2 = null;
if (!secondMappingIsAnyCollection) {
anyMapping2 = new XMLAnyObjectMapping();
anyMapping2.setAttributeName("anyObject");
// ((XMLAnyObjectMapping) anyMapping2).setSetMethodName("setAnyObject");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyObjectMapping) anyMapping2).setXPath(MAPPING_XPATH_OBJ);
}
descriptor.addMapping(anyMapping2);
} else {
anyMapping2 = new XMLAnyCollectionMapping();
anyMapping2.setAttributeName("contactMethods");
// ((XMLAnyCollectionMapping) anyMapping2).setSetMethodName("setAnyCollection");
if (secondMappingXPathSet) {
// set second mapping XPath
((XMLAnyCollectionMapping) anyMapping2).setXPath(MAPPING_XPATH);
}
descriptor.addMapping(anyMapping2);
}
return descriptor;
}
Aggregations