currentHandledStartTagName = reader.getLocalName(); if (XmlMetadataConstants.EDM_ASSOCIATION_END.equals(currentHandledStartTagName)) { AssociationSetEnd associationSetEnd = new AssociationSetEnd(); associationSetEnd.setEntitySet(reader.getAttributeValue(null, XmlMetadataConstants.EDM_ENTITY_SET)); associationSetEnd.setRole(reader.getAttributeValue(null, XmlMetadataConstants.EDM_ROLE));
currentHandledStartTagName = reader.getLocalName(); if (XmlMetadataConstants.EDM_ASSOCIATION_END.equals(currentHandledStartTagName)) { AssociationSetEnd associationSetEnd = new AssociationSetEnd(); associationSetEnd.setEntitySet(reader.getAttributeValue(null, XmlMetadataConstants.EDM_ENTITY_SET)); associationSetEnd.setRole(reader.getAttributeValue(null, XmlMetadataConstants.EDM_ROLE));
currentHandledStartTagName = reader.getLocalName(); if (XmlMetadataConstants.EDM_ASSOCIATION_END.equals(currentHandledStartTagName)) { AssociationSetEnd associationSetEnd = new AssociationSetEnd(); associationSetEnd.setEntitySet(reader.getAttributeValue(null, XmlMetadataConstants.EDM_ENTITY_SET)); associationSetEnd.setRole(reader.getAttributeValue(null, XmlMetadataConstants.EDM_ROLE));
associationName)); AssociationSetEnd end1 = new AssociationSetEnd(); end1.setEntitySet(sourceEntitySetName); end1.setRole(sourceRoleName); set.setEnd1(end1); AssociationSetEnd end2 = new AssociationSetEnd(); end2.setEntitySet(targetEntitySetName); end2.setRole(targetRoleName);
public void addAssociationSets(final Collection<Association> associations) throws ODataException { for (Association association : associations) { AssociationSet as = new AssociationSet(); as.setName(association.getName()); FullQualifiedName asAssociationFqn = new FullQualifiedName(namespace, association.getName()); as.setAssociation(asAssociationFqn); AssociationSetEnd asEnd1 = new AssociationSetEnd(); asEnd1.setEntitySet(getEntitySetName(association.getEnd1())); asEnd1.setRole(association.getEnd1().getRole()); as.setEnd1(asEnd1); AssociationSetEnd asEnd2 = new AssociationSetEnd(); asEnd2.setEntitySet(getEntitySetName(association.getEnd2())); asEnd2.setRole(association.getEnd2().getRole()); as.setEnd2(asEnd2); associationSets.add(as); } }
public void addAssociationSets(final Collection<Association> associations) throws ODataException { for (Association association : associations) { AssociationSet as = new AssociationSet(); as.setName(association.getName()); FullQualifiedName asAssociationFqn = new FullQualifiedName(namespace, association.getName()); as.setAssociation(asAssociationFqn); AssociationSetEnd asEnd1 = new AssociationSetEnd(); asEnd1.setEntitySet(getEntitySetName(association.getEnd1())); asEnd1.setRole(association.getEnd1().getRole()); as.setEnd1(asEnd1); AssociationSetEnd asEnd2 = new AssociationSetEnd(); asEnd2.setEntitySet(getEntitySetName(association.getEnd2())); asEnd2.setRole(association.getEnd2().getRole()); as.setEnd2(asEnd2); associationSets.add(as); } }
public void addAssociationSets(final Collection<Association> associations) { for (Association association : associations) { AssociationSet as = new AssociationSet(); as.setName(association.getName()); FullQualifiedName asAssociationFqn = new FullQualifiedName(namespace, association.getName()); as.setAssociation(asAssociationFqn); AssociationSetEnd asEnd1 = new AssociationSetEnd(); asEnd1.setEntitySet(getEntitySetName(association.getEnd1())); asEnd1.setRole(association.getEnd1().getRole()); as.setEnd1(asEnd1); AssociationSetEnd asEnd2 = new AssociationSetEnd(); asEnd2.setEntitySet(getEntitySetName(association.getEnd2())); asEnd2.setRole(association.getEnd2().getRole()); as.setEnd2(asEnd2); associationSets.add(as); } }
private AssociationSetEnd clone(AssociationSetEnd setEnd) { if (setEnd == null) { return null; } AssociationSetEnd newSetEnd = new AssociationSetEnd(); newSetEnd.setAnnotationAttributes(setEnd.getAnnotationAttributes()); newSetEnd.setAnnotationElements(setEnd.getAnnotationElements()); newSetEnd.setDocumentation(setEnd.getDocumentation()); newSetEnd.setEntitySet(setEnd.getEntitySet()); newSetEnd.setRole(setEnd.getRole()); return newSetEnd; }
fQname = entitySet.getEntityType(); if (fQname.equals(end1Type)) { AssociationSetEnd end = new AssociationSetEnd(); end.setEntitySet(entitySet.getName()); currentAssociationSet.setEnd1(end); AssociationSetEnd end = new AssociationSetEnd(); end.setEntitySet(entitySet.getName()); currentAssociationSet.setEnd2(end);
fQname = entitySet.getEntityType(); if (fQname.equals(end1Type)) { AssociationSetEnd end = new AssociationSetEnd(); end.setEntitySet(entitySet.getName()); currentAssociationSet.setEnd1(end); AssociationSetEnd end = new AssociationSetEnd(); end.setEntitySet(entitySet.getName()); currentAssociationSet.setEnd2(end);