Package org.apache.avro.generic
Class GenericData.Record
java.lang.Object
org.apache.avro.generic.GenericData.Record
- All Implemented Interfaces:
Comparable<GenericData.Record>
,GenericContainer
,GenericRecord
,IndexedRecord
- Enclosing class:
GenericData
public static class GenericData.Record
extends Object
implements GenericRecord, Comparable<GenericData.Record>
Default implementation of
GenericRecord
. Note that this
implementation does not fill in default values for fields if they are not
specified; use GenericRecordBuilder
in that case.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(GenericData.Record that) boolean
get
(int i) Return the value of a field given its position in the schema.Return the value of a field given its name.The schema of this instance.int
hashCode()
void
Set the value of a field given its position in the schema.void
Set the value of a field given its name.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.avro.generic.GenericRecord
hasField
-
Constructor Details
-
Record
-
Record
-
-
Method Details
-
getSchema
Description copied from interface:GenericContainer
The schema of this instance.- Specified by:
getSchema
in interfaceGenericContainer
-
put
Description copied from interface:GenericRecord
Set the value of a field given its name.- Specified by:
put
in interfaceGenericRecord
-
put
Description copied from interface:IndexedRecord
Set the value of a field given its position in the schema.This method is not meant to be called by user code, but only by
DatumReader
implementations.- Specified by:
put
in interfaceIndexedRecord
-
get
Description copied from interface:GenericRecord
Return the value of a field given its name.- Specified by:
get
in interfaceGenericRecord
-
get
Description copied from interface:IndexedRecord
Return the value of a field given its position in the schema.This method is not meant to be called by user code, but only by
DatumWriter
implementations.- Specified by:
get
in interfaceIndexedRecord
-
equals
-
hashCode
public int hashCode() -
compareTo
- Specified by:
compareTo
in interfaceComparable<GenericData.Record>
-
toString
-