public class Time extends java.lang.Object implements Schema.LogicalType<java.time.LocalTime,java.lang.Long>
It cannot represent an instant on the time-line without additional information such as an offset or time-zone.
Its input type is a LocalTime
, and base type is a Long
that represents a count
of time in nanoseconds.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IDENTIFIER |
Constructor and Description |
---|
Time() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getArgument()
An optional argument to configure the type.
|
Schema.FieldType |
getArgumentType()
A schema type representing how to interpret the argument.
|
Schema.FieldType |
getBaseType()
The base
Schema.FieldType used to store values of this type. |
java.lang.String |
getIdentifier()
The unique identifier for this type.
|
java.lang.Long |
toBaseType(java.time.LocalTime input)
Convert the input type to the type Java type used by the base
Schema.FieldType . |
java.time.LocalTime |
toInputType(java.lang.Long base)
Convert the Java type used by the base
Schema.FieldType to the input type. |
public static final java.lang.String IDENTIFIER
public java.lang.String getIdentifier()
Schema.LogicalType
getIdentifier
in interface Schema.LogicalType<java.time.LocalTime,java.lang.Long>
public Schema.FieldType getArgumentType()
Schema.LogicalType
null
indicates this logical
type is not parameterized by an argument.getArgumentType
in interface Schema.LogicalType<java.time.LocalTime,java.lang.Long>
public java.lang.String getArgument()
Schema.LogicalType
getArgument
in interface Schema.LogicalType<java.time.LocalTime,java.lang.Long>
public Schema.FieldType getBaseType()
Schema.LogicalType
Schema.FieldType
used to store values of this type.getBaseType
in interface Schema.LogicalType<java.time.LocalTime,java.lang.Long>
public java.lang.Long toBaseType(java.time.LocalTime input)
Schema.LogicalType
Schema.FieldType
.toBaseType
in interface Schema.LogicalType<java.time.LocalTime,java.lang.Long>
public java.time.LocalTime toInputType(java.lang.Long base)
Schema.LogicalType
Schema.FieldType
to the input type.toInputType
in interface Schema.LogicalType<java.time.LocalTime,java.lang.Long>