public abstract class AvroWriteContext
extends com.fasterxml.jackson.core.JsonStreamContext
Modifier and Type | Field and Description |
---|---|
protected AvroGenerator |
_generator |
protected AvroWriteContext |
_parent |
protected org.apache.avro.Schema |
_schema |
Modifier | Constructor and Description |
---|---|
protected |
AvroWriteContext(int type,
AvroWriteContext parent,
AvroGenerator generator,
org.apache.avro.Schema schema) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.avro.generic.GenericArray<Object> |
_createArray(org.apache.avro.Schema schema) |
protected AvroWriteContext |
_createObjectContext(org.apache.avro.Schema schema) |
protected org.apache.avro.generic.GenericRecord |
_createRecord(org.apache.avro.Schema schema) |
protected org.apache.avro.Schema |
_recordOrMapFromUnion(org.apache.avro.Schema unionSchema) |
protected abstract void |
appendDesc(StringBuilder sb) |
boolean |
canClose() |
void |
complete(org.apache.avro.io.BinaryEncoder encoder) |
abstract AvroWriteContext |
createChildArrayContext() |
abstract AvroWriteContext |
createChildObjectContext() |
static AvroWriteContext |
createNullContext()
Factory method called to get a placeholder context that is only
in place until actual schema is handed.
|
static AvroWriteContext |
createRootContext(AvroGenerator generator,
org.apache.avro.Schema schema) |
String |
getCurrentName() |
AvroWriteContext |
getParent() |
abstract Object |
rawValue()
Accessor called to link data being built with resulting object.
|
String |
toString()
Overridden to provide developer writeable "JsonPath" representation
of the context.
|
boolean |
writeFieldName(String name)
Method that writer is to call before it writes a field name.
|
abstract void |
writeString(String value) |
abstract void |
writeValue(Object value) |
protected final AvroWriteContext _parent
protected final AvroGenerator _generator
protected final org.apache.avro.Schema _schema
protected AvroWriteContext(int type, AvroWriteContext parent, AvroGenerator generator, org.apache.avro.Schema schema)
public static AvroWriteContext createRootContext(AvroGenerator generator, org.apache.avro.Schema schema)
public static AvroWriteContext createNullContext()
public abstract AvroWriteContext createChildArrayContext() throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
public abstract AvroWriteContext createChildObjectContext() throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
public final AvroWriteContext getParent()
getParent
in class com.fasterxml.jackson.core.JsonStreamContext
public String getCurrentName()
getCurrentName
in class com.fasterxml.jackson.core.JsonStreamContext
public boolean writeFieldName(String name) throws com.fasterxml.jackson.databind.JsonMappingException
ObjectWriteContext
,
iff column was recognized)com.fasterxml.jackson.databind.JsonMappingException
public abstract void writeValue(Object value) throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
public abstract void writeString(String value) throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
public abstract Object rawValue()
public void complete(org.apache.avro.io.BinaryEncoder encoder) throws IOException
IOException
public boolean canClose()
protected abstract void appendDesc(StringBuilder sb)
public final String toString()
protected org.apache.avro.generic.GenericRecord _createRecord(org.apache.avro.Schema schema) throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
protected org.apache.avro.generic.GenericArray<Object> _createArray(org.apache.avro.Schema schema)
protected AvroWriteContext _createObjectContext(org.apache.avro.Schema schema) throws com.fasterxml.jackson.databind.JsonMappingException
com.fasterxml.jackson.databind.JsonMappingException
protected org.apache.avro.Schema _recordOrMapFromUnion(org.apache.avro.Schema unionSchema)
Copyright © 2016 FasterXML. All rights reserved.