public class PropertyBasedObjectIdGenerator extends ObjectIdGenerators.PropertyGenerator
ObjectIdGenerator.IdKey
Modifier and Type | Field and Description |
---|---|
protected BeanPropertyWriter |
_property |
Modifier | Constructor and Description |
---|---|
protected |
PropertyBasedObjectIdGenerator(Class<?> scope,
BeanPropertyWriter prop) |
|
PropertyBasedObjectIdGenerator(ObjectIdInfo oid,
BeanPropertyWriter prop) |
Modifier and Type | Method and Description |
---|---|
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) |
isValidReferencePropertyName, maySerializeAsObject
protected final BeanPropertyWriter _property
public PropertyBasedObjectIdGenerator(ObjectIdInfo oid, BeanPropertyWriter prop)
protected PropertyBasedObjectIdGenerator(Class<?> scope, BeanPropertyWriter prop)
public boolean canUseFor(ObjectIdGenerator<?> gen)
public ObjectIdGenerator<Object> forScope(Class<?> scope)
forScope
in class ObjectIdGenerator<Object>
public ObjectIdGenerator<Object> newForSerialization(Object context)
newForSerialization
in class ObjectIdGenerator<Object>
public ObjectIdGenerator.IdKey key(Object key)
key
in class ObjectIdGenerator<Object>
Copyright © 2008–2018 FasterXML. All rights reserved.