@Override protected Edm createEdm(final EdmProvider provider) { return new EdmImplProv(provider); }
public EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainer) throws EdmException { this.edm = edm; this.entityContainer = entityContainer; edmEntitySets = new HashMap<String, EdmEntitySet>(); edmAssociationSets = new HashMap<String, EdmAssociationSet>(); edmFunctionImports = new HashMap<String, EdmFunctionImport>(); isDefaultContainer = entityContainer.isDefaultEntityContainer(); if (entityContainer.getExtendz() != null) { edmExtendedEntityContainer = edm.getEntityContainer(entityContainer.getExtendz()); if (edmExtendedEntityContainer == null) { throw new EdmException(EdmException.COMMON); } } }
private void resolveBaseType() throws EdmException { FullQualifiedName fqName = structuralType.getBaseType(); if (fqName != null) { if (EdmTypeKind.COMPLEX.equals(edmTypeKind)) { edmBaseType = edm.getComplexType(fqName.getNamespace(), fqName.getName()); } else if (EdmTypeKind.ENTITY.equals(edmTypeKind)) { edmBaseType = edm.getEntityType(fqName.getNamespace(), fqName.getName()); } if (edmBaseType == null) { throw new EdmException(EdmException.COMMON); } } }
@Override public EdmEntityType getEntityType() throws EdmException { final FullQualifiedName type = associationEnd.getType(); EdmEntityType entityType = edm.getEntityType(type.getNamespace(), type.getName()); if (entityType == null) { throw new EdmException(EdmException.COMMON); } return entityType; }
@Override public EdmAssociation getRelationship() throws EdmException { final FullQualifiedName relationship = navigationProperty.getRelationship(); return edm.getAssociation(relationship.getNamespace(), relationship.getName()); }
@Override protected List<EdmEntitySet> createEntitySets() throws ODataException { List<EdmEntitySet> edmEntitySets = new ArrayList<EdmEntitySet>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContainers()) { for (EntitySet entitySet : entityContainer.getEntitySets()) { EdmEntityContainer edmEntityContainer = createEntityContainer(entityContainer.getName()); edmEntitySets.add(new EdmEntitySetImplProv(this, entitySet, edmEntityContainer)); } } } return edmEntitySets; }
@Override public EdmType getType() throws EdmException { if (edmType == null) { edmType = edm.getComplexType(property.getType().getNamespace(), property.getType().getName()); } if (edmType == null) { throw new EdmException(EdmException.PROVIDERPROBLEM); } return edmType; }
private void resolveBaseType() throws EdmException { FullQualifiedName fqName = structuralType.getBaseType(); if (fqName != null) { if (EdmTypeKind.COMPLEX.equals(edmTypeKind)) { edmBaseType = edm.getComplexType(fqName.getNamespace(), fqName.getName()); } else if (EdmTypeKind.ENTITY.equals(edmTypeKind)) { edmBaseType = edm.getEntityType(fqName.getNamespace(), fqName.getName()); } if (edmBaseType == null) { throw new EdmException(EdmException.COMMON); } } }
@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 EdmAssociation getRelationship() throws EdmException { final FullQualifiedName relationship = navigationProperty.getRelationship(); return edm.getAssociation(relationship.getNamespace(), relationship.getName()); }
@Override protected List<EdmFunctionImport> createFunctionImports() throws ODataException { List<EdmFunctionImport> edmFunctionImports = new ArrayList<EdmFunctionImport>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContainers()) { for (FunctionImport functionImport : entityContainer.getFunctionImports()) { EdmEntityContainer edmEntityContainer = createEntityContainer(entityContainer.getName()); edmFunctionImports.add(new EdmFunctionImportImplProv(this, functionImport, edmEntityContainer)); } } } return edmFunctionImports; }
@Override public EdmType getType() throws EdmException { if (edmType == null) { edmType = edm.getComplexType(property.getType().getNamespace(), property.getType().getName()); } if (edmType == null) { throw new EdmException(EdmException.PROVIDERPROBLEM); } return edmType; }
@Override public EdmType getType() throws EdmException { if (edmType == null) { final String namespace = typeName.getNamespace(); if (EdmSimpleType.EDM_NAMESPACE.equals(typeName.getNamespace())) { edmType = EdmSimpleTypeFacadeImpl.getEdmSimpleType(EdmSimpleTypeKind.valueOf(typeName.getName())); } else { edmType = edm.getComplexType(namespace, typeName.getName()); } if (edmType == null) { edmType = edm.getEntityType(namespace, typeName.getName()); } if (edmType == null) { throw new EdmException(EdmException.COMMON); } } return edmType; }
@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 EdmAssociation getRelationship() throws EdmException { final FullQualifiedName relationship = navigationProperty.getRelationship(); return edm.getAssociation(relationship.getNamespace(), relationship.getName()); }
@Override protected Edm createEdm(final EdmProvider provider) { return new EdmImplProv(provider); }
@Override protected List<EdmEntitySet> createEntitySets() throws ODataException { List<EdmEntitySet> edmEntitySets = new ArrayList<EdmEntitySet>(); if (schemas == null) { schemas = edmProvider.getSchemas(); } for (Schema schema : schemas) { for (EntityContainer entityContainer : schema.getEntityContainers()) { for (EntitySet entitySet : entityContainer.getEntitySets()) { EdmEntityContainer edmEntityContainer = createEntityContainer(entityContainer.getName()); edmEntitySets.add(new EdmEntitySetImplProv(this, entitySet, edmEntityContainer)); } } } return edmEntitySets; }
@Override public EdmType getType() throws EdmException { if (edmType == null) { edmType = edm.getComplexType(property.getType().getNamespace(), property.getType().getName()); } if (edmType == null) { throw new EdmException(EdmException.PROVIDERPROBLEM); } return edmType; }
public EdmEntityContainerImplProv(final EdmImplProv edm, final EntityContainerInfo entityContainerInfo) throws EdmException { this.edm = edm; this.entityContainerInfo = entityContainerInfo; edmEntitySets = new HashMap<String, EdmEntitySet>(); edmAssociationSets = new HashMap<String, EdmAssociationSet>(); edmFunctionImports = new HashMap<String, EdmFunctionImport>(); isDefaultContainer = entityContainerInfo.isDefaultEntityContainer(); if (entityContainerInfo.getExtendz() != null) { edmExtendedEntityContainer = edm.getEntityContainer(entityContainerInfo.getExtendz()); if (edmExtendedEntityContainer == null) { throw new EdmException(EdmException.COMMON); } } }
@Override public EdmType getType() throws EdmException { if (edmType == null) { final String namespace = typeName.getNamespace(); if (EdmSimpleType.EDM_NAMESPACE.equals(typeName.getNamespace())) { edmType = EdmSimpleTypeFacadeImpl.getEdmSimpleType(EdmSimpleTypeKind.valueOf(typeName.getName())); } else { edmType = edm.getComplexType(namespace, typeName.getName()); } if (edmType == null) { edmType = edm.getEntityType(namespace, typeName.getName()); } if (edmType == null) { throw new EdmException(EdmException.COMMON); } } return edmType; }