code: private Map<String, EntityMetadata> getEntityMetadataCol(ApplicationMetadata appMetadata, String persistenceUnit)
      {
          Metamodel metaModel = appMetadata.getMetamodel(persistenceUnit);
          Map<String, EntityMetadata> entityMetadataMap = ((MetamodelImpl) metaModel).getEntityMetadataMap();
          return entityMetadataMap;
      }
docs: Returns map of entity metdata {@link EntityMetadata}.
  
  @param appMetadata
  application metadata
  @param persistenceUnit
  persistence unit
  @return map of entity metadata.