提交 c5c09177 authored 作者: Thomas Mueller's avatar Thomas Mueller

JDK 1.5 compatibility.

上级 b0d2049a
...@@ -49,6 +49,30 @@ public class DataType { ...@@ -49,6 +49,30 @@ public class DataType {
*/ */
public static final int TYPE_RESULT_SET = -10; public static final int TYPE_RESULT_SET = -10;
/**
* This constant is used for JDK 1.5 compatibility
* and equal to java.sql.Types.LONGNVARCHAR
*/
public static final int TYPE_LONGNVARCHAR = -16;
/**
* This constant is used for JDK 1.5 compatibility
* and equal to java.sql.Types.NCHAR
*/
public static final int TYPE_NCHAR = -15;
/**
* This constant is used for JDK 1.5 compatibility
* and equal to java.sql.Types.NVARCHAR
*/
public static final int TYPE_NVARCHAR = -9;
/**
* This constant is used for JDK 1.5 compatibility
* and equal to java.sql.Types.NCLOB
*/
public static final int TYPE_NCLOB = 2011;
/** /**
* The list of types. An ArrayList so that Tomcat doesn't set it to null * The list of types. An ArrayList so that Tomcat doesn't set it to null
* when clearing references. * when clearing references.
...@@ -706,12 +730,12 @@ public class DataType { ...@@ -706,12 +730,12 @@ public class DataType {
public static int convertSQLTypeToValueType(int sqlType) { public static int convertSQLTypeToValueType(int sqlType) {
switch(sqlType) { switch(sqlType) {
case Types.CHAR: case Types.CHAR:
case Types.NCHAR: case TYPE_NCHAR:
return Value.STRING_FIXED; return Value.STRING_FIXED;
case Types.VARCHAR: case Types.VARCHAR:
case Types.LONGVARCHAR: case Types.LONGVARCHAR:
case Types.NVARCHAR: case TYPE_NVARCHAR:
case Types.LONGNVARCHAR: case TYPE_LONGNVARCHAR:
return Value.STRING; return Value.STRING;
case Types.NUMERIC: case Types.NUMERIC:
case Types.DECIMAL: case Types.DECIMAL:
...@@ -748,7 +772,7 @@ public class DataType { ...@@ -748,7 +772,7 @@ public class DataType {
case Types.BLOB: case Types.BLOB:
return Value.BLOB; return Value.BLOB;
case Types.CLOB: case Types.CLOB:
case Types.NCLOB: case TYPE_NCLOB:
return Value.CLOB; return Value.CLOB;
case Types.NULL: case Types.NULL:
return Value.NULL; return Value.NULL;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论