public static class SchemaBuilder.BaseFieldTypeBuilder<R> extends Object
SchemaBuilder.BaseTypeBuilder
. However, fields have their own names, properties,
and default values.
The methods on this class create builder instances that return their
control to the SchemaBuilder.FieldAssembler
of the enclosing record context after
configuring a default for the field.
For example, an int field with default value 1:
intSimple().withDefault(1);or an array with items that are optional int types:
array().items().optional().intType();
Modifier and Type | Field and Description |
---|---|
protected SchemaBuilder.FieldBuilder<R> |
bldr |
protected org.apache.avro.SchemaBuilder.NameContext |
names |
Modifier | Constructor and Description |
---|---|
protected |
SchemaBuilder.BaseFieldTypeBuilder(SchemaBuilder.FieldBuilder<R> bldr,
org.apache.avro.SchemaBuilder.CompletionWrapper wrapper) |
Modifier and Type | Method and Description |
---|---|
SchemaBuilder.ArrayBuilder<SchemaBuilder.ArrayDefault<R>> |
array()
Build an Avro array type
|
SchemaBuilder.BooleanBuilder<SchemaBuilder.BooleanDefault<R>> |
booleanBuilder()
Build a boolean type that can set custom properties.
|
SchemaBuilder.BooleanDefault<R> |
booleanType()
A plain boolean type without custom properties.
|
SchemaBuilder.BytesBuilder<SchemaBuilder.BytesDefault<R>> |
bytesBuilder()
Build a bytes type that can set custom properties.
|
SchemaBuilder.BytesDefault<R> |
bytesType()
A plain bytes type without custom properties.
|
SchemaBuilder.DoubleBuilder<SchemaBuilder.DoubleDefault<R>> |
doubleBuilder()
Build a double type that can set custom properties.
|
SchemaBuilder.DoubleDefault<R> |
doubleType()
A plain double type without custom properties.
|
SchemaBuilder.EnumBuilder<SchemaBuilder.EnumDefault<R>> |
enumeration(String name)
Build an Avro enum type.
|
SchemaBuilder.FixedBuilder<SchemaBuilder.FixedDefault<R>> |
fixed(String name)
Build an Avro fixed type.
|
SchemaBuilder.FloatBuilder<SchemaBuilder.FloatDefault<R>> |
floatBuilder()
Build a float type that can set custom properties.
|
SchemaBuilder.FloatDefault<R> |
floatType()
A plain float type without custom properties.
|
SchemaBuilder.IntBuilder<SchemaBuilder.IntDefault<R>> |
intBuilder()
Build an int type that can set custom properties.
|
SchemaBuilder.IntDefault<R> |
intType()
A plain int type without custom properties.
|
SchemaBuilder.LongBuilder<SchemaBuilder.LongDefault<R>> |
longBuilder()
Build a long type that can set custom properties.
|
SchemaBuilder.LongDefault<R> |
longType()
A plain long type without custom properties.
|
SchemaBuilder.MapBuilder<SchemaBuilder.MapDefault<R>> |
map()
Build an Avro map type
|
SchemaBuilder.NullBuilder<SchemaBuilder.NullDefault<R>> |
nullBuilder()
Build a null type that can set custom properties.
|
SchemaBuilder.NullDefault<R> |
nullType()
A plain null type without custom properties.
|
SchemaBuilder.RecordBuilder<SchemaBuilder.RecordDefault<R>> |
record(String name)
Build an Avro record type.
|
SchemaBuilder.StringBldr<SchemaBuilder.StringDefault<R>> |
stringBuilder()
Build a string type that can set custom properties.
|
SchemaBuilder.StringDefault<R> |
stringType()
A plain string type without custom properties.
|
protected final SchemaBuilder.FieldBuilder<R> bldr
protected final org.apache.avro.SchemaBuilder.NameContext names
protected SchemaBuilder.BaseFieldTypeBuilder(SchemaBuilder.FieldBuilder<R> bldr, org.apache.avro.SchemaBuilder.CompletionWrapper wrapper)
public final SchemaBuilder.BooleanDefault<R> booleanType()
booleanBuilder().endBoolean();
public final SchemaBuilder.BooleanBuilder<SchemaBuilder.BooleanDefault<R>> booleanBuilder()
booleanType()
.public final SchemaBuilder.IntDefault<R> intType()
intBuilder().endInt();
public final SchemaBuilder.IntBuilder<SchemaBuilder.IntDefault<R>> intBuilder()
intType()
.public final SchemaBuilder.LongDefault<R> longType()
longBuilder().endLong();
public final SchemaBuilder.LongBuilder<SchemaBuilder.LongDefault<R>> longBuilder()
longType()
.public final SchemaBuilder.FloatDefault<R> floatType()
floatBuilder().endFloat();
public final SchemaBuilder.FloatBuilder<SchemaBuilder.FloatDefault<R>> floatBuilder()
floatType()
.public final SchemaBuilder.DoubleDefault<R> doubleType()
doubleBuilder().endDouble();
public final SchemaBuilder.DoubleBuilder<SchemaBuilder.DoubleDefault<R>> doubleBuilder()
doubleType()
.public final SchemaBuilder.StringDefault<R> stringType()
stringBuilder().endString();
public final SchemaBuilder.StringBldr<SchemaBuilder.StringDefault<R>> stringBuilder()
stringType()
.public final SchemaBuilder.BytesDefault<R> bytesType()
bytesBuilder().endBytes();
public final SchemaBuilder.BytesBuilder<SchemaBuilder.BytesDefault<R>> bytesBuilder()
bytesType()
.public final SchemaBuilder.NullDefault<R> nullType()
nullBuilder().endNull();
public final SchemaBuilder.NullBuilder<SchemaBuilder.NullDefault<R>> nullBuilder()
nullType()
.public final SchemaBuilder.MapBuilder<SchemaBuilder.MapDefault<R>> map()
public final SchemaBuilder.ArrayBuilder<SchemaBuilder.ArrayDefault<R>> array()
public final SchemaBuilder.FixedBuilder<SchemaBuilder.FixedDefault<R>> fixed(String name)
public final SchemaBuilder.EnumBuilder<SchemaBuilder.EnumDefault<R>> enumeration(String name)
public final SchemaBuilder.RecordBuilder<SchemaBuilder.RecordDefault<R>> record(String name)
Copyright © 2009–2017 The Apache Software Foundation. All rights reserved.