P
- The type that this builder will return from
Types.Builder.named(String)
when the type is built.public static class Types.PrimitiveBuilder<P> extends Types.Builder<Types.PrimitiveBuilder<P>,P>
PrimitiveType
objects.originalType, parent, repetition, returnClass
Modifier and Type | Method and Description |
---|---|
protected PrimitiveType |
build(String name) |
protected DecimalMetadata |
decimalMetadata() |
Types.PrimitiveBuilder<P> |
length(int length)
Adds the length for a FIXED_LEN_BYTE_ARRAY.
|
Types.PrimitiveBuilder<P> |
precision(int precision)
Adds the precision for a DECIMAL.
|
Types.PrimitiveBuilder<P> |
scale(int scale)
Adds the scale for a DECIMAL.
|
protected Types.PrimitiveBuilder<P> |
self() |
as, named, repetition
protected Types.PrimitiveBuilder<P> self()
self
in class Types.Builder<Types.PrimitiveBuilder<P>,P>
public Types.PrimitiveBuilder<P> length(int length)
length
- an int lengthpublic Types.PrimitiveBuilder<P> precision(int precision)
This value is required for decimals and must be less than or equal to the maximum number of base-10 digits in the underlying type. A 4-byte fixed, for example, can store up to 9 base-10 digits.
precision
- an int precision value for the DECIMALpublic Types.PrimitiveBuilder<P> scale(int scale)
This value must be less than the maximum precision of the type and must be a positive number. If not set, the default scale is 0.
The scale specifies the number of digits of the underlying unscaled
that are to the right of the decimal point. The decimal interpretation
of values in this column is: value*10^(-scale)
.
scale
- an int scale value for the DECIMALprotected PrimitiveType build(String name)
build
in class Types.Builder<Types.PrimitiveBuilder<P>,P>
protected DecimalMetadata decimalMetadata()
Copyright © 2015. All rights reserved.