public interface EntityLookup<T> extends org.springframework.plugin.core.Plugin<Class<?>>
EntityLookupSupport to let the generics declaration be used for the
Plugin.supports(Object) method automatically.EntityLookupSupport,
DefaultSelfLinkProvider| Modifier and Type | Method and Description |
|---|---|
Serializable |
getResourceIdentifier(T entity)
Returns the property of the given entity that shall be used to uniquely identify it.
|
Object |
lookupEntity(Serializable id)
Returns the entity instance to be used if an entity with the given identifier value is requested.
|
Serializable getResourceIdentifier(T entity)
EntityLookup is
defined for a particular type, a standard identifier lookup mechanism (i.e. the datastore identifier) will be used
to eventually create an identifying URI.entity - will never be null.Object lookupEntity(Serializable id)
getResourceIdentifier(Object).
Implementations are free to return null to indicate absence of a value or wrap the result into any
generally supported Optional type.
id - will never be null.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.