Package org.apache.avro
Class SchemaBuilder.FieldBuilder<R>
java.lang.Object
org.apache.avro.SchemaBuilder.PropBuilder<SchemaBuilder.FieldBuilder<R>>
org.apache.avro.SchemaBuilder.NamedBuilder<SchemaBuilder.FieldBuilder<R>>
org.apache.avro.SchemaBuilder.FieldBuilder<R>
- Enclosing class:
SchemaBuilder
public static final class SchemaBuilder.FieldBuilder<R>
extends SchemaBuilder.NamedBuilder<SchemaBuilder.FieldBuilder<R>>
Builds a Field in the context of a
SchemaBuilder.FieldAssembler
.
Usage is to first configure any of the optional parameters and then to call
one of the type methods to complete the field. For example
.namespace("org.apache.example").orderDescending().type()Optional parameters for a field are namespace, doc, order, and aliases.
-
Method Summary
Modifier and TypeMethodDescriptionSkip field default value validation duringcompleteField(Schema, JsonNode)
}Set this field to have ascending order.Set this field to have descending order.Set this field to ignore order.protected SchemaBuilder.FieldBuilder
<R> self()
a self-type for chaining builder subclasses.type()
Final step in configuring this field, finalizing name, namespace, alias, and order.Final step in configuring this field, finalizing name, namespace, alias, and order.Final step in configuring this field, finalizing name, namespace, alias, and order.Final step in configuring this field, finalizing name, namespace, alias, and order.Validate field default value duringcompleteField(Schema, JsonNode)
.Methods inherited from class org.apache.avro.SchemaBuilder.NamedBuilder
aliases, doc
Methods inherited from class org.apache.avro.SchemaBuilder.PropBuilder
prop, prop
-
Method Details
-
orderAscending
Set this field to have ascending order. Ascending is the default -
orderDescending
Set this field to have descending order. Descending is the default -
orderIgnore
Set this field to ignore order. -
validatingDefaults
Validate field default value duringcompleteField(Schema, JsonNode)
. -
notValidatingDefaults
Skip field default value validation duringcompleteField(Schema, JsonNode)
} -
type
Final step in configuring this field, finalizing name, namespace, alias, and order.- Returns:
- A builder for the field's type and default value.
-
type
Final step in configuring this field, finalizing name, namespace, alias, and order. Sets the field's type to the provided schema, returns aSchemaBuilder.GenericDefault
. -
type
Final step in configuring this field, finalizing name, namespace, alias, and order. Sets the field's type to the schema by name reference. The name must correspond with a named schema that has already been created in the context of this builder. The name may be a fully qualified name, or a short name. If it is a short name, the namespace context of this builder will be used. The name and namespace context rules are the same as the Avro schema JSON specification. -
type
Final step in configuring this field, finalizing name, namespace, alias, and order. Sets the field's type to the schema by name reference. The name must correspond with a named schema that has already been created in the context of this builder. The name may be a fully qualified name, or a short name. If it is a full name, the namespace is ignored. If it is a short name, the namespace provided is used. If the namespace provided is null, the namespace context of this builder will be used. The name and namespace context rules are the same as the Avro schema JSON specification. -
self
Description copied from class:SchemaBuilder.PropBuilder
a self-type for chaining builder subclasses. Concrete subclasses must return 'this'- Specified by:
self
in classSchemaBuilder.PropBuilder<SchemaBuilder.FieldBuilder<R>>
-