Class WritableObjectId
java.lang.Object
tools.jackson.databind.ser.WritableObjectId
Simple value container used to keep track of Object Ids during
serialization.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateId(Object forPojo) voidwriteAsDeclaration(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, ObjectIdWriter w) Method called to output Object Id declaration, either using native Object Id write methodJsonGenerator.writeObjectId(Object)(if allowed), or, if not, just writing it as an Object property with specified property name and id value.booleanwriteAsReference(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, ObjectIdWriter w) Method to call to write a reference to object that this id refers.
-
Field Details
-
generator
public final com.fasterxml.jackson.annotation.ObjectIdGenerator<?> generator -
id
-
idWritten
protected boolean idWrittenMarker to denote whether Object Id value has been written as part of an Object, to be referencible. Remains false when forward-reference is written.
-
-
Constructor Details
-
WritableObjectId
public WritableObjectId(com.fasterxml.jackson.annotation.ObjectIdGenerator<?> g)
-
-
Method Details
-
writeAsReference
public boolean writeAsReference(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, ObjectIdWriter w) throws tools.jackson.core.JacksonException Method to call to write a reference to object that this id refers. Usually this is done after an earlier call towriteAsDeclaration(JsonGenerator, SerializationContext, ObjectIdWriter).- Throws:
tools.jackson.core.JacksonException
-
generateId
-
writeAsDeclaration
public void writeAsDeclaration(tools.jackson.core.JsonGenerator g, SerializationContext ctxt, ObjectIdWriter w) throws tools.jackson.core.JacksonException Method called to output Object Id declaration, either using native Object Id write methodJsonGenerator.writeObjectId(Object)(if allowed), or, if not, just writing it as an Object property with specified property name and id value.- Throws:
tools.jackson.core.JacksonException
-