- All Implemented Interfaces:
Serializable,Comparable<SqlType>,Constable
The sql types used when talking to the database backend.
Defines a typesafe subset of Types.
- Author:
- harald
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionLong and long.Boolean and boolean.Arbitrary data usually stored as BLOB.Character and char.Large Strings usually stored as CLOB.Date.BigDecimal and DMoney.Double and double.Float and float.Integer and int.Application specific.Short and short.Time.Timestamp.Byte and byte.UUID.String. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>getClazz()Gets the corresponding class.Gets the default value.Parses the string and converts to a java-value.static SqlTypeReturns the enum constant of this class with the specified name.static SqlType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
VARCHAR
String. -
DATE
Date. -
TIME
Time. -
TIMESTAMP
Timestamp. -
BLOB
Arbitrary data usually stored as BLOB. -
CLOB
Large Strings usually stored as CLOB. -
DECIMAL
BigDecimal and DMoney. -
CHAR
Character and char. -
BIT
Boolean and boolean. -
TINYINT
Byte and byte. -
SMALLINT
Short and short. -
INTEGER
Integer and int. -
BIGINT
Long and long. -
FLOAT
Float and float. -
DOUBLE
Double and double. -
UUID
UUID. -
JAVA_OBJECT
Application specific.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getClazz
Gets the corresponding class.- Returns:
- the class
-
getDefaultValue
Gets the default value.- Returns:
- the default, null if no default
-
parse
Parses the string and converts to a java-value.- Parameters:
str- the string usually returned from JDBC metadata- Returns:
- the java value
-