Enum Constant and Description |
---|
Boolean |
BooleanArray |
DataSet |
DateTime |
DateTimeArray |
Float4 |
Float4Array |
Float8 |
Float8Array |
Int1 |
Int1Array |
Int2 |
Int2Array |
Int4 |
Int4Array |
Int8 |
Int8Array |
String |
StringArray |
Text |
Modifier and Type | Field and Description |
---|---|
static DataType[] |
CLASSIC_TYPES |
static DataType[] |
CLASSIC_TYPES_NO_DATASET |
static DataType[] |
NORMAL_TAG_TYPES |
Modifier and Type | Method and Description |
---|---|
static DataType |
fromIntValue(java.lang.Integer val) |
DataType |
getComponentDataType()
If the data type is an array type, returns the type of the elements.
|
int |
getIntValue()
Returns the integer value for this Data type
|
java.lang.Class<?> |
getJavaType()
Returns the type in the Java world that would encapsulate this type
|
int |
getJDBCType()
Returns the appropriate JDBC (from java.sql.Types) type for this type.
|
DataTypeClass |
getTypeClass()
Returns the category of data the type represents.
|
static DataType |
getTypeForClass(java.lang.Class<?> clazz)
Gets the DataType for the given java class, returning NULL if a match can't be found.
|
static DataType |
getTypeForJDBC(int jdbcType) |
static DataType |
getTypeForValue(int val)
Returns the DataType for the given int value.
|
boolean |
isArray()
Returns true for array types and dataset
|
boolean |
isFloatingPoint() |
boolean |
isNumeric()
Returns true for integer and float types, and false for everything else (including boolean)
|
static DataType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DataType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DataType Int1
public static final DataType Int2
public static final DataType Int4
public static final DataType Int8
public static final DataType Float4
public static final DataType Float8
public static final DataType Boolean
public static final DataType String
public static final DataType DateTime
public static final DataType DataSet
public static final DataType Text
public static final DataType Int1Array
public static final DataType Int2Array
public static final DataType Int4Array
public static final DataType Int8Array
public static final DataType Float4Array
public static final DataType Float8Array
public static final DataType BooleanArray
public static final DataType StringArray
public static final DataType DateTimeArray
public static DataType[] CLASSIC_TYPES_NO_DATASET
public static DataType[] CLASSIC_TYPES
public static DataType[] NORMAL_TAG_TYPES
public static DataType[] values()
for (DataType c : DataType.values()) System.out.println(c);
public static DataType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getIntValue()
public static DataType fromIntValue(java.lang.Integer val)
public java.lang.Class<?> getJavaType()
public int getJDBCType()
public DataType getComponentDataType()
public boolean isArray()
public DataTypeClass getTypeClass()
public boolean isNumeric()
public boolean isFloatingPoint()
public static DataType getTypeForValue(int val)
val
- public static DataType getTypeForClass(java.lang.Class<?> clazz)
clazz
- public static DataType getTypeForJDBC(int jdbcType)