Class PropertyBasedObjectIdGenerator
- java.lang.Object
-
- com.fasterxml.jackson.annotation.ObjectIdGenerator<T>
-
- com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator
-
- com.fasterxml.jackson.databind.ser.impl.PropertyBasedObjectIdGenerator
-
- All Implemented Interfaces:
Serializable
public class PropertyBasedObjectIdGenerator extends com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected BeanPropertyWriter
_property
-
Constructor Summary
Constructors Modifier Constructor Description PropertyBasedObjectIdGenerator(ObjectIdInfo oid, BeanPropertyWriter prop)
protected
PropertyBasedObjectIdGenerator(Class<?> scope, BeanPropertyWriter prop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canUseFor(com.fasterxml.jackson.annotation.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.com.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
forScope(Class<?> scope)
Object
generateId(Object forPojo)
com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey
key(Object key)
com.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
newForSerialization(Object context)
-
-
-
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(com.fasterxml.jackson.annotation.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.
-
forScope
public com.fasterxml.jackson.annotation.ObjectIdGenerator<Object> forScope(Class<?> scope)
- Specified by:
forScope
in classcom.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
-
newForSerialization
public com.fasterxml.jackson.annotation.ObjectIdGenerator<Object> newForSerialization(Object context)
- Specified by:
newForSerialization
in classcom.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
-
-