return edmComplexType;
}
public static JPAEdmMapping mockEdmMapping(final String entityName, final String propertyName,
final String navigationPropertyName) {
JPAEdmMapping mapping = new JPAEdmMappingImpl();
if (propertyName == null && entityName != null) {
if (entityName.equals(JPATypeMock.ENTITY_NAME)) {
mapping.setJPAType(JPATypeMock.class);
} else if (entityName.equals(JPARelatedTypeMock.ENTITY_NAME)) {
mapping.setJPAType(JPARelatedTypeMock.class);
} else if (entityName.equals(JPATypeEmbeddableMock.ENTITY_NAME)) {
mapping.setJPAType(JPATypeEmbeddableMock.class);
} else if (entityName.equals(JPATypeEmbeddableMock2.ENTITY_NAME)) {
mapping.setJPAType(JPATypeEmbeddableMock2.class);
}
} else if (entityName == null && navigationPropertyName != null) {
mapping.setJPAType(JPARelatedTypeMock.class);
mapping.setJPAColumnName(JPATypeMock.NAVIGATION_PROPERTY_X);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MINT)) {
mapping.setJPAType(int.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MINT);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MSTRING)) {
mapping.setJPAType(String.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MSTRING);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MBLOB)) {
mapping.setJPAType(Blob.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MBLOB);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_CLOB)) {
mapping.setJPAType(Clob.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_CLOB);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MC)) {
mapping.setJPAType(char.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MC);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MCARRAY)) {
mapping.setJPAType(char[].class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MCARRAY);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MCHAR)) {
mapping.setJPAType(Character.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MCHAR);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MCHARARRAY)) {
mapping.setJPAType(Character[].class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MCHARARRAY);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MDATETIME)) {
mapping.setJPAType(Calendar.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MDATETIME);
} else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MLONG)) {
mapping.setJPAType(long.class);
((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MLONG);
} else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE)) {
mapping.setJPAType(double.class);
((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MDOUBLE);
} else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MBYTE)) {
mapping.setJPAType(byte.class);
((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MBYTE);
} else if (propertyName.equals(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY)) {
mapping.setJPAType(byte[].class);
((Mapping) mapping).setInternalName(JPARelatedTypeMock.PROPERTY_NAME_MBYTEARRAY);
} else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT)) {
mapping.setJPAType(Short.TYPE);
((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MSHORT);
} else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT)) {
mapping.setJPAType(Float.TYPE);
((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MFLOAT);
} else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID)) {
mapping.setJPAType(UUID.class);
((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock2.PROPERTY_NAME_MUUID);
} else if (propertyName.equals(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE)) {
mapping.setJPAType(JPATypeEmbeddableMock2.class);
((Mapping) mapping).setInternalName(JPATypeMock.JPATypeEmbeddableMock.PROPERTY_NAME_MEMBEDDABLE);
} else if (propertyName.equals(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE)) {
mapping.setJPAType(JPATypeEmbeddableMock.class);
((Mapping) mapping).setInternalName(JPATypeMock.PROPERTY_NAME_MCOMPLEXTYPE);
}
return mapping;
}