|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.data.RecordBuilderBase<T>
public abstract class RecordBuilderBase<T extends IndexedRecord>
Abstract base class for RecordBuilder implementations. Not thread-safe.
| Constructor Summary | |
|---|---|
protected |
RecordBuilderBase(RecordBuilderBase<T> other,
GenericData data)
RecordBuilderBase copy constructor. |
protected |
RecordBuilderBase(Schema schema,
GenericData data)
Creates a RecordBuilderBase for building records of the given type. |
| Method Summary | |
|---|---|
protected GenericData |
data()
|
protected Object |
defaultValue(Schema.Field field)
Gets the default value of the given field, if any. |
boolean |
equals(Object obj)
|
protected Schema.Field[] |
fields()
|
protected boolean[] |
fieldSetFlags()
|
int |
hashCode()
|
protected static boolean |
isValidValue(Schema.Field f,
Object value)
Tests whether a value is valid for a specified field. |
protected Schema |
schema()
|
protected void |
validate(Schema.Field field,
Object value)
Validates that a particular value for a given field is valid according to the following algorithm: 1. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.avro.data.RecordBuilder |
|---|
build |
| Constructor Detail |
|---|
protected RecordBuilderBase(Schema schema,
GenericData data)
schema - the schema associated with the record class.
protected RecordBuilderBase(RecordBuilderBase<T> other,
GenericData data)
other - RecordBuilderBase instance to copy.| Method Detail |
|---|
protected final Schema schema()
protected final Schema.Field[] fields()
protected final boolean[] fieldSetFlags()
protected final GenericData data()
protected void validate(Schema.Field field,
Object value)
field - the field to validate.value - the value to validate.
NullPointerException - if value is null and the given field does
not accept null values.
protected static boolean isValidValue(Schema.Field f,
Object value)
f - the field for which to test the value.value - the value to test.
protected Object defaultValue(Schema.Field field)
throws IOException
field - the field whose default value should be retrieved.
IOExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||