Package cz.cvut.kbss.jopa.utils
Class MetamodelUtils
java.lang.Object
cz.cvut.kbss.jopa.utils.MetamodelUtils
Metamodel-related utility functions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static <T> Class<? super T>
getEntityClass
(Class<T> cls) Gets an entity class corresponding to the specified class.
-
Method Details
-
checkForModuleSignatureExtension
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 benull
)metamodel
- Persistence unit metamodel containing module extraction signature
-
getEntityClass
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
-