com.fasterxml.jackson.databind.ser.impl

## Class WritableObjectId

- java.lang.Object
- - com.fasterxml.jackson.databind.ser.impl.WritableObjectId

-     public final class WritableObjectId
      extends Object

  Simple value container used to keep track of Object Ids during serialization.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `ObjectIdGenerator<?>` | `generator`
    `Object` | `id`
    `protected boolean` | `idWritten`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WritableObjectId(ObjectIdGenerator<?> generator)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `generateId(Object forPojo)`
    `void` | `writeAsField(JsonGenerator jgen, SerializerProvider provider, ObjectIdWriter w)` Method called to output Object Id as specified.
    `boolean` | `writeAsId(JsonGenerator jgen, SerializerProvider provider, ObjectIdWriter w)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### generator

          public final ObjectIdGenerator<?> generator

    - #### id

          public Object id

    - #### idWritten

          protected boolean idWritten

  - ### Constructor Detail

    - #### WritableObjectId

          public WritableObjectId(ObjectIdGenerator<?> generator)

  - ### Method Detail

    - #### writeAsId

          public boolean writeAsId(JsonGenerator jgen,
                          SerializerProvider provider,
                          ObjectIdWriter w)
                            throws IOException,
                                   JsonGenerationException

      Throws:
        `IOException`
        `JsonGenerationException`

    - #### generateId

          public Object generateId(Object forPojo)

    - #### writeAsField

          public void writeAsField(JsonGenerator jgen,
                          SerializerProvider provider,
                          ObjectIdWriter w)
                            throws IOException,
                                   JsonGenerationException

      Method called to output Object Id as specified.
      Throws:
        `IOException`
        `JsonGenerationException`

Copyright © 2014 FasterXML. All Rights Reserved.