Interface JpaEntityInformation<T,ID>
- All Superinterfaces:
EntityInformation<T,,ID> EntityMetadata<T>,JpaEntityMetadata<T>
- All Known Implementing Classes:
JpaEntityInformationSupport,JpaMetamodelEntityInformation,JpaPersistableEntityInformation
Extension of
EntityInformation to capture additional JPA specific information about entities.- Author:
- Oliver Gierke, Thomas Darimont, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptiongetCompositeIdAttributeValue(Object id, String idAttribute) Extracts the value for the given id attribute from a composite idjakarta.persistence.metamodel.SingularAttribute<? super T,?> Returns the id attribute of the entity.Returns the attribute names of the id attributes.default jakarta.persistence.metamodel.SingularAttribute<? super T,?> Returns the required identifier type.booleanReturns true if the entity has a composite id.Methods inherited from interface org.springframework.data.repository.core.EntityInformation
getId, getIdType, getRequiredId, isNewMethods inherited from interface org.springframework.data.repository.core.EntityMetadata
getJavaTypeMethods inherited from interface org.springframework.data.jpa.repository.query.JpaEntityMetadata
getEntityName
-
Method Details
-
getIdAttribute
Returns the id attribute of the entity.- Returns:
-
getRequiredIdAttribute
default jakarta.persistence.metamodel.SingularAttribute<? super T,?> getRequiredIdAttribute() throws IllegalArgumentExceptionReturns the required identifier type.- Returns:
- the identifier type.
- Throws:
IllegalArgumentException- in case no id type could be obtained.- Since:
- 2.0
-
hasCompositeId
boolean hasCompositeId()Returns true if the entity has a composite id.- Returns:
-
getIdAttributeNames
Returns the attribute names of the id attributes. If the entity has a composite id, then all id attribute names are returned. If the entity has a single id attribute then this single attribute name is returned.- Returns:
-
getCompositeIdAttributeValue
Extracts the value for the given id attribute from a composite id- Parameters:
id-idAttribute-- Returns:
-