Interface ProxyIdAccessor
- All Known Implementing Classes:
PersistenceProvider
public interface ProxyIdAccessor
Interface for a persistence provider specific accessor of identifiers held in proxies.
- Author:
- Oliver Gierke, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptiongetIdentifierFrom
(Object entity) Returns the identifier of the given entity by leniently inspecting it for the identifier value.boolean
shouldUseAccessorFor
(Object entity) Returns whether theProxyIdAccessor
should be used for the given entity.
-
Method Details
-
shouldUseAccessorFor
Returns whether theProxyIdAccessor
should be used for the given entity. Will inspect the entity to see whether it is a proxy so that lenient id lookup can be used.- Parameters:
entity
- must not be null.- Returns:
-
getIdentifierFrom
Returns the identifier of the given entity by leniently inspecting it for the identifier value.- Parameters:
entity
- must not be null.- Returns:
- can be null.
-