Interface EntityInformation<T,ID>
- All Superinterfaces:
EntityMetadata<T>
- All Known Implementing Classes:
AbstractEntityInformation
,DelegatingEntityInformation
,PersistentEntityInformation
Extension of
EntityMetadata
to add functionality to query information of entity instances.- Author:
- Oliver Gierke, Mark Paluch, Johannes Englmeier
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the id of the given entity or null if none can be obtained.Returns the type of the id of the entity.default ID
getRequiredId
(T entity) Returns the identifier of the given entity.boolean
Returns whether the given entity is considered to be new.Methods inherited from interface org.springframework.data.repository.core.EntityMetadata
getJavaType
-
Method Details
-
isNew
Returns whether the given entity is considered to be new.- Parameters:
entity
- must never be null- Returns:
-
getId
Returns the id of the given entity or null if none can be obtained.- Parameters:
entity
- must never be null- Returns:
-
getRequiredId
Returns the identifier of the given entity.- Parameters:
entity
- must not be null.- Returns:
- the identifier of the given entity
- Throws:
IllegalArgumentException
- in case no id could be obtained from the given entity- Since:
- 2.0
-
getIdType
Returns the type of the id of the entity.- Returns:
-