com.j256.ormlite.field
Enum SqlType

java.lang.Object
  extended by java.lang.Enum<SqlType>
      extended by com.j256.ormlite.field.SqlType
All Implemented Interfaces:
Serializable, Comparable<SqlType>

public enum SqlType
extends Enum<SqlType>

The SQL data types that are supported. These are basically an enumeration of the constants in java.sql.Types.

NOTE: If you add types here you will need to add to the various DatabaseType implementors' appendColumnArg() method.

Author:
graywatson

Enum Constant Summary
BIG_DECIMAL
           
BLOB
           
BOOLEAN
           
BYTE
           
BYTE_ARRAY
           
CHAR
           
DATE
           
DOUBLE
           
FLOAT
           
INTEGER
           
LONG
           
LONG_STRING
           
OTHER
           
SERIALIZABLE
           
SHORT
           
STRING
           
UNKNOWN
           
 
Method Summary
static SqlType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SqlType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

STRING

public static final SqlType STRING

LONG_STRING

public static final SqlType LONG_STRING

DATE

public static final SqlType DATE

BOOLEAN

public static final SqlType BOOLEAN

CHAR

public static final SqlType CHAR

BYTE

public static final SqlType BYTE

BYTE_ARRAY

public static final SqlType BYTE_ARRAY

SHORT

public static final SqlType SHORT

INTEGER

public static final SqlType INTEGER

LONG

public static final SqlType LONG

FLOAT

public static final SqlType FLOAT

DOUBLE

public static final SqlType DOUBLE

SERIALIZABLE

public static final SqlType SERIALIZABLE

BLOB

public static final SqlType BLOB

BIG_DECIMAL

public static final SqlType BIG_DECIMAL

OTHER

public static final SqlType OTHER

UNKNOWN

public static final SqlType UNKNOWN
Method Detail

values

public static SqlType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SqlType c : SqlType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SqlType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null


This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.