private void determinePartner(String mappedBy) throws ODataJPAModelException { if (sourceType instanceof IntermediateEntityType) { // Partner Attribute must not be defined at Complex Types. // JPA bi-directional associations are defined at both sides, e.g. // at the BusinessPartner and at the Roles. JPA only defines the // "mappedBy" at the Parent. if (mappedBy != null && !mappedBy.isEmpty()) { partner = targetType.getAssociation(mappedBy); edmNaviProperty.setPartner(partner.getExternalName()); } else { partner = targetType.getCorrespondingAssiciation(sourceType, getInternalName()); if (partner != null && ((IntermediateNavigationProperty) partner).isMapped()) { edmNaviProperty.setPartner(partner.getExternalName()); } } } }
property.setNullable(BooleanUtils.toBoolean(jp.nextTextValue())); } else if ("Partner".equals(jp.getCurrentName())) { property.setPartner(jp.nextTextValue()); } else if ("ContainsTarget".equals(jp.getCurrentName())) { property.setContainsTarget(BooleanUtils.toBoolean(jp.nextTextValue()));
property.setNullable(BooleanUtils.toBoolean(jp.nextTextValue())); } else if ("Partner".equals(jp.getCurrentName())) { property.setPartner(jp.nextTextValue()); } else if ("ContainsTarget".equals(jp.getCurrentName())) { property.setContainsTarget(BooleanUtils.toBoolean(jp.nextTextValue()));
navProp.setType(new FullQualifiedName(namespace, navigation)); navProp.setCollection(true); navProp.setPartner(entityTypeName); navigationProperties.add(navProp); navProp.setName(navigation); navProp.setType(new FullQualifiedName(namespace, navigation)); navProp.setPartner(entityTypeName); navigationProperties.add(navProp);
property.setCollection(isCollectionType(element)); property.setNullable(Boolean.parseBoolean(attr(element, "Nullable") == null ? "true" : attr(element, "Nullable"))); property.setPartner(attr(element, "Partner")); property.setContainsTarget(Boolean.parseBoolean(attr(element, "ContainsTarget")));
property.setCollection(isCollectionType(element)); property.setNullable(Boolean.parseBoolean(attr(element, "Nullable") == null ? "true" : attr(element, "Nullable"))); property.setPartner(attr(element, "Partner")); property.setContainsTarget(Boolean.parseBoolean(attr(element, "ContainsTarget")));