com.fasterxml.jackson.databind.ser.impl
Class PropertyBasedObjectIdGenerator

java.lang.Object
  extended by com.fasterxml.jackson.annotation.ObjectIdGenerator<T>
      extended by com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator
          extended by com.fasterxml.jackson.databind.ser.impl.PropertyBasedObjectIdGenerator
All Implemented Interfaces:
Serializable

public class PropertyBasedObjectIdGenerator
extends ObjectIdGenerators.PropertyGenerator

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.annotation.ObjectIdGenerator
ObjectIdGenerator.IdKey
 
Field Summary
protected  BeanPropertyWriter _property
           
 
Constructor Summary
protected PropertyBasedObjectIdGenerator(Class<?> scope, BeanPropertyWriter prop)
           
  PropertyBasedObjectIdGenerator(ObjectIdInfo oid, BeanPropertyWriter prop)
           
 
Method Summary
 boolean canUseFor(ObjectIdGenerator<?> gen)
          We must override this method, to prevent errors when scopes are the same, but underlying class (on which to access property) is different.
 ObjectIdGenerator<Object> forScope(Class<?> scope)
           
 Object generateId(Object forPojo)
           
 ObjectIdGenerator.IdKey key(Object key)
           
 ObjectIdGenerator<Object> newForSerialization(Object context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_property

protected final BeanPropertyWriter _property
Constructor Detail

PropertyBasedObjectIdGenerator

public PropertyBasedObjectIdGenerator(ObjectIdInfo oid,
                                      BeanPropertyWriter prop)

PropertyBasedObjectIdGenerator

protected PropertyBasedObjectIdGenerator(Class<?> scope,
                                         BeanPropertyWriter prop)
Method Detail

canUseFor

public boolean canUseFor(ObjectIdGenerator<?> gen)
We must override this method, to prevent errors when scopes are the same, but underlying class (on which to access property) is different.


generateId

public Object generateId(Object forPojo)

forScope

public ObjectIdGenerator<Object> forScope(Class<?> scope)
Specified by:
forScope in class ObjectIdGenerator<Object>

newForSerialization

public ObjectIdGenerator<Object> newForSerialization(Object context)
Specified by:
newForSerialization in class ObjectIdGenerator<Object>

key

public ObjectIdGenerator.IdKey key(Object key)
Specified by:
key in class ObjectIdGenerator<Object>


Copyright © 2012 FasterXML. All Rights Reserved.