@Override
  protected EdmEntitySet createEntitySet(final String entitySetName) {
    final EntitySet entitySet = xmlEntityContainer.getEntitySet(entitySetName);
    if (entitySet == null) {
      throw new EdmException(
          "EntitySet named '" + entitySetName + "' not found in " + entityContainerName);
    }

    final FullQualifiedName entityType =
        new EdmTypeInfo.Builder()
            .setTypeExpression(entitySet.getEntityType())
            .setDefaultNamespace(entityContainerName.getNamespace())
            .build()
            .getFullQualifiedName();
    if (entitySet instanceof org.apache.olingo.client.api.edm.xml.v4.EntitySet) {
      return new EdmEntitySetImpl(
          edm,
          this,
          entitySetName,
          entityType,
          (org.apache.olingo.client.api.edm.xml.v4.EntitySet) entitySet);
    } else {
      return new EdmEntitySetProxy(edm, this, entitySetName, entityType, xmlMetadata);
    }
  }
 @Override
 protected void loadAllEntitySets() {
   List<? extends EntitySet> localEntitySets = xmlEntityContainer.getEntitySets();
   if (localEntitySets != null) {
     for (EntitySet entitySet : localEntitySets) {
       EdmEntitySet edmSet;
       final FullQualifiedName entityType =
           new EdmTypeInfo.Builder()
               .setTypeExpression(entitySet.getEntityType())
               .setDefaultNamespace(entityContainerName.getNamespace())
               .build()
               .getFullQualifiedName();
       if (entitySet instanceof org.apache.olingo.client.api.edm.xml.v4.EntitySet) {
         edmSet =
             new EdmEntitySetImpl(
                 edm,
                 this,
                 entitySet.getName(),
                 entityType,
                 (org.apache.olingo.client.api.edm.xml.v4.EntitySet) entitySet);
       } else {
         edmSet = new EdmEntitySetProxy(edm, this, entitySet.getName(), entityType, xmlMetadata);
       }
       entitySets.put(edmSet.getName(), edmSet);
     }
   }
 }