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)protectedPropertyBasedObjectIdGenerator(Class<?> scope, BeanPropertyWriter prop)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanUseFor(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)ObjectgenerateId(Object forPojo)com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKeykey(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:
forScopein classcom.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
-
newForSerialization
public com.fasterxml.jackson.annotation.ObjectIdGenerator<Object> newForSerialization(Object context)
- Specified by:
newForSerializationin classcom.fasterxml.jackson.annotation.ObjectIdGenerator<Object>
-
-