|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fasterxml.jackson.annotation.SimpleObjectIdResolver
public class SimpleObjectIdResolver
Simple implementation of ObjectIdResolver
| Field Summary | |
|---|---|
protected Map<ObjectIdGenerator.IdKey,Object> |
_items
|
| Constructor Summary | |
|---|---|
SimpleObjectIdResolver()
|
|
| Method Summary | |
|---|---|
void |
bindItem(ObjectIdGenerator.IdKey id,
Object ob)
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 ObjectIdResolver.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<ObjectIdGenerator.IdKey,Object> _items
| Constructor Detail |
|---|
public SimpleObjectIdResolver()
| Method Detail |
|---|
public void bindItem(ObjectIdGenerator.IdKey id,
Object ob)
ObjectIdResolver
bindItem in interface ObjectIdResolverid - The Object Identiferob - The POJO associated to that Identifierpublic Object resolveId(ObjectIdGenerator.IdKey id)
ObjectIdResolver
resolveId in interface ObjectIdResolverid - The Object Identifier
public boolean canUseFor(ObjectIdResolver resolverType)
ObjectIdResolverObjectIdResolver.newForDeserialization(java.lang.Object)).
canUseFor in interface ObjectIdResolverpublic ObjectIdResolver newForDeserialization(Object context)
ObjectIdResolver
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.
newForDeserialization in interface ObjectIdResolvercontext - 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.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||