Package example.avro.v2
Class User.Builder
java.lang.Object
org.apache.avro.data.RecordBuilderBase<T>
org.apache.avro.specific.SpecificRecordBuilderBase<User>
example.avro.v2.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 'favoriteColor' field.Clears the value of the 'favoriteNumber' field.Clears the value of the 'favoritePlace' field.Clears the value of the 'name' field.Gets the value of the 'favoriteColor' field.Gets the value of the 'favoriteNumber' field.Gets the value of the 'favoritePlace' field.getName()Gets the value of the 'name' field.booleanChecks whether the 'favoriteColor' field has been set.booleanChecks whether the 'favoriteNumber' field has been set.booleanChecks whether the 'favoritePlace' field has been set.booleanhasName()Checks whether the 'name' field has been set.setFavoriteColor(CharSequence value) Sets the value of the 'favoriteColor' field.setFavoriteNumber(Integer value) Sets the value of the 'favoriteNumber' field.setFavoritePlace(CharSequence value) Sets the value of the 'favoritePlace' 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 'favoriteNumber' field.- Returns:
- The value.
-
setFavoriteNumber
Sets the value of the 'favoriteNumber' field.- Parameters:
value- The value of 'favoriteNumber'.- Returns:
- This builder.
-
hasFavoriteNumber
public boolean hasFavoriteNumber()Checks whether the 'favoriteNumber' field has been set.- Returns:
- True if the 'favoriteNumber' field has been set, false otherwise.
-
clearFavoriteNumber
Clears the value of the 'favoriteNumber' field.- Returns:
- This builder.
-
getFavoriteColor
Gets the value of the 'favoriteColor' field.- Returns:
- The value.
-
setFavoriteColor
Sets the value of the 'favoriteColor' field.- Parameters:
value- The value of 'favoriteColor'.- Returns:
- This builder.
-
hasFavoriteColor
public boolean hasFavoriteColor()Checks whether the 'favoriteColor' field has been set.- Returns:
- True if the 'favoriteColor' field has been set, false otherwise.
-
clearFavoriteColor
Clears the value of the 'favoriteColor' field.- Returns:
- This builder.
-
getFavoritePlace
Gets the value of the 'favoritePlace' field.- Returns:
- The value.
-
setFavoritePlace
Sets the value of the 'favoritePlace' field.- Parameters:
value- The value of 'favoritePlace'.- Returns:
- This builder.
-
hasFavoritePlace
public boolean hasFavoritePlace()Checks whether the 'favoritePlace' field has been set.- Returns:
- True if the 'favoritePlace' field has been set, false otherwise.
-
clearFavoritePlace
Clears the value of the 'favoritePlace' field.- Returns:
- This builder.
-
build
- Specified by:
buildin interfaceorg.apache.avro.data.RecordBuilder<User>
-