com.jdbwc.util
Class MySQLTypes

java.lang.Object
  extended by com.jdbwc.util.MySQLTypes

public class MySQLTypes
extends java.lang.Object

The original file this class was derived from was copied from MySql-Connector/J. This class has been modified from the original and includes one additional method mySqlTypeToJavaTypeName() which is specifically for the JDBWC Drivers Statement extensions WCPreparedStatement() and WCCallableStatement().
Many thanks to the MySql team for allowing developers access to the sources.
This files origin did not have any comment from the original author but is an important part of the MySql-Connector/J Driver none the less. You should have received a copy of the original MySql-Connector/J Driver this file was originally copied from (the original filename is the same as this files name).

Version:
2008-05-29
Author:
Tim Gall (Oz-DevWorX)

Field Summary
static int FIELD_TYPE_BIT
           
static int FIELD_TYPE_BLOB
           
static int FIELD_TYPE_DATE
           
static int FIELD_TYPE_DATETIME
           
static int FIELD_TYPE_DECIMAL
           
static int FIELD_TYPE_DOUBLE
           
static int FIELD_TYPE_ENUM
           
static int FIELD_TYPE_FLOAT
           
static int FIELD_TYPE_GEOMETRY
           
static int FIELD_TYPE_INT24
           
static int FIELD_TYPE_LONG
           
static int FIELD_TYPE_LONG_BLOB
           
static int FIELD_TYPE_LONGLONG
           
static int FIELD_TYPE_MEDIUM_BLOB
           
static int FIELD_TYPE_NEW_DECIMAL
           
static int FIELD_TYPE_NEWDATE
           
static int FIELD_TYPE_NULL
           
static int FIELD_TYPE_SET
           
static int FIELD_TYPE_SHORT
           
static int FIELD_TYPE_STRING
           
static int FIELD_TYPE_TIME
           
static int FIELD_TYPE_TIMESTAMP
           
static int FIELD_TYPE_TINY
           
static int FIELD_TYPE_TINY_BLOB
           
static int FIELD_TYPE_VAR_STRING
           
static int FIELD_TYPE_VARCHAR
           
static int FIELD_TYPE_YEAR
           
protected static long LENGTH_BLOB
           
protected static long LENGTH_LONGBLOB
           
protected static long LENGTH_MEDIUMBLOB
           
protected static long LENGTH_TINYBLOB
           
protected static int MAX_ROWS
           
protected static int NO_CHARSET_INFO
          Used to indicate that the server sent no field-level character set information, so the driver should use the connection-level character encoding instead.
protected static byte OPEN_CURSOR_FLAG
           
 
Constructor Summary
MySQLTypes()
           
 
Method Summary
static java.lang.String mysqlNameToJdbcName(java.lang.String mysqlType)
           
static int mysqlNameToType(java.lang.String mysqlType)
          Maps the given MySQL type name to its generic type.
static int mysqlToJavaType(int mysqlType)
          Maps the given MySQL type to the equivalent JDBC type.
static int mysqlToJavaType(java.lang.String mysqlType)
          Maps the given MySQL type to the correct JDBC type.
static java.lang.String typeToName(int mysqlType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIELD_TYPE_BIT

public static final int FIELD_TYPE_BIT
See Also:
Constant Field Values

FIELD_TYPE_BLOB

public static final int FIELD_TYPE_BLOB
See Also:
Constant Field Values

FIELD_TYPE_DATE

public static final int FIELD_TYPE_DATE
See Also:
Constant Field Values

FIELD_TYPE_DATETIME

public static final int FIELD_TYPE_DATETIME
See Also:
Constant Field Values

FIELD_TYPE_DECIMAL

public static final int FIELD_TYPE_DECIMAL
See Also:
Constant Field Values

FIELD_TYPE_DOUBLE

public static final int FIELD_TYPE_DOUBLE
See Also:
Constant Field Values

FIELD_TYPE_ENUM

public static final int FIELD_TYPE_ENUM
See Also:
Constant Field Values

FIELD_TYPE_FLOAT

public static final int FIELD_TYPE_FLOAT
See Also:
Constant Field Values

FIELD_TYPE_GEOMETRY

public static final int FIELD_TYPE_GEOMETRY
See Also:
Constant Field Values

FIELD_TYPE_INT24

public static final int FIELD_TYPE_INT24
See Also:
Constant Field Values

FIELD_TYPE_LONG

public static final int FIELD_TYPE_LONG
See Also:
Constant Field Values

FIELD_TYPE_LONG_BLOB

public static final int FIELD_TYPE_LONG_BLOB
See Also:
Constant Field Values

FIELD_TYPE_LONGLONG

public static final int FIELD_TYPE_LONGLONG
See Also:
Constant Field Values

FIELD_TYPE_MEDIUM_BLOB

public static final int FIELD_TYPE_MEDIUM_BLOB
See Also:
Constant Field Values

FIELD_TYPE_NEW_DECIMAL

public static final int FIELD_TYPE_NEW_DECIMAL
See Also:
Constant Field Values

FIELD_TYPE_NEWDATE

public static final int FIELD_TYPE_NEWDATE
See Also:
Constant Field Values

FIELD_TYPE_NULL

public static final int FIELD_TYPE_NULL
See Also:
Constant Field Values

FIELD_TYPE_SET

public static final int FIELD_TYPE_SET
See Also:
Constant Field Values

FIELD_TYPE_SHORT

public static final int FIELD_TYPE_SHORT
See Also:
Constant Field Values

FIELD_TYPE_STRING

public static final int FIELD_TYPE_STRING
See Also:
Constant Field Values

FIELD_TYPE_TIME

public static final int FIELD_TYPE_TIME
See Also:
Constant Field Values

FIELD_TYPE_TIMESTAMP

public static final int FIELD_TYPE_TIMESTAMP
See Also:
Constant Field Values

FIELD_TYPE_TINY

public static final int FIELD_TYPE_TINY
See Also:
Constant Field Values

FIELD_TYPE_TINY_BLOB

public static final int FIELD_TYPE_TINY_BLOB
See Also:
Constant Field Values

FIELD_TYPE_VAR_STRING

public static final int FIELD_TYPE_VAR_STRING
See Also:
Constant Field Values

FIELD_TYPE_VARCHAR

public static final int FIELD_TYPE_VARCHAR
See Also:
Constant Field Values

FIELD_TYPE_YEAR

public static final int FIELD_TYPE_YEAR
See Also:
Constant Field Values

LENGTH_BLOB

protected static final long LENGTH_BLOB
See Also:
Constant Field Values

LENGTH_LONGBLOB

protected static final long LENGTH_LONGBLOB
See Also:
Constant Field Values

LENGTH_MEDIUMBLOB

protected static final long LENGTH_MEDIUMBLOB
See Also:
Constant Field Values

LENGTH_TINYBLOB

protected static final long LENGTH_TINYBLOB
See Also:
Constant Field Values

MAX_ROWS

protected static final int MAX_ROWS
See Also:
Constant Field Values

NO_CHARSET_INFO

protected static final int NO_CHARSET_INFO
Used to indicate that the server sent no field-level character set information, so the driver should use the connection-level character encoding instead.

See Also:
Constant Field Values

OPEN_CURSOR_FLAG

protected static final byte OPEN_CURSOR_FLAG
See Also:
Constant Field Values
Constructor Detail

MySQLTypes

public MySQLTypes()
Method Detail

mysqlNameToJdbcName

public static java.lang.String mysqlNameToJdbcName(java.lang.String mysqlType)

mysqlNameToType

public static int mysqlNameToType(java.lang.String mysqlType)
Maps the given MySQL type name to its generic type.


mysqlToJavaType

public static int mysqlToJavaType(int mysqlType)
Maps the given MySQL type to the equivalent JDBC type.


mysqlToJavaType

public static int mysqlToJavaType(java.lang.String mysqlType)
Maps the given MySQL type to the correct JDBC type.


typeToName

public static java.lang.String typeToName(int mysqlType)
Parameters:
mysqlType -
Returns:
String - the types name