com.fasterxml.jackson.dataformat.avro.ser

## Class ObjectWriteContext

- java.lang.Object
- - com.fasterxml.jackson.core.JsonStreamContext
  - - com.fasterxml.jackson.dataformat.avro.ser.AvroWriteContext
    - - com.fasterxml.jackson.dataformat.avro.ser.ObjectWriteContext

-     public final class ObjectWriteContext
      extends AvroWriteContext

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `_currentName`
    `protected boolean` | `_expectValue`
    `protected org.apache.avro.Schema.Field` | `_nextField` Definition of property that is to be written next, if any; null if property is to be skipped.
    `protected org.apache.avro.generic.GenericRecord` | `_record`

    - ### Fields inherited from class com.fasterxml.jackson.dataformat.avro.ser.AvroWriteContext

      `_generator, _parent, _schema`

    - ### Fields inherited from class com.fasterxml.jackson.core.JsonStreamContext

      `_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ObjectWriteContext(AvroWriteContext parent, AvroGenerator generator, org.apache.avro.generic.GenericRecord record)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected org.apache.avro.Schema.Field` | `_findField()`
    `protected void` | `_reportUnknownField(String name)`
    `protected void` | `_verifyValueWrite()`
    `void` | `appendDesc(StringBuilder sb)`
    `boolean` | `canClose()`
    `AvroWriteContext` | `createChildArrayContext()`
    `AvroWriteContext` | `createChildObjectContext()`
    `String` | `getCurrentName()`
    `Object` | `rawValue()` Accessor called to link data being built with resulting object.
    `boolean` | `writeFieldName(String name)` Method that writer is to call before it writes a field name.
    `void` | `writeString(String value)`
    `void` | `writeValue(Object value)`

    - ### Methods inherited from class com.fasterxml.jackson.dataformat.avro.ser.AvroWriteContext

      `_createArray, _createObjectContext, _createRecord, _recordOrMapFromUnion, complete, createNullContext, createRootContext, getParent, toString`

    - ### Methods inherited from class com.fasterxml.jackson.core.JsonStreamContext

      `getCurrentIndex, getCurrentValue, getEntryCount, getTypeDesc, inArray, inObject, inRoot, setCurrentValue, typeDesc`

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

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

- - ### Field Detail

    - #### _record

          protected final org.apache.avro.generic.GenericRecord _record

    - #### _nextField

          protected org.apache.avro.Schema.Field _nextField

      Definition of property that is to be written next, if any; null if property is to be skipped.

    - #### _currentName

          protected String _currentName

    - #### _expectValue

          protected boolean _expectValue

  - ### Constructor Detail

    - #### ObjectWriteContext

          public ObjectWriteContext(AvroWriteContext parent,
                            AvroGenerator generator,
                            org.apache.avro.generic.GenericRecord record)

  - ### Method Detail

    - #### rawValue

          public Object rawValue()

      Description copied from class: `AvroWriteContext`
      Accessor called to link data being built with resulting object.
      Specified by:
        `rawValue` in class `AvroWriteContext`

    - #### createChildArrayContext

          public final AvroWriteContext createChildArrayContext()

      Specified by:
        `createChildArrayContext` in class `AvroWriteContext`

    - #### createChildObjectContext

          public final AvroWriteContext createChildObjectContext()
                                                          throws com.fasterxml.jackson.databind.JsonMappingException

      Specified by:
        `createChildObjectContext` in class `AvroWriteContext`
      Throws:
        `com.fasterxml.jackson.databind.JsonMappingException`

    - #### writeFieldName

          public final boolean writeFieldName(String name)

      Description copied from class: `AvroWriteContext`
      Method that writer is to call before it writes a field name.
      Overrides:
        `writeFieldName` in class `AvroWriteContext`
      Returns:
        True if writing succeeded (for `ObjectWriteContext`, iff column was recognized)

    - #### writeValue

          public void writeValue(Object value)
                          throws com.fasterxml.jackson.databind.JsonMappingException

      Specified by:
        `writeValue` in class `AvroWriteContext`
      Throws:
        `com.fasterxml.jackson.databind.JsonMappingException`

    - #### writeString

          public void writeString(String value)

      Specified by:
        `writeString` in class `AvroWriteContext`

    - #### _verifyValueWrite

          protected final void _verifyValueWrite()

    - #### _findField

          protected org.apache.avro.Schema.Field _findField()

    - #### _reportUnknownField

          protected void _reportUnknownField(String name)

    - #### getCurrentName

          public final String getCurrentName()

      Overrides:
        `getCurrentName` in class `AvroWriteContext`

    - #### canClose

          public boolean canClose()

      Overrides:
        `canClose` in class `AvroWriteContext`

    - #### appendDesc

          public final void appendDesc(StringBuilder sb)

      Specified by:
        `appendDesc` in class `AvroWriteContext`

Copyright © 2016 FasterXML. All rights reserved.