Class VariableString
- java.lang.Object
-
- org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType<java.lang.String>
-
- org.apache.beam.sdk.schemas.logicaltypes.VariableString
-
- All Implemented Interfaces:
java.io.Serializable
,Schema.LogicalType<java.lang.String,java.lang.String>
public class VariableString extends PassThroughLogicalType<java.lang.String>
A LogicalType representing a variable-length string with specified maximum length.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
IDENTIFIER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxLength()
@Nullable java.lang.String
getName()
static VariableString
of(int maxStringLength)
Return an instance of VariableString with specified max string length.static VariableString
of(@Nullable java.lang.String name, int maxStringLength)
Return an instance of VariableString with specified max string length.java.lang.String
toInputType(java.lang.String base)
Convert the Java type used by the baseSchema.FieldType
to the input type.java.lang.String
toString()
-
Methods inherited from class org.apache.beam.sdk.schemas.logicaltypes.PassThroughLogicalType
getArgument, getArgumentType, getBaseType, getIdentifier, toBaseType
-
-
-
-
Method Detail
-
of
public static VariableString of(@Nullable java.lang.String name, int maxStringLength)
Return an instance of VariableString with specified max string length.The name, if set, refers to the TYPE name in the underlying database, for example, VARCHAR and LONGVARCHAR.
-
of
public static VariableString of(int maxStringLength)
Return an instance of VariableString with specified max string length.
-
getMaxLength
public int getMaxLength()
-
getName
public @Nullable java.lang.String getName()
-
toInputType
public java.lang.String toInputType(java.lang.String 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.lang.String,java.lang.String>
- Overrides:
toInputType
in classPassThroughLogicalType<java.lang.String>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-