Class MetamodelUtils

java.lang.Object
cz.cvut.kbss.jopa.utils.MetamodelUtils

public class MetamodelUtils extends Object
Metamodel-related utility functions.
  • Method Details

    • checkForModuleSignatureExtension

      public static void checkForModuleSignatureExtension(Collection<?> types, Metamodel metamodel)
      Checks whether the specified set of types contains any types not contained in the current module extraction signature and if so, it adds them into the signature.
      Parameters:
      types - The types to check (can be null)
      metamodel - Persistence unit metamodel containing module extraction signature
    • getEntityClass

      public static <T> Class<? super T> getEntityClass(Class<T> cls)
      Gets an entity class corresponding to the specified class.

      This method returns either the provided class or its superclass in case when the provided class is a generated subclass created by JOPA.

      Type Parameters:
      T - Type
      Parameters:
      cls - Class to process
      Returns:
      Entity class