All Superinterfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordAll Known Implementing Classes:
public interface Record extends org.apache.avro.generic.IndexedRecord
Interface for objects that contain record data. Includes methods for getting and setting fields by index or name and communicating with the Avro framework.
Method Summary
Modifier and TypeMethodDescriptionget(int index) Returns the value of the specified field.Returns the value of the specified field.getBytes(int index) Returns the value of the specified field cast to aByteBuffer.Returns the value of the specified field cast to aByteBuffer.Returns aMapof field names to values that is bound to the record (updates made to the map are reflected in the record and vice versa).getDouble(int index) Returns the value of the specified field cast to aDouble.Returns the value of the specified field cast to aDouble.getFloat(int index) Returns the value of the specified field cast to aFloat.Returns the value of the specified field cast to aFloat.getInt(int index) Returns the value of the specified field cast to aInteger.Returns the value of the specified field cast to aInteger.getLong(int index) Returns the value of the specified field cast to aLong.Returns the value of the specified field cast to aLong.org.apache.avro.SchemaReturns the Avro record schema of the record.getString(int index) Returns the value of the specified field cast to aString.Returns the value of the specified field cast to aString.getType()Returns the GPUdbTypeof the record.voidSets the value of the specified field.voidSets the value of the specified field.
Method Details
getSchema
org.apache.avro.Schema getSchema()Returns the Avro record schema of the record.Specified by:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:the Avro record schema of the recordget
Returns the value of the specified field.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the index of the fieldReturns:the value of the fieldThrows:IndexOutOfBoundsException- if the specified index is not validgetBytes
Returns the value of the specified field cast to aByteBuffer. If the field is not of the correct type an exception will be thrown.Parameters:index- the index of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typeIndexOutOfBoundsException- if the specified index is not validgetBytes
Returns the value of the specified field cast to aByteBuffer. If the field is not of the correct type an exception will be thrown.Parameters:name- the name of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typegetDouble
Returns the value of the specified field cast to aDouble. If the field is not of the correct type an exception will be thrown.Parameters:index- the index of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typeIndexOutOfBoundsException- if the specified index is not validgetDouble
Returns the value of the specified field cast to aDouble. If the field is not of the correct type an exception will be thrown.Parameters:name- the name of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typegetFloat
Returns the value of the specified field cast to aFloat. If the field is not of the correct type an exception will be thrown.Parameters:index- the index of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typeIndexOutOfBoundsException- if the specified index is not validgetFloat
Returns the value of the specified field cast to aFloat. If the field is not of the correct type an exception will be thrown.Parameters:name- the name of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typegetInt
Returns the value of the specified field cast to aInteger. If the field is not of the correct type an exception will be thrown.Parameters:index- the index of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typeIndexOutOfBoundsException- if the specified index is not validgetInt
Returns the value of the specified field cast to aInteger. If the field is not of the correct type an exception will be thrown.Parameters:name- the name of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typegetLong
Returns the value of the specified field cast to aLong. If the field is not of the correct type an exception will be thrown.Parameters:index- the index of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typeIndexOutOfBoundsException- if the specified index is not validgetLong
Returns the value of the specified field cast to aLong. If the field is not of the correct type an exception will be thrown.Parameters:name- the name of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typegetString
Returns the value of the specified field cast to aString. If the field is not of the correct type an exception will be thrown.Parameters:index- the index of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typeIndexOutOfBoundsException- if the specified index is not validgetString
Returns the value of the specified field cast to aString. If the field is not of the correct type an exception will be thrown.Parameters:name- the name of the fieldReturns:the value of the fieldThrows:ClassCastException- if the field is not of the correct typeput
Sets the value of the specified field.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the index of the fieldvalue- the new valueThrows:IllegalArgumentException- if the field cannot be set to the specified valueIndexOutOfBoundsException- if the specified index is not validput
Sets the value of the specified field.Parameters:name- the name of the fieldvalue- the new valueThrows:IllegalArgumentException- if no field exists with the specified name or the field cannot be set to the specified value