jet.server.api.db
Class JDBCType

java.lang.Object
  extended by jet.server.api.db.JDBCType

public final class JDBCType
extends java.lang.Object

Class JDBCType defines all JDBC types


Field Summary
static JDBCType ARRAY
          The constant referred to as a type code, that identifies the generic SQL type ARRAY.
static JDBCType BIGINT
          The constant referred to as a type code, that identifies the generic SQL type BIGINT.
static JDBCType BINARY
          The constant referred to as a type code, that identifies the generic SQL type BINARY.
static JDBCType BIT
          The constant referred to as a type code, that identifies the generic SQL type BIT.
static JDBCType BLOB
          The constant referred to as a type code, that identifies the generic SQL type BLOB.
static JDBCType BOOLEAN
          The constant referred to as a type code, that identifies the generic SQL type BOOLEAN.
static JDBCType CHAR
          The constant referred to as a type code, that identifies the generic SQL type CHAR.
static JDBCType CLOB
          The constant referred to as a type code, that identifies the generic SQL type CLOB.
static JDBCType DATALINK
          The constant referred to as a type code, that identifies the generic SQL type DATALINK.
static JDBCType DATE
          The constant referred to as a type code, that identifies the generic SQL type DATE.
static JDBCType DECIMAL
          The constant referred to as a type code, that identifies the generic SQL type DECIMAL.
static JDBCType DISTINCT
          The constant referred to as a type code, that identifies the generic SQL type DISTINCT.
static JDBCType DOUBLE
          The constant referred to as a type code, that identifies the generic SQL type DOUBLE.
static JDBCType FLOAT
          The constant referred to as a type code, that identifies the generic SQL type FLOAT.
static JDBCType INTEGER
          The constant referred to as a type code, that identifies the generic SQL type INTEGER.
static JDBCType JAVA_OBJECT
          The constant referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
static JDBCType LONGVARBINARY
          The constant referred to as a type code, that identifies the generic SQL type LONGVARBINARY.
static JDBCType LONGVARCHAR
          The constant referred to as a type code, that identifies the generic SQL type LONGVARCHAR.
static JDBCType NULL
          The constant referred to as a type code, that identifies the generic SQL type NULL.
static JDBCType NUMERIC
          The constant referred to as a type code, that identifies the generic SQL type NUMERIC.
static JDBCType OTHER
          The constant referred to as a type code, that identifies the generic SQL type OTHER.
static JDBCType REAL
          The constant referred to as a type code, that identifies the generic SQL type REAL.
static JDBCType REF
          The constant referred to as a type code, that identifies the generic SQL type REF.
static JDBCType SMALLINT
          The constant referred to as a type code, that identifies the generic SQL type SMALLINT.
static JDBCType STRUCT
          The constant referred to as a type code, that identifies the generic SQL type STRUCT.
static JDBCType TIME
          The constant referred to as a type code, that identifies the generic SQL type TIME.
static JDBCType TIMESTAMP
          The constant referred to as a type code, that identifies the generic SQL type TIMESTAMP.
static JDBCType TINYINT
          The constant referred to as a type code, that identifies the generic SQL type TINYINT.
static JDBCType VARBINARY
          The constant referred to as a type code, that identifies the generic SQL type VARBINARY.
static JDBCType VARCHAR
          The constant referred to as a type code, that identifies the generic SQL type VARCHAR.
 
Method Summary
 int dataType()
          Gets the type value defined in java.sql.Types of the JDBCType.
 boolean equals(java.lang.Object obj)
          Compares this object to the specified object.
static JDBCType getJDBCType(int type)
          Returns a JDBCType object of specified jdbc type.
 int hashCode()
          Returns a hash code for this jdbc type object.
static boolean isSupported(int type)
          Returns if specified jdbc type is support.
static boolean isSupported(java.lang.String type)
          Returns if specified jdbc type is support.
 boolean isVariationalSize()
          Checks if the jdbc type is variation size.
static int toInteger(java.lang.String type)
          Returns a Int value of specified jdbc type.
 java.lang.String toString()
          Returns a string representation of the object.
static java.lang.String toString(int type)
          Returns a String object of specified jdbc type.
 java.lang.String typeName()
          Gets the type name of JDBCType.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BIT

public static final JDBCType BIT
The constant referred to as a type code, that identifies the generic SQL type BIT.


TINYINT

public static final JDBCType TINYINT
The constant referred to as a type code, that identifies the generic SQL type TINYINT.


SMALLINT

public static final JDBCType SMALLINT
The constant referred to as a type code, that identifies the generic SQL type SMALLINT.


INTEGER

public static final JDBCType INTEGER
The constant referred to as a type code, that identifies the generic SQL type INTEGER.


BIGINT

public static final JDBCType BIGINT
The constant referred to as a type code, that identifies the generic SQL type BIGINT.


FLOAT

public static final JDBCType FLOAT
The constant referred to as a type code, that identifies the generic SQL type FLOAT.


REAL

public static final JDBCType REAL
The constant referred to as a type code, that identifies the generic SQL type REAL.


DOUBLE

public static final JDBCType DOUBLE
The constant referred to as a type code, that identifies the generic SQL type DOUBLE.


NUMERIC

public static final JDBCType NUMERIC
The constant referred to as a type code, that identifies the generic SQL type NUMERIC.


DECIMAL

public static final JDBCType DECIMAL
The constant referred to as a type code, that identifies the generic SQL type DECIMAL.


CHAR

public static final JDBCType CHAR
The constant referred to as a type code, that identifies the generic SQL type CHAR.


VARCHAR

public static final JDBCType VARCHAR
The constant referred to as a type code, that identifies the generic SQL type VARCHAR.


LONGVARCHAR

public static final JDBCType LONGVARCHAR
The constant referred to as a type code, that identifies the generic SQL type LONGVARCHAR.


DATE

public static final JDBCType DATE
The constant referred to as a type code, that identifies the generic SQL type DATE.


TIME

public static final JDBCType TIME
The constant referred to as a type code, that identifies the generic SQL type TIME.


TIMESTAMP

public static final JDBCType TIMESTAMP
The constant referred to as a type code, that identifies the generic SQL type TIMESTAMP.


BINARY

public static final JDBCType BINARY
The constant referred to as a type code, that identifies the generic SQL type BINARY.


VARBINARY

public static final JDBCType VARBINARY
The constant referred to as a type code, that identifies the generic SQL type VARBINARY.


LONGVARBINARY

public static final JDBCType LONGVARBINARY
The constant referred to as a type code, that identifies the generic SQL type LONGVARBINARY.


NULL

public static final JDBCType NULL
The constant referred to as a type code, that identifies the generic SQL type NULL.


OTHER

public static final JDBCType OTHER
The constant referred to as a type code, that identifies the generic SQL type OTHER.


JAVA_OBJECT

public static final JDBCType JAVA_OBJECT
The constant referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.


DISTINCT

public static final JDBCType DISTINCT
The constant referred to as a type code, that identifies the generic SQL type DISTINCT.


STRUCT

public static final JDBCType STRUCT
The constant referred to as a type code, that identifies the generic SQL type STRUCT.


ARRAY

public static final JDBCType ARRAY
The constant referred to as a type code, that identifies the generic SQL type ARRAY.


BLOB

public static final JDBCType BLOB
The constant referred to as a type code, that identifies the generic SQL type BLOB.


CLOB

public static final JDBCType CLOB
The constant referred to as a type code, that identifies the generic SQL type CLOB.


REF

public static final JDBCType REF
The constant referred to as a type code, that identifies the generic SQL type REF.


DATALINK

public static final JDBCType DATALINK
The constant referred to as a type code, that identifies the generic SQL type DATALINK.


BOOLEAN

public static final JDBCType BOOLEAN
The constant referred to as a type code, that identifies the generic SQL type BOOLEAN.

Method Detail

toString

public static final java.lang.String toString(int type)
Returns a String object of specified jdbc type.

Parameters:
type - specified jdbc type.
Returns:
string value of jdbc type.

toInteger

public static final int toInteger(java.lang.String type)
Returns a Int value of specified jdbc type.

Parameters:
type - specified jdbc type.
Returns:
int value of jdbc type.

isSupported

public static final boolean isSupported(int type)
Returns if specified jdbc type is support.

Parameters:
type - specified jdbc type of int type.
Returns:
true if support otherwise return false.

isSupported

public static final boolean isSupported(java.lang.String type)
Returns if specified jdbc type is support.

Parameters:
type - specified jdbc type of string type.
Returns:
true if support otherwise return false.

getJDBCType

public static final JDBCType getJDBCType(int type)
Returns a JDBCType object of specified jdbc type.

Parameters:
type - int value of specified jdbc type.
Returns:
JDBCType object.

typeName

public java.lang.String typeName()
Gets the type name of JDBCType.

Returns:
A String which is the type name of a JDBCType.

dataType

public final int dataType()
Gets the type value defined in java.sql.Types of the JDBCType.

Returns:
an integer.
See Also:
java.sql.Types#

equals

public boolean equals(java.lang.Object obj)
Compares this object to the specified object. The result is true if and only if the argument is not null and is an JDBCTYpe and the object type value is same with this object.

Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
return true if equals otherwise return false.

hashCode

public int hashCode()
Returns a hash code for this jdbc type object.

Overrides:
hashCode in class java.lang.Object

isVariationalSize

public boolean isVariationalSize()
Checks if the jdbc type is variation size.

Returns:
true if the jdbc type is java.sql.Types.CHAR, java.sql.Types.VARCHAR, java.sql.Types.LONGVARCHAR java.sql.Types.BINARY, java.sql.Types.VARBINARY, java.sql.Types.LONGVARBINARY, otherwise return false.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object