if (actionName.equals(ACTION_EXECUTE_FQN)) {
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { EntityContainer container = name2Container.get(entityContainer); if (container != null) { List<AssociationSet> associations = container.getAssociationSets(); for (AssociationSet associationSet : associations) { if (associationSet.getAssociation().equals(association)) { final AssociationSetEnd endOne = associationSet.getEnd1(); if (endOne.getRole().equals(sourceEntitySetRole) && endOne.getEntitySet().equals(sourceEntitySetName)) { return associationSet; } final AssociationSetEnd endTwo = associationSet.getEnd2(); if (endTwo.getRole().equals(sourceEntitySetRole) && endTwo.getEntitySet().equals(sourceEntitySetName)) { return associationSet; } } } } return null; }
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { EntityContainer container = name2Container.get(entityContainer); if (container != null) { List<AssociationSet> associations = container.getAssociationSets(); for (AssociationSet associationSet : associations) { if (associationSet.getAssociation().equals(association)) { final AssociationSetEnd endOne = associationSet.getEnd1(); if (endOne.getRole().equals(sourceEntitySetRole) && endOne.getEntitySet().equals(sourceEntitySetName)) { return associationSet; } final AssociationSetEnd endTwo = associationSet.getEnd2(); if (endTwo.getRole().equals(sourceEntitySetRole) && endTwo.getEntitySet().equals(sourceEntitySetName)) { return associationSet; } } } } return null; }
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { EntityContainer container = name2Container.get(entityContainer); if (container != null) { List<AssociationSet> associations = container.getAssociationSets(); for (AssociationSet associationSet : associations) { if (associationSet.getAssociation().equals(association)) { final AssociationSetEnd endOne = associationSet.getEnd1(); if (endOne.getRole().equals(sourceEntitySetRole) && endOne.getEntitySet().equals(sourceEntitySetName)) { return associationSet; } final AssociationSetEnd endTwo = associationSet.getEnd2(); if (endTwo.getRole().equals(sourceEntitySetRole) && endTwo.getEntitySet().equals(sourceEntitySetName)) { return associationSet; } } } } return null; }
private String getEntitySetName(final AssociationEnd end) { for (EntitySet entitySet : entitySets) { if (entitySet.getEntityType().equals(end.getType())) { return entitySet.getName(); } } throw new ODataRuntimeException("No entity set found for " + end.getType()); } }
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { EntityContainer container = null; if (!entityContainerInfos.containsKey(entityContainer)) { container = (EntityContainer) getEntityContainerInfo(entityContainer); } else { container = (EntityContainer) entityContainerInfos.get(entityContainer); } if (container != null && association != null && container.getAssociationSets() != null) { for (AssociationSet as : container.getAssociationSets()) { if (association.equals(as.getAssociation())) { AssociationSetEnd end = as.getEnd1(); if (sourceEntitySetName.equals(end.getEntitySet()) && sourceEntitySetRole.equals(end.getRole())) { return as; } else { end = as.getEnd2(); if (sourceEntitySetName.equals(end.getEntitySet()) && sourceEntitySetRole.equals(end.getRole())) { return as; } } } } } return null; }
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { EntityContainer container = null; if (!entityContainerInfos.containsKey(entityContainer)) { container = (EntityContainer) getEntityContainerInfo(entityContainer); } else { container = (EntityContainer) entityContainerInfos.get(entityContainer); } if (container != null && association != null && container.getAssociationSets() != null) { for (AssociationSet as : container.getAssociationSets()) { if (association.equals(as.getAssociation())) { AssociationSetEnd end = as.getEnd1(); if (sourceEntitySetName.equals(end.getEntitySet()) && sourceEntitySetRole.equals(end.getRole())) { return as; } else { end = as.getEnd2(); if (sourceEntitySetName.equals(end.getEntitySet()) && sourceEntitySetRole.equals(end.getRole())) { return as; } } } } } return null; }
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { for (Schema schema : dataServices.getSchemas()) { for (EntityContainer container : schema.getEntityContainers()) { if (container.getName().equals(entityContainer)) { for (AssociationSet associationSet : container.getAssociationSets()) { if (associationSet.getAssociation().equals(association) && ((associationSet.getEnd1().getEntitySet().equals(sourceEntitySetName) && associationSet.getEnd1() .getRole().equals(sourceEntitySetRole)) || (associationSet.getEnd2().getEntitySet().equals(sourceEntitySetName) && associationSet.getEnd2() .getRole().equals(sourceEntitySetRole)))) { return associationSet; } } } } } return null; }
private String getEntitySetName(final AssociationEnd end) throws ODataException { for (EntitySet entitySet : entitySets) { if (entitySet.getEntityType().equals(end.getType())) { return entitySet.getName(); } } throw new ODataException("No entity set found for " + end.getType()); } }
private String getEntitySetName(final AssociationEnd end) throws ODataException { for (EntitySet entitySet : entitySets) { if (entitySet.getEntityType().equals(end.getType())) { return entitySet.getName(); } } throw new ODataException("No entity set found for " + end.getType()); } }
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { for (Schema schema : dataServices.getSchemas()) { for (EntityContainer container : schema.getEntityContainers()) { if (container.getName().equals(entityContainer)) { for (AssociationSet associationSet : container.getAssociationSets()) { if (associationSet.getAssociation().equals(association) && ((associationSet.getEnd1().getEntitySet().equals(sourceEntitySetName) && associationSet.getEnd1() .getRole().equals(sourceEntitySetRole)) || (associationSet.getEnd2().getEntitySet().equals(sourceEntitySetName) && associationSet.getEnd2() .getRole().equals(sourceEntitySetRole)))) { return associationSet; } } } } } return null; }
@Override public AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association, final String sourceEntitySetName, final String sourceEntitySetRole) throws ODataException { for (Schema schema : dataServices.getSchemas()) { for (EntityContainer container : schema.getEntityContainers()) { if (container.getName().equals(entityContainer)) { for (AssociationSet associationSet : container.getAssociationSets()) { if (associationSet.getAssociation().equals(association) && ((associationSet.getEnd1().getEntitySet().equals(sourceEntitySetName) && associationSet.getEnd1() .getRole().equals(sourceEntitySetRole)) || (associationSet.getEnd2().getEntitySet().equals(sourceEntitySetName) && associationSet.getEnd2() .getRole().equals(sourceEntitySetRole)))) { return associationSet; } } } } } return null; }
if(end1Type.equals(currentAssociationEnd1Type) && end2Type.equals(currentAssociationEnd2Type) && end1eqCurEnd1 && end2eqCurEnd2) { return true; if(end1Type.equals(currentAssociationEnd2Type) && end2Type.equals(currentAssociationEnd1Type) && end1EqCurEnd2 && end2EqCurEnd1) { return true; boolean end2IsOne = end2.getMultiplicity() == EdmMultiplicity.ONE; if (end1Type.equals(currentAssociationEnd1Type) && end2Type.equals(currentAssociationEnd2Type)) { if ((end1IsZeroToOne && currentAssociationEnd1.getMultiplicity() == EdmMultiplicity.ONE || end1IsOne && currentAssociationEnd1.getMultiplicity() == EdmMultiplicity.ZERO_TO_ONE) if (end2Type.equals(currentAssociationEnd1Type) && end1Type.equals(currentAssociationEnd2Type)) { if ((end1IsZeroToOne && currentAssociationEnd2.getMultiplicity() == EdmMultiplicity.ONE || end1IsOne && currentAssociationEnd2.getMultiplicity() == EdmMultiplicity.ZERO_TO_ONE)
if(end1Type.equals(currentAssociationEnd1Type) && end2Type.equals(currentAssociationEnd2Type) && end1eqCurEnd1 && end2eqCurEnd2) { return true; if(end1Type.equals(currentAssociationEnd2Type) && end2Type.equals(currentAssociationEnd1Type) && end1EqCurEnd2 && end2EqCurEnd1) { return true; boolean end2IsOne = end2.getMultiplicity() == EdmMultiplicity.ONE; if (end1Type.equals(currentAssociationEnd1Type) && end2Type.equals(currentAssociationEnd2Type)) { if ((end1IsZeroToOne && currentAssociationEnd1.getMultiplicity() == EdmMultiplicity.ONE || end1IsOne && currentAssociationEnd1.getMultiplicity() == EdmMultiplicity.ZERO_TO_ONE) if (end2Type.equals(currentAssociationEnd1Type) && end1Type.equals(currentAssociationEnd2Type)) { if ((end1IsZeroToOne && currentAssociationEnd2.getMultiplicity() == EdmMultiplicity.ONE || end1IsOne && currentAssociationEnd2.getMultiplicity() == EdmMultiplicity.ZERO_TO_ONE)