use of org.eclipse.persistence.mappings.structures.ObjectArrayMapping in project eclipselink by eclipse-ee4j.
the class ORDescriptorTestSuite method tbl3Asserts.
protected void tbl3Asserts(ClassDescriptor tbl3Descriptor) {
assertTrue("Wrong Java class name. Expected [" + TBL3_DESCRIPTOR_JAVACLASSNAME + "] but was [" + tbl3Descriptor.getJavaClassName() + "]", tbl3Descriptor.getJavaClassName().equals(TBL3_DESCRIPTOR_JAVACLASSNAME));
Vector<DatabaseMapping> mappings = tbl3Descriptor.getMappings();
assertTrue("Wrong number of mappings. Expected [1] but was [" + mappings.size() + "]", mappings.size() == 1);
DatabaseMapping mapping = mappings.get(0);
assertTrue("Incorrect mapping attribute name. Expected [" + BaseDBWSBuilderHelper.ITEMS_MAPPING_ATTRIBUTE_NAME + "] but was [" + mapping.getAttributeName() + "]", mapping.getAttributeName().equals(BaseDBWSBuilderHelper.ITEMS_MAPPING_ATTRIBUTE_NAME));
assertTrue("Incorrect mapping field name. Expected [" + BaseDBWSBuilderHelper.ITEMS_MAPPING_FIELD_NAME + "] but was [" + mapping.getField().getName() + "]", mapping.getField().getName().equals(BaseDBWSBuilderHelper.ITEMS_MAPPING_FIELD_NAME));
assertTrue("Incorrect mapping type. Expected [AbstractCompositeCollection mapping] but was [" + mapping.getClass().getName() + "]", mapping.isAbstractCompositeCollectionMapping());
ObjectArrayMapping oArrayMapping = (ObjectArrayMapping) mapping;
assertTrue("Incorrect structure name. Expected [" + TBL3_COMPATIBLETYPE + "] but was [" + oArrayMapping.getStructureName() + "]", oArrayMapping.getStructureName().equals(TBL3_COMPATIBLETYPE));
assertTrue("Incorrect reference class name. Expected [" + ARECORD_DESCRIPTOR_JAVACLASSNAME + "] but was [" + oArrayMapping.getReferenceClassName() + "]", oArrayMapping.getReferenceClassName().equals(ARECORD_DESCRIPTOR_JAVACLASSNAME));
}
Aggregations