String association = reader.getAttributeValue(null, XmlMetadataConstants.EDM_ASSOCIATION); if (association != null) { associationSet.setAssociation(extractFQName(association)); } else { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE
String association = reader.getAttributeValue(null, XmlMetadataConstants.EDM_ASSOCIATION); if (association != null) { associationSet.setAssociation(extractFQName(association)); } else { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE
String association = reader.getAttributeValue(null, XmlMetadataConstants.EDM_ASSOCIATION); if (association != null) { associationSet.setAssociation(extractFQName(association)); } else { throw new EntityProviderException(EntityProviderException.MISSING_ATTRIBUTE
private void includeAssociationSet(Schema targetSchema, EntityContainer targetContainer, IServiceInfo service, AssociationSet sourceSet) throws ODataException { List<AssociationSet> sets = targetContainer.getAssociationSets(); if (sets != null) { for (AssociationSet set : sets) { if (set.getName().equals(sourceSet.getName())) { throw new ODataException("association set " + sourceSet.getName() + " already defined"); } } } else { sets = new ArrayList<AssociationSet>(); } AssociationSet newSet = clone(sourceSet); newSet.setAssociation(new FullQualifiedName( targetSchema.getNamespace(), newSet.getAssociation().getName())); sets.add(newSet); targetContainer.setAssociationSets(sets); }
set.setAssociation(new FullQualifiedName(schema.getNamespace(), associationName));
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); } }
private AssociationSet clone(AssociationSet set) { if (set == null) { return null; } AssociationSet newSet = new AssociationSet(); newSet.setAnnotationAttributes(set.getAnnotationAttributes()); newSet.setAnnotationElements(set.getAnnotationElements()); newSet.setAssociation(set.getAssociation()); newSet.setDocumentation(set.getDocumentation()); newSet.setEnd1(clone(set.getEnd1())); newSet.setEnd2(clone(set.getEnd2())); newSet.setName(set.getName()); return newSet; }
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); } }
new FullQualifiedName(schemaView.getEdmSchema().getNamespace(), association.getName()); currentAssociationSet = new AssociationSet(); currentAssociationSet.setAssociation(fQname);
new FullQualifiedName(schemaView.getEdmSchema().getNamespace(), association.getName()); currentAssociationSet = new AssociationSet(); currentAssociationSet.setAssociation(fQname);