Class Time
- java.lang.Object
-
- org.apache.beam.sdk.schemas.logicaltypes.Time
-
- All Implemented Interfaces:
java.io.Serializable
,Schema.LogicalType<java.time.LocalTime,java.lang.Long>
public class Time extends java.lang.Object implements Schema.LogicalType<java.time.LocalTime,java.lang.Long>
A time without a time-zone.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 aLong
that represents a count of time in nanoseconds.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
-
Constructor Summary
Constructors Constructor Description Time()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 baseSchema.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 baseSchema.FieldType
.java.time.LocalTime
toInputType(java.lang.Long base)
Convert the Java type used by the baseSchema.FieldType
to the input type.
-
-
-
Field Detail
-
IDENTIFIER
public static final java.lang.String IDENTIFIER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:Schema.LogicalType
The unique identifier for this type.- Specified by:
getIdentifier
in interfaceSchema.LogicalType<java.time.LocalTime,java.lang.Long>
-
getArgumentType
public Schema.FieldType getArgumentType()
Description copied from interface:Schema.LogicalType
A schema type representing how to interpret the argument.null
indicates this logical type is not parameterized by an argument.- Specified by:
getArgumentType
in interfaceSchema.LogicalType<java.time.LocalTime,java.lang.Long>
-
getArgument
public java.lang.String getArgument()
Description copied from interface:Schema.LogicalType
An optional argument to configure the type.- Specified by:
getArgument
in interfaceSchema.LogicalType<java.time.LocalTime,java.lang.Long>
-
getBaseType
public Schema.FieldType getBaseType()
Description copied from interface:Schema.LogicalType
The baseSchema.FieldType
used to store values of this type.- Specified by:
getBaseType
in interfaceSchema.LogicalType<java.time.LocalTime,java.lang.Long>
-
toBaseType
public java.lang.Long toBaseType(java.time.LocalTime input)
Description copied from interface:Schema.LogicalType
Convert the input type to the type Java type used by the baseSchema.FieldType
.- Specified by:
toBaseType
in interfaceSchema.LogicalType<java.time.LocalTime,java.lang.Long>
-
toInputType
public java.time.LocalTime toInputType(java.lang.Long base)
Description copied from interface:Schema.LogicalType
Convert the Java type used by the baseSchema.FieldType
to the input type.- Specified by:
toInputType
in interfaceSchema.LogicalType<java.time.LocalTime,java.lang.Long>
-
-