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 TypeMethodDescription@Nullable ObjectgetIdentifierFrom(Object entity) Returns the identifier of the given entity by leniently inspecting it for the identifier value.booleanshouldUseAccessorFor(Object entity) Returns whether theProxyIdAccessorshould be used for the given entity.
-
Method Details
-
shouldUseAccessorFor
Returns whether theProxyIdAccessorshould 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.
-