Class UuidLogicalType
- java.lang.Object
-
- org.apache.beam.sdk.schemas.logicaltypes.UuidLogicalType
-
- All Implemented Interfaces:
java.io.Serializable
,Schema.LogicalType<java.util.UUID,Row>
@Experimental(SCHEMAS) public class UuidLogicalType extends java.lang.Object implements Schema.LogicalType<java.util.UUID,Row>
Base class for types representing UUID as two long values.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
static java.lang.String
LEAST_SIGNIFICANT_BITS_FIELD_NAME
static java.lang.String
MOST_SIGNIFICANT_BITS_FIELD_NAME
static Schema
UUID_SCHEMA
-
Constructor Summary
Constructors Constructor Description UuidLogicalType()
-
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.Row
toBaseType(java.util.UUID input)
Convert the input type to the type Java type used by the baseSchema.FieldType
.java.util.UUID
toInputType(Row 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
-
LEAST_SIGNIFICANT_BITS_FIELD_NAME
public static final java.lang.String LEAST_SIGNIFICANT_BITS_FIELD_NAME
- See Also:
- Constant Field Values
-
MOST_SIGNIFICANT_BITS_FIELD_NAME
public static final java.lang.String MOST_SIGNIFICANT_BITS_FIELD_NAME
- See Also:
- Constant Field Values
-
UUID_SCHEMA
public static final Schema UUID_SCHEMA
-
-
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.util.UUID,Row>
-
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.util.UUID,Row>
-
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.util.UUID,Row>
-
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.util.UUID,Row>
-
toBaseType
public Row toBaseType(java.util.UUID 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.util.UUID,Row>
-
toInputType
public java.util.UUID toInputType(Row 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.util.UUID,Row>
-
-