code: public static String getEntityNameByEntityTypeName(EntityDataModel entityDataModel, String entityTypeName)
              throws ODataEdmException {
          for (EntitySet entitySet : entityDataModel.getEntityContainer().getEntitySets()) {
              if (entitySet.getTypeName().equals(entityTypeName)) {
                  return entitySet.getName();
              }
          }
          //If not found in EntitySet, try to find in Singletons
          for (Singleton singleton : entityDataModel.getEntityContainer().getSingletons()) {
              if (singleton.getTypeName().equals(entityTypeName)) {
                  return singleton.getName();
              }
          }
          throw new ODataSystemException("Entity name not found in the entity data model for type: " + entityTypeName);
      }
docs: Get the Entity Name for a given Entity Type name through the Entity Data Model.
  This looks for entity in both EntitySets and Singletons in the container
  
  @param entityDataModel The Entity Data Model.
  @param entityTypeName  The Entity Type name.
  @return The Entity name
  @throws ODataEdmException if unable to find entity name in entity data model