Class EnumerationType
java.lang.Object
org.apache.beam.sdk.schemas.logicaltypes.EnumerationType
- All Implemented Interfaces:
Serializable,Schema.LogicalType<EnumerationType.Value,Integer>
public class EnumerationType
extends Object
implements Schema.LogicalType<EnumerationType.Value,Integer>
This
Schema.LogicalType represent an enumeration over a fixed set of values.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class represents a single enum value. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumerationTypeCreate an enumeration type from a fixed set of String values; integer values will be automatically chosen.static EnumerationTypeCreate an enumeration type from a fixed set of String values; integer values will be automatically chosen.static EnumerationTypeCreate an enumeration type over a set of String->Integer values.An optional argument to configure the type.A schema type representing how to interpret the argument.The baseSchema.FieldTypeused to store values of this type.getEnumName(int number) getEnumValue(String enumName) The unique identifier for this type.toBaseType(EnumerationType.Value input) Convert the input type to the type Java type used by the baseSchema.FieldType.toInputType(Integer base) Convert the Java type used by the baseSchema.FieldTypeto the input type.toString()toString(EnumerationType.Value value) valueOf(int value) Return anEnumerationType.Valuecorresponding to one of the enumeration integer values.Return anEnumerationType.Valuecorresponding to one of the enumeration strings.
-
Field Details
-
IDENTIFIER
- See Also:
-
-
Method Details
-
create
Create an enumeration type over a set of String->Integer values. -
create
Create an enumeration type from a fixed set of String values; integer values will be automatically chosen. -
create
Create an enumeration type from a fixed set of String values; integer values will be automatically chosen. -
valueOf
Return anEnumerationType.Valuecorresponding to one of the enumeration strings. -
valueOf
Return anEnumerationType.Valuecorresponding to one of the enumeration integer values. -
getIdentifier
Description copied from interface:Schema.LogicalTypeThe unique identifier for this type.- Specified by:
getIdentifierin interfaceSchema.LogicalType<EnumerationType.Value,Integer>
-
getArgumentType
Description copied from interface:Schema.LogicalTypeA schema type representing how to interpret the argument.nullindicates this logical type is not parameterized by an argument.- Specified by:
getArgumentTypein interfaceSchema.LogicalType<EnumerationType.Value,Integer>
-
getArgument
Description copied from interface:Schema.LogicalTypeAn optional argument to configure the type.- Specified by:
getArgumentin interfaceSchema.LogicalType<EnumerationType.Value,Integer>
-
getBaseType
Description copied from interface:Schema.LogicalTypeThe baseSchema.FieldTypeused to store values of this type.- Specified by:
getBaseTypein interfaceSchema.LogicalType<EnumerationType.Value,Integer>
-
toBaseType
Description copied from interface:Schema.LogicalTypeConvert the input type to the type Java type used by the baseSchema.FieldType.- Specified by:
toBaseTypein interfaceSchema.LogicalType<EnumerationType.Value,Integer>
-
toInputType
Description copied from interface:Schema.LogicalTypeConvert the Java type used by the baseSchema.FieldTypeto the input type.- Specified by:
toInputTypein interfaceSchema.LogicalType<EnumerationType.Value,Integer>
-
getValuesMap
-
getEnumName
-
getEnumValue
-
getValues
-
toString
-
toString
-