code: public static MetamodelImpl getMetamodel(final KunderaMetadata kunderaMetadata, String... persistenceUnits)
      {
          MetamodelImpl metamodel = null;
          for (String pu : persistenceUnits)
          {
              metamodel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel(pu);
  
              if (metamodel != null)
              {
                  return metamodel;
              }
          }
  
          // FIXME: I need to verify this why we need common entity metadata now!
          // if (metamodel == null)
          // {
          // metamodel = (MetamodelImpl)
          // kunderaMetadata.getApplicationMetadata().getMetamodel(
          // Constants.COMMON_ENTITY_METADATAS);
          // }
          return metamodel;
      }
docs: Gets the metamodel.
  
  @param persistenceUnits
  the persistence units
  @return the metamodel