public static final class SchemaBuilder.FieldAssembler<R> extends Object
Modifier and Type | Method and Description |
---|---|
R |
endRecord()
End adding fields to this record, returning control
to the context that this record builder was created in.
|
SchemaBuilder.FieldBuilder<R> |
name(String fieldName)
Add a field with the given name.
|
SchemaBuilder.FieldAssembler<R> |
nullableBoolean(String fieldName,
boolean defaultVal)
Shortcut for creating a nullable boolean field: a union of boolean and
null with an boolean default.
|
SchemaBuilder.FieldAssembler<R> |
nullableBytes(String fieldName,
byte[] defaultVal)
Shortcut for creating a nullable bytes field: a union of bytes and null
with a bytes default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
nullableDouble(String fieldName,
double defaultVal)
Shortcut for creating a nullable double field: a union of double and null
with a double default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
nullableFloat(String fieldName,
float defaultVal)
Shortcut for creating a nullable float field: a union of float and null
with a float default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
nullableInt(String fieldName,
int defaultVal)
Shortcut for creating a nullable int field: a union of int and null
with an int default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
nullableLong(String fieldName,
long defaultVal)
Shortcut for creating a nullable long field: a union of long and null
with a long default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
nullableString(String fieldName,
String defaultVal)
Shortcut for creating a nullable string field: a union of string and null
with a string default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
optionalBoolean(String fieldName)
Shortcut for creating an optional boolean field: a union of null and
boolean with null default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
optionalBytes(String fieldName)
Shortcut for creating an optional bytes field: a union of null and bytes
with null default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
optionalDouble(String fieldName)
Shortcut for creating an optional double field: a union of null and double
with null default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
optionalFloat(String fieldName)
Shortcut for creating an optional float field: a union of null and float
with null default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
optionalInt(String fieldName)
Shortcut for creating an optional int field: a union of null and int
with null default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
optionalLong(String fieldName)
Shortcut for creating an optional long field: a union of null and long
with null default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
optionalString(String fieldName)
Shortcut for creating an optional string field: a union of null and string
with null default.
This is equivalent to:
|
SchemaBuilder.FieldAssembler<R> |
requiredBoolean(String fieldName)
Shortcut for creating a boolean field with the given name and no default.
|
SchemaBuilder.FieldAssembler<R> |
requiredBytes(String fieldName)
Shortcut for creating a bytes field with the given name and no default.
|
SchemaBuilder.FieldAssembler<R> |
requiredDouble(String fieldName)
Shortcut for creating a double field with the given name and no default.
|
SchemaBuilder.FieldAssembler<R> |
requiredFloat(String fieldName)
Shortcut for creating a float field with the given name and no default.
|
SchemaBuilder.FieldAssembler<R> |
requiredInt(String fieldName)
Shortcut for creating an int field with the given name and no default.
|
SchemaBuilder.FieldAssembler<R> |
requiredLong(String fieldName)
Shortcut for creating a long field with the given name and no default.
|
SchemaBuilder.FieldAssembler<R> |
requiredString(String fieldName)
Shortcut for creating a string field with the given name and no default.
|
public SchemaBuilder.FieldBuilder<R> name(String fieldName)
SchemaBuilder.FieldBuilder
for the given name.public SchemaBuilder.FieldAssembler<R> requiredBoolean(String fieldName)
name(fieldName).type().booleanType().noDefault()
public SchemaBuilder.FieldAssembler<R> optionalBoolean(String fieldName)
name(fieldName).type().optional().booleanType()
public SchemaBuilder.FieldAssembler<R> nullableBoolean(String fieldName, boolean defaultVal)
name(fieldName).type().nullable().booleanType().booleanDefault(defaultVal)
public SchemaBuilder.FieldAssembler<R> requiredInt(String fieldName)
name(fieldName).type().intType().noDefault()
public SchemaBuilder.FieldAssembler<R> optionalInt(String fieldName)
name(fieldName).type().optional().intType()
public SchemaBuilder.FieldAssembler<R> nullableInt(String fieldName, int defaultVal)
name(fieldName).type().nullable().intType().intDefault(defaultVal)
public SchemaBuilder.FieldAssembler<R> requiredLong(String fieldName)
name(fieldName).type().longType().noDefault()
public SchemaBuilder.FieldAssembler<R> optionalLong(String fieldName)
name(fieldName).type().optional().longType()
public SchemaBuilder.FieldAssembler<R> nullableLong(String fieldName, long defaultVal)
name(fieldName).type().nullable().longType().longDefault(defaultVal)
public SchemaBuilder.FieldAssembler<R> requiredFloat(String fieldName)
name(fieldName).type().floatType().noDefault()
public SchemaBuilder.FieldAssembler<R> optionalFloat(String fieldName)
name(fieldName).type().optional().floatType()
public SchemaBuilder.FieldAssembler<R> nullableFloat(String fieldName, float defaultVal)
name(fieldName).type().nullable().floatType().floatDefault(defaultVal)
public SchemaBuilder.FieldAssembler<R> requiredDouble(String fieldName)
name(fieldName).type().doubleType().noDefault()
public SchemaBuilder.FieldAssembler<R> optionalDouble(String fieldName)
name(fieldName).type().optional().doubleType()
public SchemaBuilder.FieldAssembler<R> nullableDouble(String fieldName, double defaultVal)
name(fieldName).type().nullable().doubleType().doubleDefault(defaultVal)
public SchemaBuilder.FieldAssembler<R> requiredString(String fieldName)
name(fieldName).type().stringType().noDefault()
public SchemaBuilder.FieldAssembler<R> optionalString(String fieldName)
name(fieldName).type().optional().stringType()
public SchemaBuilder.FieldAssembler<R> nullableString(String fieldName, String defaultVal)
name(fieldName).type().nullable().stringType().stringDefault(defaultVal)
public SchemaBuilder.FieldAssembler<R> requiredBytes(String fieldName)
name(fieldName).type().bytesType().noDefault()
public SchemaBuilder.FieldAssembler<R> optionalBytes(String fieldName)
name(fieldName).type().optional().bytesType()
public SchemaBuilder.FieldAssembler<R> nullableBytes(String fieldName, byte[] defaultVal)
name(fieldName).type().nullable().bytesType().bytesDefault(defaultVal)
public R endRecord()
Copyright © 2009–2017 The Apache Software Foundation. All rights reserved.