Class JpaMetamodel
java.lang.Object
org.springframework.data.jpa.util.JpaMetamodel
Wrapper around the JPA
Metamodel to be able to apply some fixes against bugs in provider implementations.- Author:
- Oliver Gierke, Mark Paluch, Sylvère Richard, Aref Behboodi
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisJpaManaged(Class<?> type) Returns whether the given type is managed by the backing JPAMetamodel.booleanisMappedType(Class<?> entity) Returns whether the given type is considered a mapped type, i.e. an actually JPA persisted entity, mapped superclass or native JPA embeddable.booleanisSingleIdAttribute(Class<?> entity, String name, Class<?> attributeType) Returns whether the attribute of given name and type is the single identifier attribute of the given entity.static JpaMetamodelof(jakarta.persistence.metamodel.Metamodel metamodel)
-
Method Details
-
of
-
isJpaManaged
Returns whether the given type is managed by the backing JPAMetamodel.- Parameters:
type- must not be null.- Returns:
-
isSingleIdAttribute
Returns whether the attribute of given name and type is the single identifier attribute of the given entity.- Parameters:
entity- must not be null.name- must not be null.attributeType- must not be null.- Returns:
-
isMappedType
Returns whether the given type is considered a mapped type, i.e. an actually JPA persisted entity, mapped superclass or native JPA embeddable.- Parameters:
entity- must not be null.- Returns:
-