private void validateEntitySet() throws EntityProviderException { for (Map.Entry<FullQualifiedName, EntityContainer> container : containerMap.entrySet()) { for (EntitySet entitySet : container.getValue().getEntitySets()) { FullQualifiedName entityType = entitySet.getEntityType(); if (!(entityTypesMap.containsKey(entityType))) { validateEntityTypeWithAlias(entityType); } } } }
private void validateEntitySet() throws EntityProviderException { for (Map.Entry<FullQualifiedName, EntityContainer> container : containerMap.entrySet()) { for (EntitySet entitySet : container.getValue().getEntitySets()) { FullQualifiedName entityType = entitySet.getEntityType(); if (!(entityTypesMap.containsKey(entityType))) { validateEntityTypeWithAlias(entityType); } } } }
private void validateEntitySet() throws EntityProviderException { for (Map.Entry<FullQualifiedName, EntityContainer> container : containerMap.entrySet()) { for (EntitySet entitySet : container.getValue().getEntitySets()) { FullQualifiedName entityType = entitySet.getEntityType(); if (!(entityTypesMap.containsKey(entityType))) { validateEntityTypeWithAlias(entityType); } } } }
@Override public EdmEntityType getEntityType() throws EdmException { if (edmEntityType == null) { FullQualifiedName fqName = entitySet.getEntityType(); edmEntityType = edm.getEntityType(fqName.getNamespace(), fqName.getName()); if (edmEntityType == null) { throw new EdmException(EdmException.COMMON); } } return edmEntityType; }
@Override public EdmEntityType getEntityType() throws EdmException { if (edmEntityType == null) { FullQualifiedName fqName = entitySet.getEntityType(); edmEntityType = edm.getEntityType(fqName.getNamespace(), fqName.getName()); if (edmEntityType == null) { throw new EdmException(EdmException.COMMON); } } return edmEntityType; }
@Override public EdmEntityType getEntityType() throws EdmException { if (edmEntityType == null) { FullQualifiedName fqName = entitySet.getEntityType(); edmEntityType = edm.getEntityType(fqName.getNamespace(), fqName.getName()); if (edmEntityType == null) { throw new EdmException(EdmException.COMMON); } } return edmEntityType; }
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()); } }
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()); } }
private void includeEntitySet(Schema targetSchema, EntityContainer targetContainer, IServiceInfo service, EntitySet sourceSet) throws ODataException { List<EntitySet> targetEntitySets = targetContainer.getEntitySets(); if (targetEntitySets != null) { for (EntitySet set : targetEntitySets) { if (set.getName().equals(sourceSet.getName())) { throw new ODataException("entity set " + sourceSet.getName() + " already defined"); } } } else { targetEntitySets = new ArrayList<EntitySet>(); } EntitySet newSet = clone(sourceSet); newSet.setEntityType(new FullQualifiedName(targetSchema.getNamespace(), newSet.getEntityType().getName())); targetEntitySets.add(newSet); targetContainer.setEntitySets(targetEntitySets); MashServiceRegistry.setTargetService(_service, targetSchema, targetContainer, newSet, service); }
public static void build(final JPAEdmEntitySetView view, final JPAEdmEntityTypeView entityTypeView) { FullQualifiedName fQname = view.getEdmEntitySet().getEntityType(); JPAEdmMappingModelAccess mappingModelAccess = view.getJPAEdmMappingModelAccess(); String entitySetName = null; if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) { Mapping mapping = entityTypeView.getEdmEntityType().getMapping(); if (mapping != null) { entitySetName = mappingModelAccess.mapJPAEntitySet(mapping.getInternalName()); } } if (entitySetName == null) { entitySetName = fQname.getName(); } view.getEdmEntitySet().setName(entitySetName); }
public static void build(final JPAEdmEntitySetView view, final JPAEdmEntityTypeView entityTypeView) { FullQualifiedName fQname = view.getEdmEntitySet().getEntityType(); JPAEdmMappingModelAccess mappingModelAccess = view.getJPAEdmMappingModelAccess(); String entitySetName = null; if (mappingModelAccess != null && mappingModelAccess.isMappingModelExists()) { Mapping mapping = entityTypeView.getEdmEntityType().getMapping(); if (mapping != null) { entitySetName = mappingModelAccess.mapJPAEntitySet(mapping.getInternalName()); } } if (entitySetName == null) { entitySetName = fQname.getName() + ENTITY_SET_SUFFIX; } view.getEdmEntitySet().setName(entitySetName); }
private EntitySet clone(EntitySet set) { if (set == null) { return null; } EntitySet newSet = new EntitySet(); newSet.setAnnotationAttributes(set.getAnnotationAttributes()); newSet.setAnnotationElements(set.getAnnotationElements()); newSet.setDocumentation(set.getDocumentation()); newSet.setEntityType(set.getEntityType()); newSet.setMapping(set.getMapping()); newSet.setName(set.getName()); return newSet; }
xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_ENTITY_SET); xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_NAME, entitySet.getName()); xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_ENTITY_TYPE, entitySet.getEntityType() .toString());
xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_ENTITY_SET); xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_NAME, entitySet.getName()); xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_ENTITY_TYPE, entitySet.getEntityType() .toString());
xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_ENTITY_SET); xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_NAME, entitySet.getName()); xmlStreamWriter.writeAttribute(XmlMetadataConstants.EDM_ENTITY_TYPE, entitySet.getEntityType() .toString());
fQname = entitySet.getEntityType(); if (fQname.equals(end1Type)) { AssociationSetEnd end = new AssociationSetEnd();
fQname = entitySet.getEntityType(); if (fQname.equals(end1Type)) { AssociationSetEnd end = new AssociationSetEnd();