private EdmEntityType getTargetEntityType(Edm edm, EdmEntitySet srcEtySet ,EdmNavigationProperty navigationProp) throws EdmException { if(navigationProp == null) return null ; else { //Look for Target Entity Type based on Navigation Property String toRole = navigationProp.getToRole() ; return navigationProp.getRelationship().getEnd(toRole).getEntityType(); } } private EdmEntitySet getTargetEntitySet(Edm edm, EdmEntitySet srcEtySet, EdmNavigationProperty navigationProp) throws EdmException, ODataException{
@Override public EdmType getType() throws EdmException { return getRelationship().getEnd(navigationProperty.getToRole()).getEntityType(); }
@Override public EdmType getType() throws EdmException { return getRelationship().getEnd(navigationProperty.getToRole()).getEntityType(); }
@Override public EdmType getType() throws EdmException { return getRelationship().getEnd(navigationProperty.getToRole()).getEntityType(); }
private void setAssociationSetForNavigations() throws EdmException { for(EdmEntitySet edmEntitySet:edmEntitySetList){ List<String> navigations = edmEntitySet.getEntityType().getNavigationPropertyNames(); if(navigations!=null && !navigations.isEmpty()){ for (EdmNavigationProperty navigationProperty : navProperties) { if (navigations.contains(navigationProperty.getName())) { //NOSONAR FullQualifiedName associationName = ((EdmNavigationPropertyImpl) navigationProperty).getRelationshipName(); String toRoleName = ((EdmNavigationPropertyImpl) navigationProperty).getToRole(); EdmAssociationEnd end = associationsMap.get(associationName).getEnd(toRoleName); if (end == null) { throw new EdmException(EdmException.ASSOCIATIONNOTFOUND); } String relation = associationName.toString(); StringBuilder key = new StringBuilder(); key.append(edmEntitySet.getName()); key.append(">>"); key.append(relation); key.append(">>"); key.append(navigationProperty.getFromRole()); ((EdmNavigationPropertyImpl) navigationProperty).setMultiplicity(end.getMultiplicity()); associationSetMap.put(key.toString(), tempAssociationSetMap.get(relation)); } } } } }
private EdmEntityType getTargetEntityTypeFromNavigationProperty(EdmEntityType entityType, String navigationProperty) throws EdmException { EdmNavigationProperty navProp = (EdmNavigationProperty) entityType.getProperty(navigationProperty); String toRole = navProp.getToRole(); return (EdmEntityType) navProp.getRelationship().getEnd(toRole).getEntityType(); }
EdmEntityType targetType = navigationProperty.getRelationship().getEnd(navigationProperty.getToRole()) .getEntityType(); if (navigationProperty.getMultiplicity().equals(EdmMultiplicity.MANY)) {
private String getFromEntityName(final EdmNavigationProperty navigationProperty) throws EdmException { String fromRole = navigationProperty.getFromRole(); EdmEntityType fromEntityType = navigationProperty.getRelationship().getEnd(fromRole).getEntityType(); EdmMapping mapping = fromEntityType.getMapping(); String entityName = null; if (mapping != null) { entityName = mapping.getInternalName(); } else { entityName = fromEntityType.getName(); } return entityName; }
private String getFromEntityName(final EdmNavigationProperty navigationProperty) throws EdmException { String fromRole = navigationProperty.getFromRole(); EdmEntityType fromEntityType = navigationProperty.getRelationship().getEnd(fromRole).getEntityType(); EdmMapping mapping = fromEntityType.getMapping(); String entityName = null; if (mapping != null) { entityName = mapping.getInternalName(); } else { entityName = fromEntityType.getName(); } return entityName; }
private String getFromEntityName(final EdmNavigationProperty navigationProperty) throws EdmException { String fromRole = navigationProperty.getFromRole(); EdmEntityType toEntityType = navigationProperty.getRelationship().getEnd(fromRole).getEntityType(); EdmMapping mapping = toEntityType.getMapping(); String entityName = null; if (mapping != null) { entityName = mapping.getInternalName(); } else { entityName = toEntityType.getName(); } return entityName; }
private String getFromEntityName(final EdmNavigationProperty navigationProperty) throws EdmException { String fromRole = navigationProperty.getFromRole(); EdmEntityType toEntityType = navigationProperty.getRelationship().getEnd(fromRole).getEntityType(); EdmMapping mapping = toEntityType.getMapping(); String entityName = null; if (mapping != null) { entityName = mapping.getInternalName(); } else { entityName = toEntityType.getName(); } return entityName; }
EdmAssociationEnd end = navigationProperty.getRelationship().getEnd(navigationProperty.getToRole()); switch (end.getMultiplicity()) { case MANY:
EdmAssociationEnd end = navigationProperty.getRelationship().getEnd(navigationProperty.getToRole()); switch (end.getMultiplicity()) { case MANY: