public final class MapWriteContext extends AvroWriteContext
ObjectWriteContext
that needs to be used with
Avro Map datatype.Modifier and Type | Field and Description |
---|---|
protected String |
_currentName |
protected Map<String,Object> |
_data |
protected boolean |
_expectValue |
_currentValue, _generator, _parent, _schema
Constructor and Description |
---|
MapWriteContext(AvroWriteContext parent,
AvroGenerator generator,
org.apache.avro.Schema schema,
Object currValue) |
Modifier and Type | Method and Description |
---|---|
protected void |
_verifyValueWrite() |
void |
appendDesc(StringBuilder sb) |
boolean |
canClose() |
AvroWriteContext |
createChildArrayContext(Object currValue) |
AvroWriteContext |
createChildObjectContext(Object currValue) |
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 |
writeNull() |
void |
writeString(String value) |
void |
writeValue(Object value) |
_createArray, _createObjectContext, _createRecord, _createRecord, _recordOrMapFromUnion, complete, createRootContext, getCurrentValue, getParent, nullContext, resolveUnionIndex, resolveUnionSchema, resolveUnionType, setCurrentValue, toString, writeBinary
protected String _currentName
protected boolean _expectValue
public MapWriteContext(AvroWriteContext parent, AvroGenerator generator, org.apache.avro.Schema schema, Object currValue)
public Object rawValue()
AvroWriteContext
rawValue
in class AvroWriteContext
public final boolean writeFieldName(String name)
AvroWriteContext
writeFieldName
in class AvroWriteContext
ObjectWriteContext
,
iff column was recognized)public final AvroWriteContext createChildArrayContext(Object currValue)
createChildArrayContext
in class AvroWriteContext
public final AvroWriteContext createChildObjectContext(Object currValue) throws com.fasterxml.jackson.databind.JsonMappingException
createChildObjectContext
in class AvroWriteContext
com.fasterxml.jackson.databind.JsonMappingException
public void writeValue(Object value)
writeValue
in class AvroWriteContext
public void writeString(String value)
writeString
in class AvroWriteContext
public void writeNull()
writeNull
in class AvroWriteContext
protected final void _verifyValueWrite()
public final String getCurrentName()
getCurrentName
in class AvroWriteContext
public boolean canClose()
canClose
in class AvroWriteContext
public final void appendDesc(StringBuilder sb)
appendDesc
in class AvroWriteContext
Copyright © 2022 FasterXML. All rights reserved.