Package example.avro
Class User.Builder
java.lang.Object
org.apache.avro.data.RecordBuilderBase<T>
org.apache.avro.specific.SpecificRecordBuilderBase<User>
example.avro.User.Builder
- All Implemented Interfaces:
org.apache.avro.data.RecordBuilder<User>
- Enclosing class:
User
public static class User.Builder
extends org.apache.avro.specific.SpecificRecordBuilderBase<User>
implements org.apache.avro.data.RecordBuilder<User>
RecordBuilder for User instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Clears the value of the 'favorite_color' field.Clears the value of the 'favorite_number' field.Clears the value of the 'name' field.Gets the value of the 'favorite_color' field.Gets the value of the 'favorite_number' field.getName()Gets the value of the 'name' field.booleanChecks whether the 'favorite_color' field has been set.booleanChecks whether the 'favorite_number' field has been set.booleanhasName()Checks whether the 'name' field has been set.setFavoriteColor(CharSequence value) Sets the value of the 'favorite_color' field.setFavoriteNumber(Integer value) Sets the value of the 'favorite_number' field.setName(CharSequence value) Sets the value of the 'name' field.Methods inherited from class org.apache.avro.data.RecordBuilderBase
data, defaultValue, equals, fields, fieldSetFlags, hashCode, isValidValue, schema, validate
-
Method Details
-
getName
Gets the value of the 'name' field.- Returns:
- The value.
-
setName
Sets the value of the 'name' field.- Parameters:
value- The value of 'name'.- Returns:
- This builder.
-
hasName
public boolean hasName()Checks whether the 'name' field has been set.- Returns:
- True if the 'name' field has been set, false otherwise.
-
clearName
Clears the value of the 'name' field.- Returns:
- This builder.
-
getFavoriteNumber
Gets the value of the 'favorite_number' field.- Returns:
- The value.
-
setFavoriteNumber
Sets the value of the 'favorite_number' field.- Parameters:
value- The value of 'favorite_number'.- Returns:
- This builder.
-
hasFavoriteNumber
public boolean hasFavoriteNumber()Checks whether the 'favorite_number' field has been set.- Returns:
- True if the 'favorite_number' field has been set, false otherwise.
-
clearFavoriteNumber
Clears the value of the 'favorite_number' field.- Returns:
- This builder.
-
getFavoriteColor
Gets the value of the 'favorite_color' field.- Returns:
- The value.
-
setFavoriteColor
Sets the value of the 'favorite_color' field.- Parameters:
value- The value of 'favorite_color'.- Returns:
- This builder.
-
hasFavoriteColor
public boolean hasFavoriteColor()Checks whether the 'favorite_color' field has been set.- Returns:
- True if the 'favorite_color' field has been set, false otherwise.
-
clearFavoriteColor
Clears the value of the 'favorite_color' field.- Returns:
- This builder.
-
build
- Specified by:
buildin interfaceorg.apache.avro.data.RecordBuilder<User>
-