public final class ObjectIdWriter extends Object
Modifier and Type | Field and Description |
---|---|
boolean |
alwaysAsId
Marker that indicates what the first reference is to be
serialized as full POJO, or as Object Id (other references
will always be serialized as Object Id)
|
ObjectIdGenerator<?> |
generator
Blueprint generator instance: actual instance will be
fetched from
SerializerProvider using this as
the key. |
JavaType |
idType |
SerializableString |
propertyName
Name of id property to write, if not null: if null, should
only write references, but id property is handled by some
other entity.
|
JsonSerializer<Object> |
serializer
Serializer used for serializing id values.
|
Modifier | Constructor and Description |
---|---|
protected |
ObjectIdWriter(JavaType t,
SerializableString propName,
ObjectIdGenerator<?> gen,
JsonSerializer<?> ser,
boolean alwaysAsId) |
Modifier and Type | Method and Description |
---|---|
static ObjectIdWriter |
construct(JavaType idType,
PropertyName propName,
ObjectIdGenerator<?> generator,
boolean alwaysAsId)
Factory method called by
BeanSerializerBase
with the initial information based on standard settings for the type
for which serializer is being built. |
static ObjectIdWriter |
construct(JavaType idType,
String propName,
ObjectIdGenerator<?> generator,
boolean alwaysAsId)
Deprecated.
|
ObjectIdWriter |
withAlwaysAsId(boolean newState) |
ObjectIdWriter |
withSerializer(JsonSerializer<?> ser) |
public final JavaType idType
public final SerializableString propertyName
public final ObjectIdGenerator<?> generator
SerializerProvider
using this as
the key.public final JsonSerializer<Object> serializer
public final boolean alwaysAsId
protected ObjectIdWriter(JavaType t, SerializableString propName, ObjectIdGenerator<?> gen, JsonSerializer<?> ser, boolean alwaysAsId)
public static ObjectIdWriter construct(JavaType idType, PropertyName propName, ObjectIdGenerator<?> generator, boolean alwaysAsId)
BeanSerializerBase
with the initial information based on standard settings for the type
for which serializer is being built.@Deprecated public static ObjectIdWriter construct(JavaType idType, String propName, ObjectIdGenerator<?> generator, boolean alwaysAsId)
public ObjectIdWriter withSerializer(JsonSerializer<?> ser)
public ObjectIdWriter withAlwaysAsId(boolean newState)
Copyright © 2014-2015 FasterXML. All Rights Reserved.