Interface GenericRecord
- All Superinterfaces:
GenericObject
An interface represents a message with schema.
-
Method Summary
Modifier and TypeMethodDescriptionRetrieve the value of the provided fieldName.default Object
Retrieve the value of the provided field.Returns the list of fields associated with the record.default Object
Return the internal native representation of the Record, like a AVRO GenericRecord.default SchemaType
Return the schema tyoe.byte[]
Return schema version.
-
Method Details
-
getSchemaVersion
byte[] getSchemaVersion()Return schema version.- Returns:
- schema version, or null if the information is not available.
-
getFields
Returns the list of fields associated with the record.- Returns:
- the list of fields associated with the record.
-
getField
Retrieve the value of the provided field.- Parameters:
field
- the field to retrieve the value- Returns:
- the value object
-
getField
Retrieve the value of the provided fieldName.- Parameters:
fieldName
- the field name- Returns:
- the value object, or null if field doesn't exist
-
getSchemaType
Return the schema tyoe.- Specified by:
getSchemaType
in interfaceGenericObject
- Returns:
- the schema type
- Throws:
UnsupportedOperationException
- if this feature is not implemented- See Also:
-
getNativeObject
Return the internal native representation of the Record, like a AVRO GenericRecord.- Specified by:
getNativeObject
in interfaceGenericObject
- Returns:
- the internal representation of the record
- Throws:
UnsupportedOperationException
- if the operation is not supported
-