|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ObjectIdResolver
Definition of API used for resolving actual Java object from
Object Identifiers (as annotated using JsonIdentityInfo).
| Method Summary | |
|---|---|
void |
bindItem(ObjectIdGenerator.IdKey id,
Object pojo)
Method called when a POJO is deserialized and has an Object Identifier. |
boolean |
canUseFor(ObjectIdResolver resolverType)
Method called to check whether this resolver instance can be used for Object Ids of specific resolver type; determination is based by passing a configured "blueprint" (prototype) instance; from which the actual instances are created (using newForDeserialization(java.lang.Object)). |
ObjectIdResolver |
newForDeserialization(Object context)
Factory method called to create a new instance to use for deserialization: needed since resolvers may have state (a pool of objects). |
Object |
resolveId(ObjectIdGenerator.IdKey id)
Method called when deserialization encounters the given Object Identifier and requires the POJO associated with it. |
| Method Detail |
|---|
void bindItem(ObjectIdGenerator.IdKey id,
Object pojo)
id - The Object Identiferpojo - The POJO associated to that IdentifierObject resolveId(ObjectIdGenerator.IdKey id)
id - The Object Identifier
ObjectIdResolver newForDeserialization(Object context)
Note that actual type of 'context' is
com.fasterxml.jackson.databind.DeserializationContext, but
can not be declared here as type itself (as well as call to this object)
comes from databind package.
context - Deserialization context object used (of type
com.fasterxml.jackson.databind.DeserializationContext
; may be needed by more complex resolvers to access contextual
information such as configuration.boolean canUseFor(ObjectIdResolver resolverType)
newForDeserialization(java.lang.Object)).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||