| Modifier and Type | Class and Description |
|---|---|
| private static class | AvroWriteContext.
Virtual context implementation used when there is no real root context available. |
| Modifier and Type | Field and Description |
|---|---|
| protected Object | |
| protected final AvroGenerator | |
| protected final AvroWriteContext | |
| protected final Schema | |
| private static final Class | |
| private static final Class | |
| private static final Class | |
| private static final Class |
| Access | Constructor and Description |
|---|---|
| protected | AvroWriteContext(int type, AvroWriteContext parent, AvroGenerator generator, Schema schema, Object currValue)
|
| Modifier and Type | Method and Description |
|---|---|
| protected GenericArray | |
| protected AvroWriteContext | |
| protected GenericRecord | |
| protected GenericRecord | |
| private static Schema | |
| private static int | |
| protected Schema | |
| private static int | |
| private static int | |
| private static int | |
| private static int | |
| private static int | |
| protected abstract void | |
| public boolean | |
| public void | |
| public abstract AvroWriteContext | |
| public abstract AvroWriteContext | |
| public static AvroWriteContext | |
| public String | getCurrentName()
Implements abstract com. Method for accessing name associated with the current location. |
| public Object | getCurrentValue()
Overrides com. Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy. |
| public final AvroWriteContext | getParent()
Implements abstract com. Accessor for finding parent context of this context; will return null for root context. |
| public static AvroWriteContext | nullContext()
Factory method called to get a placeholder context that is only in place until actual schema is handed. |
| public abstract Object | |
| public static int | resolveUnionIndex(Schema
Union of schemas from which to choose unionSchema, Object Object that needs to map to one of the schemas in datum)unionSchemaResolves the sub-schema from a union that should correspond to the |
| public static Schema | Returns: Schema that matchesdatumUnion of schemas from which to choose unionSchema, Object Object that needs to map to one of the schemas in datum)unionSchemaResolves the sub-schema from a union that should correspond to the |
| public static Schema | |
| public void | setCurrentValue(Object
Current value to assign to this context v)Overrides com. Method to call to pass value to be returned via |
| public final String | toString()
Overrides com. Overridden to provide developer writeable "JsonPath" representation of the context. |
| public void | |
| public boolean | Returns: True if writing succeeded (forObjectWriteContext,
iff column was recognized)Method that writer is to call before it writes a field name. |
| public abstract void | |
| public abstract void | |
| public abstract void |
| _currentValue | back to summary |
|---|---|
protected Object _currentValue
| |
| _generator | back to summary |
|---|---|
| protected final AvroGenerator _generator | |
| _parent | back to summary |
|---|---|
| protected final AvroWriteContext _parent | |
| _schema | back to summary |
|---|---|
| protected final Schema _schema | |
| CLS_BIG_DECIMAL | back to summary |
|---|---|
| private static final Class<?> CLS_BIG_DECIMAL | |
| CLS_GENERIC_ARRAY | back to summary |
|---|---|
| private static final Class<?> CLS_GENERIC_ARRAY | |
| CLS_GENERIC_RECORD | back to summary |
|---|---|
| private static final Class<?> CLS_GENERIC_RECORD | |
| CLS_STRING | back to summary |
|---|---|
| private static final Class<?> CLS_STRING | |
| AvroWriteContext | back to summary |
|---|---|
| protected AvroWriteContext(int type, AvroWriteContext parent, AvroGenerator generator, Schema schema, Object currValue) | |
| _createArray | back to summary |
|---|---|
| protected GenericArray | |
| _createObjectContext | back to summary |
|---|---|
| protected AvroWriteContext _createObjectContext(Schema schema, Object currValue) throws JsonMappingException | |
| _createRecord | back to summary |
|---|---|
| protected GenericRecord _createRecord(Schema schema, Object currValue) throws JsonMappingException | |
| _createRecord | back to summary |
|---|---|
| protected GenericRecord _createRecord(Schema schema) throws JsonMappingException | |
| _findNotNull | back to summary |
|---|---|
| private static Schema _findNotNull(List<Schema> types) | |
| _findNotNullIndex | back to summary |
|---|---|
| private static int _findNotNullIndex(List<Schema> types) | |
| _recordOrMapFromUnion | back to summary |
|---|---|
| protected Schema _recordOrMapFromUnion(Schema unionSchema) | |
| _resolveArrayIndex | back to summary |
|---|---|
| private static int _resolveArrayIndex(Schema unionSchema, List<Schema> types, GenericData. | |
| _resolveBigDecimalIndex | back to summary |
|---|---|
| private static int _resolveBigDecimalIndex(Schema unionSchema, List<Schema> types, BigDecimal value) | |
| _resolveMapIndex | back to summary |
|---|---|
| private static int _resolveMapIndex(Schema unionSchema, List<Schema> types, Object value) | |
| _resolveRecordIndex | back to summary |
|---|---|
| private static int _resolveRecordIndex(Schema unionSchema, List<Schema> types, GenericData. | |
| _resolveStringIndex | back to summary |
|---|---|
| private static int _resolveStringIndex(Schema unionSchema, List<Schema> types, String value) | |
| appendDesc | back to summary |
|---|---|
| protected abstract void appendDesc(StringBuilder sb) | |
| canClose | back to summary |
|---|---|
| public boolean canClose() | |
| complete | back to summary |
|---|---|
| public void complete() throws IOException | |
| createChildArrayContext | back to summary |
|---|---|
| public abstract AvroWriteContext createChildArrayContext(Object currValue) throws JsonMappingException | |
| createChildObjectContext | back to summary |
|---|---|
| public abstract AvroWriteContext createChildObjectContext(Object currValue) throws JsonMappingException | |
| createRootContext | back to summary |
|---|---|
| public static AvroWriteContext createRootContext(AvroGenerator generator, Schema schema, BinaryEncoder encoder) | |
| getCurrentName | back to summary |
|---|---|
| public String getCurrentName() Implements abstract com. Doc from com. Method for accessing name associated with the current location.
Non-null for | |
| getCurrentValue | back to summary |
|---|---|
| public Object getCurrentValue() Overrides com. Doc from com. Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy. Note that "current value" is NOT populated (or used) by Streaming parser or generator; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding. | |
| getParent | back to summary |
|---|---|
| public final AvroWriteContext getParent() Implements abstract com. Doc from com. Accessor for finding parent context of this context; will return null for root context.
| |
| nullContext | back to summary |
|---|---|
| public static AvroWriteContext nullContext() Factory method called to get a placeholder context that is only in place until actual schema is handed. | |
| rawValue | back to summary |
|---|---|
| public abstract Object rawValue() Accessor called to link data being built with resulting object. | |
| resolveUnionIndex | back to summary |
|---|---|
| public static int resolveUnionIndex(Schema unionSchema, Object datum) Resolves the sub-schema from a union that should correspond to the
| |
| resolveUnionSchema | back to summary |
|---|---|
| public static Schema resolveUnionSchema(Schema unionSchema, Object datum) Resolves the sub-schema from a union that should correspond to the
| |
| resolveUnionType | back to summary |
|---|---|
| public static Schema resolveUnionType(Schema unionSchema, Object datum) | |
| setCurrentValue | back to summary |
|---|---|
| public void setCurrentValue(Object v) Overrides com. Doc from com. Method to call to pass value to be returned via | |
| toString | back to summary |
|---|---|
| public final String toString() Overrides com. Overridden to provide developer writeable "JsonPath" representation of the context.
| |
| writeBinary | back to summary |
|---|---|
| public void writeBinary(byte[] data, int offset, int len) throws IOException | |
| writeFieldName | back to summary |
|---|---|
| public boolean writeFieldName(String name) throws IOException Method that writer is to call before it writes a field name.
| |
| writeNull | back to summary |
|---|---|
public abstract void writeNull() throws IOException
| |
| writeString | back to summary |
|---|---|
public abstract void writeString(String value) throws IOException
| |
| writeValue | back to summary |
|---|---|
| public abstract void writeValue(Object value) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| public static final AvroWriteContext. |
| Access | Constructor and Description |
|---|---|
| private |
| instance | back to summary |
|---|---|
| public static final AvroWriteContext. | |
| NullContext | back to summary |
|---|---|
| private NullContext() | |
| _reportError | back to summary |
|---|---|
| protected void _reportError() | |
| appendDesc | back to summary |
|---|---|
| public void appendDesc(StringBuilder sb) Implements abstract com.
| |
| createChildArrayContext | back to summary |
|---|---|
| public final AvroWriteContext createChildArrayContext(Object currValue) Implements abstract com.
| |
| createChildObjectContext | back to summary |
|---|---|
| public final AvroWriteContext createChildObjectContext(Object currValue) Implements abstract com.
| |
| rawValue | back to summary |
|---|---|
| public Object rawValue() Implements abstract com. Doc from com. Accessor called to link data being built with resulting object.
| |
| writeNull | back to summary |
|---|---|
| public void writeNull() Implements abstract com.
| |
| writeString | back to summary |
|---|---|
| public void writeString(String value) Implements abstract com.
| |
| writeValue | back to summary |
|---|---|
| public void writeValue(Object value) Implements abstract com.
| |