Package example.avro
Class Command.Builder
java.lang.Object
org.apache.avro.data.RecordBuilderBase<T>
org.apache.avro.specific.SpecificRecordBuilderBase<Command>
example.avro.Command.Builder
- All Implemented Interfaces:
org.apache.avro.data.RecordBuilder<Command>
- Enclosing class:
- Command
public static class Command.Builder
extends org.apache.avro.specific.SpecificRecordBuilderBase<Command>
implements org.apache.avro.data.RecordBuilder<Command>
RecordBuilder for Command instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Clears the value of the 'correlationId' field.Clears the value of the 'payload' field.Clears the value of the 'type' field.Gets the value of the 'correlationId' field.Gets the value of the 'payload' field.getType()Gets the value of the 'type' field.booleanChecks whether the 'correlationId' field has been set.booleanChecks whether the 'payload' field has been set.booleanhasType()Checks whether the 'type' field has been set.setCorrelationId(CharSequence value) Sets the value of the 'correlationId' field.setPayload(Object value) Sets the value of the 'payload' field.setType(CharSequence value) Sets the value of the 'type' field.Methods inherited from class org.apache.avro.data.RecordBuilderBase
data, defaultValue, equals, fields, fieldSetFlags, hashCode, isValidValue, schema, validate
-
Method Details
-
getType
Gets the value of the 'type' field.- Returns:
- The value.
-
setType
Sets the value of the 'type' field.- Parameters:
value- The value of 'type'.- Returns:
- This builder.
-
hasType
public boolean hasType()Checks whether the 'type' field has been set.- Returns:
- True if the 'type' field has been set, false otherwise.
-
clearType
Clears the value of the 'type' field.- Returns:
- This builder.
-
getCorrelationId
Gets the value of the 'correlationId' field.- Returns:
- The value.
-
setCorrelationId
Sets the value of the 'correlationId' field.- Parameters:
value- The value of 'correlationId'.- Returns:
- This builder.
-
hasCorrelationId
public boolean hasCorrelationId()Checks whether the 'correlationId' field has been set.- Returns:
- True if the 'correlationId' field has been set, false otherwise.
-
clearCorrelationId
Clears the value of the 'correlationId' field.- Returns:
- This builder.
-
getPayload
Gets the value of the 'payload' field.- Returns:
- The value.
-
setPayload
Sets the value of the 'payload' field.- Parameters:
value- The value of 'payload'.- Returns:
- This builder.
-
hasPayload
public boolean hasPayload()Checks whether the 'payload' field has been set.- Returns:
- True if the 'payload' field has been set, false otherwise.
-
clearPayload
Clears the value of the 'payload' field.- Returns:
- This builder.
-
build
- Specified by:
buildin interfaceorg.apache.avro.data.RecordBuilder<Command>
-