public enum Type extends Enum<Type>
Modifier and Type | Method and Description |
---|---|
String |
getCreateParams()
Parameters used in creating the type (may be null)
|
String |
getLiteralPrefix()
Prefix used to quote a literal of this type (may be null)
|
String |
getLiteralSuffix()
Suffix used to quote a literal of this type (may be null)
|
String |
getLocalizedName()
Localized version of type name (may be null).
|
Short |
getMaximumScale()
Maximum scale supported for this type
|
Integer |
getMaxPrecision()
Maximum precision for numeric types.
|
Short |
getMinimumScale()
Minimum scale supported for this type
|
String |
getName() |
Short |
getNullable()
Can you use NULL for this type?
|
Integer |
getNumPrecRadix()
Radix for this type (typically either 2 or 10)
Null is returned for data types where this is not applicable.
|
Short |
getSearchable()
Can you use WHERE based on this type?
|
static Type |
getType(String name) |
static Type |
getType(TTypeId tType) |
static Type |
getType(TypeInfo typeInfo)
Convert TypeInfo to appropriate Type
|
Boolean |
isAutoIncrement()
Can this type be used for an auto-increment value?
|
Boolean |
isCaseSensitive()
Is the type case sensitive?
|
boolean |
isCollectionType() |
boolean |
isComplexType() |
Boolean |
isFixedPrecScale()
Can this type represent money?
|
boolean |
isNumericType() |
boolean |
isPrimitiveType() |
boolean |
isQualifiedType() |
Boolean |
isUnsignedAttribute()
Is this type unsigned?
|
int |
toJavaSQLType() |
TTypeId |
toTType() |
static Type |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Type[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Type NULL_TYPE
public static final Type BOOLEAN_TYPE
public static final Type TINYINT_TYPE
public static final Type SMALLINT_TYPE
public static final Type INT_TYPE
public static final Type BIGINT_TYPE
public static final Type FLOAT_TYPE
public static final Type DOUBLE_TYPE
public static final Type STRING_TYPE
public static final Type CHAR_TYPE
public static final Type VARCHAR_TYPE
public static final Type DATE_TYPE
public static final Type TIMESTAMP_TYPE
public static final Type TIMESTAMPLOCALTZ_TYPE
public static final Type INTERVAL_YEAR_MONTH_TYPE
public static final Type INTERVAL_DAY_TIME_TYPE
public static final Type BINARY_TYPE
public static final Type DECIMAL_TYPE
public static final Type ARRAY_TYPE
public static final Type MAP_TYPE
public static final Type STRUCT_TYPE
public static final Type UNION_TYPE
public static final Type USER_DEFINED_TYPE
public static Type[] values()
for (Type c : Type.values()) System.out.println(c);
public static Type valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isPrimitiveType()
public boolean isQualifiedType()
public boolean isComplexType()
public boolean isCollectionType()
public static Type getType(TypeInfo typeInfo)
typeInfo
- public Integer getNumPrecRadix()
public Integer getMaxPrecision()
public boolean isNumericType()
public String getLiteralPrefix()
public String getLiteralSuffix()
public Short getNullable()
public Boolean isCaseSensitive()
public String getCreateParams()
public Short getSearchable()
public Boolean isUnsignedAttribute()
public Boolean isFixedPrecScale()
public Boolean isAutoIncrement()
public String getLocalizedName()
public Short getMinimumScale()
public Short getMaximumScale()
public TTypeId toTType()
public int toJavaSQLType()
public String getName()
Copyright © 2022 The Apache Software Foundation. All rights reserved.