|
||||||||||
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.
Field Summary | |
---|---|
protected GenericData |
data
|
protected Schema.Field[] |
fields
|
protected boolean[] |
fieldSetFlags
|
protected Schema |
schema
|
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 | |
---|---|
boolean |
equals(Object obj)
|
protected Object |
getDefaultValue(Schema.Field field)
Gets the default value of the given field, if any. |
int |
hashCode()
|
protected static boolean |
isValidValue(Schema.Field f,
Object value)
Tests whether a value is valid for a specified field. |
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 |
Field Detail |
---|
protected final Schema schema
protected final Schema.Field[] fields
protected final boolean[] fieldSetFlags
protected final GenericData data
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 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 getDefaultValue(Schema.Field field) throws IOException
field
- the field whose default value should be retrieved.
IOException
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |