java.sql

Class Types


public class Types
extends Object

The class that defines the constants that are used to identify generic SQL types, called JDBC types. The actual type constant values are equivalent to those in XOPEN.

This class is never instantiated.

Field Summary

static int
ARRAY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.
static int
BIGINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.
static int
BINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.
static int
BIT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.
static int
BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.
static int
BOOLEAN
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type BOOLEAN.
static int
CHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.
static int
CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.
static int
DATALINK
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type DATALINK.
static int
DATE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.
static int
DECIMAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.
static int
DISTINCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.
static int
DOUBLE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.
static int
FLOAT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.
static int
INTEGER
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.
static int
JAVA_OBJECT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
static int
LONGVARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.
static int
LONGVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.
static int
NULL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NULL.
static int
NUMERIC
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.
static int
OTHER
The constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.
static int
REAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.
static int
REF
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.
static int
SMALLINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.
static int
STRUCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.
static int
TIME
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.
static int
TIMESTAMP
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.
static int
TINYINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.
static int
VARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.
static int
VARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.

Method Summary

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Details

ARRAY

public static final int ARRAY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type ARRAY.
Field Value:
2003
Since:
1.2
Usages and Demos :

View More Examples of Types.ARRAY
   1:         declareParameter(new SqlParameter("performance_id", Types.INTEGER));
   2:         declareParameter(new SqlParameter("seats", Types.ARRAY));
   3:         declareParameter(new SqlParameter("price", Types.DECIMAL));
   4:         declareParameter(new SqlParameter("reserved_until", Types.TIMESTAMP));
   5:         declareParameter(new SqlOutParameter("new_booking_id", Types.INTEGER));

View Full Code Here
   1:     {
   2:       case Types.ARRAY:
   3:         return (new Object[0]).getClass();
   4:       case Types.BIGINT:
   5:         return Long.class;

View Full Code Here
   1:         switch ( type ) {
   2:         case Types.ARRAY:
   3:             t.set(trow, field, rset.getArray(rcol));
   4:         ...
   5:         switch ( sqlType ) {
   6:         case Types.ARRAY:
   7:             return Array.class;
   8:             
   9:         case Types.BIGINT:

View Full Code Here
   1:                case Types.STRUCT:
   2:                case Types.ARRAY:
   3:                case Types.BLOB:
   4:                case Types.CLOB:
   5:                case Types.REF:

View Full Code Here
   1:                 return "DISTINCT";
   2:             case Types.ARRAY:
   3:                 return "ARRAY";
   4:             case Types.LONGVARCHAR:
   5:                 return "LONGVARCHAR";

View Full Code Here

BIGINT

public static final int BIGINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIGINT.
Field Value:
-5
Usages and Demos :

View More Examples of Types.BIGINT
   1:     public int getSQLType() {
   2:         return Types.BIGINT;
   3:     }
   4: 
   5: }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.BIGINT;
   3:     }
   4: 
   5:     public String getName() { return "long"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.BIGINT;
   3:     }
   4:     
   5:     public String getName() { return "long"; }

View Full Code Here
   1:                 return "VARCHAR2(100)";
   2:             case Types.BIGINT:
   3:                 return "NUMBER(10)";
   4:             case Types.TIMESTAMP:
   5:                 return "TIMESTAMP";

View Full Code Here
   1:                 return "STRING";
   2:             case Types.BIGINT:
   3:                 return "LONG";
   4:             case Types.TIMESTAMP:
   5:                 return "TIMESTAMP";

View Full Code Here

BINARY

public static final int BINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BINARY.
Field Value:
-2
Usages and Demos :

View More Examples of Types.BINARY
   1:       {
   2:          case Types.BINARY:
   3:          case Types.BLOB:
   4:             return "bytea";
   5:          default:

View Full Code Here
   1:         register(Types.BIGINT, "INT8");
   2:         register(Types.BINARY, "BYTE");
   3:         register(Types.CHAR, "CHAR($l)");
   4:         register(Types.DATE, "DATE");
   5:         register(Types.DECIMAL, "DECIMAL");

View Full Code Here
   1:         register( Types.BIGINT, "BIGINT" );
   2:         register( Types.BINARY, "BINARY" );
   3:         register( Types.BIT, "BIT" );
   4:         register( Types.CHAR, "CHAR(1)" );
   5:         register( Types.DATE, "DATE" );

View Full Code Here
   1:         register( Types.BIGINT, "BIGINT" );
   2:         register( Types.BINARY, "BINARY" );
   3:         register( Types.BIT, "BIT" );
   4:         register( Types.CHAR, "CHAR(1)" );
   5:         register( Types.DATE, "DATE" );

View Full Code Here
   1:         case Types.BLOB:
   2:         case Types.BINARY:
   3:         case Types.CLOB:
   4:         case Types.DATE:
   5:         case Types.INTEGER:

View Full Code Here

BIT

public static final int BIT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BIT.
Field Value:
-7
Usages and Demos :

View More Examples of Types.BIT
   1:     public int getSQLType() {
   2:         return Types.BIT;
   3:     }
   4: }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.BIT;
   3:     }
   4: 
   5:     public String getName() { return "boolean"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.BIT;
   3:     }
   4:     
   5:     public String getName() { return "boolean"; }

View Full Code Here
   1:                 return "NUMERIC(10,5)";
   2:             case Types.BIT:
   3:                 return "NUMBER(1)";
   4:             case Types.INTEGER:
   5:                 return "NUMBER(30)";

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.BIT;
   3:     }
   4: 
   5:     public String getName() { return "boolean"; }

View Full Code Here

BLOB

public static final int BLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type BLOB.
Field Value:
2004
Since:
1.2
Usages and Demos :

View More Examples of Types.BLOB
   1:     public int sqlType() {
   2:         return Types.BLOB;
   3:     }
   4:     
   5:     public Class getReturnedClass() {

View Full Code Here
   1:          case Types.BINARY:
   2:          case Types.BLOB:
   3:             return "bytea";
   4:          default:
   5:             return super.getSQLTypeName(sqltype);

View Full Code Here
   1:         Types.DECIMAL, 
   2:         Types.BLOB,
   3:         Types.CLOB,
   4:         ...
   5:             scale = meta.getScale(index);
   6:         case Types.BLOB:
   7:         case Types.BINARY:
   8:         ...
   9:             return true;
  10:         case Types.BLOB:
  11:         case Types.CLOB:

View Full Code Here
   1:         case Types.CLOB:
   2:         case Types.BLOB:
   3:         case Types.INTEGER:
   4:         ...
   5:             return 0;
   6:         case Types.BLOB:
   7:         case Types.CLOB:
   8:         ...
   9:         case Types.VARCHAR:
  10:         case Types.BLOB:
  11:         case Types.CLOB:

View Full Code Here
   1:             return "BLOB SUB_TYPE TEXT";
   2:         case Types.BLOB:
   3:             return "BLOB";
   4:         ...
   5:         case Types.LONGVARBINARY:
   6:             type.update(Types.BLOB,0,0);
   7:             break;
   8:         case Types.LONGVARCHAR:
   9:             type.update(Types.CLOB,0,0);

View Full Code Here

BOOLEAN

public static final int BOOLEAN
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type BOOLEAN.
Field Value:
16
Since:
1.4
Usages and Demos :

View More Examples of Types.BOOLEAN
   1:     switch (sqlType) {
   2:     case Types.BOOLEAN:
   3:         type = getCreateColumnSQLImpl(Types.BIT, length, precision, scale);
   4:       break;

View Full Code Here
   1:                 return Table.DATATYPE_BOOLEAN;
   2:             case Types.BOOLEAN:
   3:                 return Table.DATATYPE_BOOLEAN;
   4:         ...
   5:             case Table.DATATYPE_BOOLEAN:
   6:                 return Types.BOOLEAN;
   7:             case Table.DATATYPE_DATETIME:
   8:                 return Types.DATE;
   9:         }

View Full Code Here
   1:                 break;
   2:             case Types.BOOLEAN:
   3:                 scls = "java.lang.Boolean";
   4:                 break;
   5:             case Types.TINYINT:

View Full Code Here
   1:                 if (c_from.getType() != c_to.getType()) {
   2:                     if (((c_from.getType() == Types.BIT) && (c_to.getType() == Types.BOOLEAN))
   3:         ...
   4:                     || ((c_from.getType() == Types.BOOLEAN) && (c_to.getType() == Types.BIT))) {
   5:                     } else
   6:                         diff.add(new ModifyColumn(c_to, from));
   7:                 } else if ((c_from.getSize() > 0) && (c_to.getSize() > 0) && (c_from.getSize() != c_to.getSize()))

View Full Code Here
   1:                         case Table.DATATYPE_BOOLEAN:
   2:                             tp=java.sql.Types.BOOLEAN;
   3:                             break;
   4:                         case Table.DATATYPE_CHAR:
   5:                             tp=java.sql.Types.CHAR;

View Full Code Here

CHAR

public static final int CHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CHAR.
Field Value:
1
Usages and Demos :

View More Examples of Types.CHAR
   1:     public int sqlType() {
   2:         return Types.CHAR;
   3:     }
   4:     public String getName() { return "character"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.CHAR;
   3:     }
   4:     public String getName() { return "character"; }
   5:     

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.CHAR;
   3:     }
   4: 

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.CHAR;
   3:     }
   4:     
   5:     

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.CHAR;
   3:     }
   4: 
   5:     private String toCharacter(Object value) {

View Full Code Here

CLOB

public static final int CLOB
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type CLOB.
Field Value:
2005
Since:
1.2
Usages and Demos :

View More Examples of Types.CLOB
   1:     public int sqlType() {
   2:         return Types.CLOB;
   3:     }
   4:     
   5:     public Class getReturnedClass() {

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.CLOB;
   3:     }
   4: 
   5:     public Class returnedClass() {

View Full Code Here
   1:         Types.BLOB,
   2:         Types.CLOB,
   3:     };
   4:         ...
   5:         case Types.BINARY:
   6:         case Types.CLOB:
   7:         case Types.DATE:
   8:         ...
   9:         case Types.BLOB:
  10:         case Types.CLOB:
  11:             return false;

View Full Code Here
   1:         case Types.NULL:
   2:         case Types.CLOB:
   3:         case Types.BLOB:
   4:         ...
   5:         case Types.BLOB:
   6:         case Types.CLOB:
   7:             return 1000000000;
   8:         ...
   9:         case Types.BLOB:
  10:         case Types.CLOB:
  11:         case Types.SMALLINT:

View Full Code Here

DATALINK

public static final int DATALINK
The constant in the Java programming language, somtimes referred to as a type code, that identifies the generic SQL type DATALINK.
Field Value:
70
Since:
1.4
Usages and Demos :

View More Examples of Types.DATALINK
   1:             
   2:         case Types.DATALINK:
   3:         case Types.DISTINCT:
   4:         ...
   5:             
   6:         case Types.DATALINK:
   7:         case Types.DISTINCT:
   8:         case Types.NULL:
   9:         case Types.OTHER:

View Full Code Here
   1:                 return "LONGVARBINARY";
   2:             case Types.DATALINK:
   3:                 return "DATALINK";
   4:             case Types.NUMERIC:
   5:                 return "NUMERIC";

View Full Code Here
   1:             case java.sql.Types.ARRAY: return "ARRAY";
   2:             case java.sql.Types.DATALINK: return "DATALINK";
   3:             case JDBC40Translation.NCHAR: return "NATIONAL CHAR";
   4:             case JDBC40Translation.NCLOB: return "NCLOB";
   5:             case JDBC40Translation.NVARCHAR: return "NATIONAL CHAR VARYING";

View Full Code Here
   1:                 break;
   2:             case Types.DATALINK:
   3:                 result = new URLFieldType();
   4:                 break;
   5:             default:

View Full Code Here

DATE

public static final int DATE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DATE.
Field Value:
91
Usages and Demos :

View More Examples of Types.DATE
   1:     public int getSQLType() {
   2:         return Types.DATE;
   3:     }
   4: }

View Full Code Here
   1:                 return "NUMBER(30)";
   2:             case Types.DATE:
   3:                 return "DATE";
   4:             case Types.TINYINT:
   5:                 return "NUMBER(3)";

View Full Code Here
   1:                 return "INTEGER";
   2:             case Types.DATE:
   3:                 return "DATE";
   4:             case Types.TINYINT:
   5:                 return "BYTE";

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.DATE;
   3:     }
   4:     
   5:     public String toXML(Object value) throws HibernateException {

View Full Code Here
   1:                 return "to_char(null)";
   2:             case Types.DATE:
   3:             case Types.TIMESTAMP:
   4:             case Types.TIME:
   5:                 return "to_date(null)";

View Full Code Here

DECIMAL

public static final int DECIMAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DECIMAL.
Field Value:
3
Usages and Demos :

View More Examples of Types.DECIMAL
   1:         declareParameter(new SqlParameter("seat", Types.INTEGER));
   2:         declareParameter(new SqlParameter("price", Types.DECIMAL));
   3:         declareParameter(new SqlParameter("reserved_until", Types.TIMESTAMP));
   4:         declareParameter(new SqlOutParameter("new_booking_id", Types.INTEGER));
   5:         compile();

View Full Code Here
   1:         declareParameter(new SqlParameter("seats", Types.ARRAY));
   2:         declareParameter(new SqlParameter("price", Types.DECIMAL));
   3:         declareParameter(new SqlParameter("reserved_until", Types.TIMESTAMP));
   4:         declareParameter(new SqlOutParameter("new_booking_id", Types.INTEGER));
   5:         compile();

View Full Code Here
   1:         Types.VARCHAR,
   2:         Types.DECIMAL, 
   3:         Types.BLOB,
   4:         ...
   5:         switch(type) {
   6:         case Types.DECIMAL:
   7:             precision = meta.getPrecision(index);
   8:         ...
   9:         case Types.VARCHAR:
  10:         case Types.DECIMAL:
  11:             return true;

View Full Code Here
   1:         case Types.NUMERIC:
   2:         case Types.DECIMAL:
   3:             if((precision==0 || precision==32) && scale==0) {
   4:         ...
   5:             } else {
   6:                 type.update(Types.DECIMAL,precision,scale);
   7:             }
   8:             break;
   9:         }

View Full Code Here
   1:                 return Table.DATATYPE_NUMERIC;
   2:             case Types.DECIMAL:
   3:                 return Table.DATATYPE_NUMERIC;
   4:             case Types.BIT:
   5:                 return Table.DATATYPE_BOOLEAN;

View Full Code Here

DISTINCT

public static final int DISTINCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DISTINCT.
Field Value:
2001
Since:
1.2
Usages and Demos :

View More Examples of Types.DISTINCT
   1:         return java.math.BigDecimal.class;
   2:       case Types.DISTINCT:
   3:         return Object.class;
   4:       case Types.DOUBLE:
   5:         return Double.class;

View Full Code Here
   1:         case Types.DATALINK:
   2:         case Types.DISTINCT:
   3:         case Types.NULL:
   4:         ...
   5:         case Types.DATALINK:
   6:         case Types.DISTINCT:
   7:         case Types.NULL:
   8:         case Types.OTHER:
   9:         case Types.STRUCT:

View Full Code Here
   1:                case Types.JAVA_OBJECT:
   2:                case Types.DISTINCT:
   3:                case Types.STRUCT:
   4:                case Types.ARRAY:
   5:                case Types.BLOB:

View Full Code Here
   1:         {
   2:             case Types.DISTINCT:
   3:                 return "DISTINCT";
   4:             case Types.ARRAY:
   5:                 return "ARRAY";

View Full Code Here
   1:           case java.sql.Types.ARRAY:
   2:           case java.sql.Types.DISTINCT:
   3:           case java.sql.Types.NULL:
   4:           case java.sql.Types.OTHER:
   5:           case java.sql.Types.REF:

View Full Code Here

DOUBLE

public static final int DOUBLE
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type DOUBLE.
Field Value:
8
Usages and Demos :

View More Examples of Types.DOUBLE
   1:     public int getSQLType() {
   2:         return Types.DOUBLE;
   3:     }
   4: 
   5:     public Object getValueFromResultSet(ResultSet rs, MetaField field) throws SQLException {

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.DOUBLE;
   3:     }
   4:     public String getName() { return "double"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.DOUBLE;
   3:     }
   4:     public String getName() { return "double"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.DOUBLE;
   3:     }
   4:     public String getName() { return "double"; }

View Full Code Here
   1:                 return "NUMBER(20,10)";
   2:             case Types.DOUBLE:
   3:                 return "NUMBER(30,10)";
   4:             default:
   5:             return super.getCreateTable(type);

View Full Code Here

FLOAT

public static final int FLOAT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type FLOAT.
Field Value:
6
Usages and Demos :

View More Examples of Types.FLOAT
   1:     public int sqlType() {
   2:         return Types.FLOAT;
   3:     }
   4: 
   5:     public String getName() { return "float"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.FLOAT;
   3:     }
   4:     
   5:     public String getName() { return "float"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.FLOAT;
   3:     }
   4: 
   5:     public String getName() { return "float"; }

View Full Code Here
   1:           case Types.BIGINT: System.out.print(rs.getLong(i));break;
   2:           case Types.FLOAT: System.out.print(rs.getFloat(i));break;
   3:           case Types.VARCHAR: 
   4:           default: System.out.print(rs.getString(i));
   5:         }

View Full Code Here
   1:                 return Table.DATATYPE_NUMERIC;
   2:             case Types.FLOAT:
   3:                 return Table.DATATYPE_NUMERIC;
   4:             case Types.DOUBLE:
   5:                 return Table.DATATYPE_NUMERIC;

View Full Code Here

INTEGER

public static final int INTEGER
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type INTEGER.
Field Value:
4
Usages and Demos :

View More Examples of Types.INTEGER
   1:     final static int[] TYPES = {
   2:         Types.INTEGER,
   3:         Types.VARCHAR,
   4:         ...
   5:         case Types.DATE:
   6:         case Types.INTEGER:
   7:         case Types.VARCHAR:
   8:         ...
   9:         switch(type) {
  10:         case Types.INTEGER:
  11:         case Types.VARCHAR:

View Full Code Here
   1:         EmbedResultSetMetaData.getResultColumnDescriptor("COLUMN_TYPE",                 Types.SMALLINT, false),
   2:         EmbedResultSetMetaData.getResultColumnDescriptor("DATA_TYPE",                 Types.INTEGER, false),
   3:         EmbedResultSetMetaData.getResultColumnDescriptor("TYPE_NAME",                 Types.VARCHAR, false, 22),
   4:         ...
   5:         EmbedResultSetMetaData.getResultColumnDescriptor("PRECISION",                 Types.INTEGER, false),
   6:         ...
   7:         EmbedResultSetMetaData.getResultColumnDescriptor("LENGTH",                     Types.INTEGER, false),
   8:         EmbedResultSetMetaData.getResultColumnDescriptor("SCALE",                     Types.SMALLINT, false),

View Full Code Here
   1:         return Types.BIT == sqlType || Types.BIGINT == sqlType || Types.DECIMAL == sqlType ||
   2:                 Types.DOUBLE == sqlType || Types.FLOAT == sqlType || Types.INTEGER == sqlType ||
   3:                 Types.NUMERIC == sqlType || Types.REAL == sqlType || Types.SMALLINT == sqlType ||
   4:                 Types.TINYINT == sqlType;
   5:     }

View Full Code Here
   1:                 Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.SMALLINT,
   2:                 Types.VARCHAR, Types.INTEGER, Types.INTEGER, Types.INTEGER,
   3:         ...
   4:                 Types.INTEGER, Types.INTEGER, Types.VARCHAR, Types.VARCHAR,
   5:         ...
   6:                 Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.INTEGER,
   7:                 Types.VARCHAR}, null, null);

View Full Code Here
   1:                     DbDateFormatter.format(activity.getTargetDate())};
   2:             int[] types = new int[] {Types.INTEGER,
   3:         ...
   4:                                      Types.INTEGER,
   5:                                      Types.VARCHAR,
   6:         ...
   7: 
   8:             int[] types = new int[] {Types.INTEGER,
   9:                                      Types.INTEGER,

View Full Code Here

JAVA_OBJECT

public static final int JAVA_OBJECT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type JAVA_OBJECT.
Field Value:
2000
Since:
1.2
Usages and Demos :

View More Examples of Types.JAVA_OBJECT
   1:         return Integer.class;
   2:       case Types.JAVA_OBJECT:
   3:         return Object.class;
   4:       case Types.LONGVARBINARY:
   5:         return byteArrayClass;

View Full Code Here
   1:             }
   2:         case Types.OTHER: case Types.JAVA_OBJECT:
   3:             {
   4:                 cname = "java.lang.Object";
   5:                 break;

View Full Code Here
   1:     public int getJdbcType() {
   2:         return java.sql.Types.JAVA_OBJECT;
   3:     }
   4: 
   5:     public String getPreferredValueClassName() {

View Full Code Here
   1:             
   2:         case Types.JAVA_OBJECT:
   3:             t.set(trow, field, rset.getObject(rcol));
   4:         ...
   5:             
   6:         case Types.JAVA_OBJECT:
   7:             return Object.class;
   8:                         
   9:         case Types.REAL:

View Full Code Here
   1:                case Types.OTHER:
   2:                case Types.JAVA_OBJECT:
   3:                case Types.DISTINCT:
   4:                case Types.STRUCT:
   5:                case Types.ARRAY:

View Full Code Here

LONGVARBINARY

public static final int LONGVARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARBINARY.
Field Value:
-4
Usages and Demos :

View More Examples of Types.LONGVARBINARY
   1:         case Types.NULL:
   2:         case Types.LONGVARBINARY:
   3:             break;
   4:         default:
   5:             throw new Error("type="+type);

View Full Code Here
   1:         switch(type.getDataType()) {
   2:         case Types.LONGVARBINARY:
   3:             type.update(Types.BLOB,0,0);
   4:             break;
   5:         case Types.LONGVARCHAR:

View Full Code Here
   1:             case Types.VARBINARY:
   2:             case Types.LONGVARBINARY:
   3:                 return byte[].class;
   4:             case Types.DATE:
   5:                 scls = "java.sql.Date";

View Full Code Here
   1:             break;
   2:         case java.sql.Types.LONGVARBINARY: 
   3:         ...
   4:             colType = java.sql.Types.LONGVARBINARY; 
   5:             break;
   6:         case java.sql.Types.VARBINARY: 
   7:             colType = java.sql.Types.VARBINARY;

View Full Code Here

LONGVARCHAR

public static final int LONGVARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type LONGVARCHAR.
Field Value:
-1
Usages and Demos :

View More Examples of Types.LONGVARCHAR
   1:                 return Table.DATATYPE_CHAR;
   2:             case Types.LONGVARCHAR:
   3:                 return Table.DATATYPE_CHAR;
   4:             case Types.NUMERIC:
   5:                 return Table.DATATYPE_NUMERIC;

View Full Code Here
   1:             break;
   2:         case Types.LONGVARCHAR:
   3:             type.update(Types.CLOB,0,0);
   4:             break;
   5:         case Types.CHAR:

View Full Code Here
   1:                 break;
   2:             case Types.LONGVARCHAR:
   3:                 scls = "java.lang.String";
   4:                 break;
   5:             case Types.NUMERIC:

View Full Code Here
   1:                 case Types.LONGVARBINARY:
   2:                 case Types.LONGVARCHAR:
   3:                 case JDBC20Translation.SQL_TYPES_BLOB:
   4:                 case JDBC20Translation.SQL_TYPES_CLOB:
   5:                     break;

View Full Code Here
   1:         return byteArrayClass;
   2:       case Types.LONGVARCHAR:
   3:         return String.class;
   4:       case Types.NULL:
   5:         return Object.class;

View Full Code Here

NULL

public static final int NULL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NULL.
Field Value:
0
Usages and Demos :

View More Examples of Types.NULL
   1:         case Types.TIMESTAMP:
   2:         case Types.NULL:
   3:         case Types.LONGVARBINARY:
   4:             break;
   5:         default:

View Full Code Here
   1:         switch(dataType) {
   2:         case Types.NULL:
   3:         case Types.CLOB:
   4:         ...
   5:         switch(datatype) {
   6:         case Types.NULL:
   7:             return 0;
   8:         ...
   9:         switch(datatype) {
  10:         case Types.NULL:
  11:         case Types.TIMESTAMP:

View Full Code Here
   1:         return String.class;
   2:       case Types.NULL:
   3:         return Object.class;
   4:       case Types.NUMERIC:
   5:         return java.math.BigDecimal.class;

View Full Code Here
   1:             break;
   2:         case Types.NULL:
   3:             data = null;
   4:             break;
   5:         default:

View Full Code Here
   1:         case Types.OTHER:
   2:             type.update(Types.NULL,0,0);
   3:             break;
   4:         }
   5:         type.update(type.getDataType(),type.getPrecision(),type.getScale());

View Full Code Here

NUMERIC

public static final int NUMERIC
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type NUMERIC.
Field Value:
2
Usages and Demos :

View More Examples of Types.NUMERIC
   1:     public int getSQLType() {
   2:         return Types.NUMERIC;
   3:     }
   4: 
   5: }

View Full Code Here
   1:     public int getSQLType() {
   2:         return Types.NUMERIC;
   3:     }
   4: 

View Full Code Here
   1:                 return "TIMESTAMP";
   2:             case Types.NUMERIC:
   3:                 return "NUMERIC(10,5)";
   4:             case Types.BIT:
   5:                 return "NUMBER(1)";

View Full Code Here
   1:                 return "TIMESTAMP";
   2:             case Types.NUMERIC:
   3:                 return "NUMBER";
   4:             case Types.BIT:
   5:                 return "BOOLEAN";

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.NUMERIC;
   3:     }
   4: 
   5:     public String toString(Object value) throws HibernateException {

View Full Code Here

OTHER

public static final int OTHER
The constant in the Java programming language that indicates that the SQL type is database-specific and gets mapped to a Java object that can be accessed via the methods getObject and setObject.
Field Value:
1111
Usages and Demos :

View More Examples of Types.OTHER
   1:         } catch (Exception e) {
   2:             log.warn("Unrecognized jdbc-type: " + name + ", using Types.OTHER", e);
   3:         ...
   4:             return Types.OTHER;
   5:         }
   6:     }
   7:     

View Full Code Here
   1:       {
   2:          log.warn("Unrecognized jdbc-type: " + name + ", using Types.OTHER", e);
   3:         ...
   4:          return Types.OTHER;
   5:       }
   6:    }

View Full Code Here
   1:         switch(type.getDataType()) {
   2:         case Types.OTHER:
   3:             type.update(Types.INTEGER,0,0);
   4:             break;
   5:         }

View Full Code Here
   1:         return java.math.BigDecimal.class;
   2:       case Types.OTHER:
   3:         return Object.class;
   4:       case Types.REAL:
   5:         return Float.class;

View Full Code Here
   1:                 case org.apache.derby.iapi.reference.JDBC20Translation.SQL_TYPES_JAVA_OBJECT:
   2:                 case Types.OTHER:    
   3:                 {
   4:                     throw StandardException.newException(SQLState.LANG_UNARY_FUNCTION_BAD_TYPE, 
   5:                                         methodName,

View Full Code Here

REAL

public static final int REAL
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REAL.
Field Value:
7
Usages and Demos :

View More Examples of Types.REAL
   1:     public int getSQLType() {
   2:         return Types.REAL;
   3:     }
   4: 
   5:     public Object getValueFromResultSet(ResultSet rs, MetaField field) throws SQLException {

View Full Code Here
   1:                 return "NUMBER(4)";
   2:             case Types.REAL:
   3:                 return "NUMBER(20,10)";
   4:             case Types.DOUBLE:
   5:                 return "NUMBER(30,10)";

View Full Code Here
   1:                 return "SHORT";
   2:             case Types.REAL:
   3:                 return "FLOAT";
   4:             case Types.DOUBLE:
   5:                 return "NUMBER";

View Full Code Here
   1:         register(Types.INTEGER, "INTEGER");
   2:         register(Types.REAL, "SMALLFLOAT");
   3:         register(Types.SMALLINT, "SMALLINT");
   4:         register(Types.TIME, "DATETIME YEAR TO FRACTION(5)");
   5:         register(Types.TIMESTAMP, "DATETIME HOUR TO SECOND");

View Full Code Here
   1:                 return "SMALLINT";
   2:             case Types.REAL:
   3:                 return "REAL";
   4:             case Types.DOUBLE:
   5:                 return "DOUBLE";

View Full Code Here

REF

public static final int REF
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type REF.
Field Value:
2006
Since:
1.2
Usages and Demos :

View More Examples of Types.REF
   1:         return Float.class;
   2:       case Types.REF:
   3:         return Ref.class;
   4:       case Types.SMALLINT:
   5:         return Short.class;

View Full Code Here
   1:             }
   2:         case Types.REF:
   3:             {
   4:                 cname = "java.sql.Ref";
   5:                 break;

View Full Code Here
   1:             
   2:         case Types.REF:
   3:             t.set(trow, field, rset.getRef(rcol));
   4:         ...
   5:             
   6:         case Types.REF:
   7:             return Ref.class;
   8:                         
   9:         case Types.TIME:

View Full Code Here
   1:                case Types.CLOB:
   2:                case Types.REF:
   3:                   Object o1 = rs.getObject(i);
   4:                   columnValue = (o1==null) ? NULL_STR : o1.toString();
   5:                   break;

View Full Code Here
   1:                 return "FLOAT";
   2:             case Types.REF:
   3:                 return "REF";
   4:             case Types.JAVA_OBJECT:
   5:                 return "JAVA_OBJECT";

View Full Code Here

SMALLINT

public static final int SMALLINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type SMALLINT.
Field Value:
5
Usages and Demos :

View More Examples of Types.SMALLINT
   1:         EmbedResultSetMetaData.getResultColumnDescriptor("COLUMN_NAME",                 Types.VARCHAR, false, 128),
   2:         EmbedResultSetMetaData.getResultColumnDescriptor("COLUMN_TYPE",                 Types.SMALLINT, false),
   3:         EmbedResultSetMetaData.getResultColumnDescriptor("DATA_TYPE",                 Types.INTEGER, false),
   4:         ...
   5:         EmbedResultSetMetaData.getResultColumnDescriptor("LENGTH",                     Types.INTEGER, false),
   6:         EmbedResultSetMetaData.getResultColumnDescriptor("SCALE",                     Types.SMALLINT, false),
   7: 
   8:         ...
   9:         EmbedResultSetMetaData.getResultColumnDescriptor("RADIX",                     Types.SMALLINT, false),
  10:         EmbedResultSetMetaData.getResultColumnDescriptor("NULLABLE",                 Types.SMALLINT, false),

View Full Code Here
   1:                 Types.DOUBLE == sqlType || Types.FLOAT == sqlType || Types.INTEGER == sqlType ||
   2:                 Types.NUMERIC == sqlType || Types.REAL == sqlType || Types.SMALLINT == sqlType ||
   3:                 Types.TINYINT == sqlType;
   4:     }

View Full Code Here
   1:                 "ORDINAL_POSITION", "IS_NULLABLE"}, new int[] { Types.VARCHAR,
   2:                 Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.SMALLINT,
   3:                 Types.VARCHAR, Types.INTEGER, Types.INTEGER, Types.INTEGER,
   4:         ...
   5:                 Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.BIT,
   6:                 Types.VARCHAR, Types.VARCHAR, Types.SMALLINT, Types.SMALLINT,
   7:                 Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.INTEGER,
   8:         ...
   9:                 Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.BIT,
  10:                 Types.VARCHAR, Types.VARCHAR, Types.SMALLINT, Types.SMALLINT,
  11:                 Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.INTEGER,

View Full Code Here
   1:                 new int[]{
   2:                 Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.SMALLINT,
   3:                 Types.VARCHAR,Types.INTEGER,Types.INTEGER,Types.INTEGER,Types.INTEGER,Types.INTEGER,
   4:         ...
   5:                 Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.BIT,Types.VARCHAR,
   6:                 Types.VARCHAR,Types.SMALLINT,Types.SMALLINT,Types.VARCHAR,Types.VARCHAR,
   7:                 Types.INTEGER,Types.INTEGER,Types.VARCHAR
   8:         ...
   9:                 Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,Types.VARCHAR,
  10:                 Types.SMALLINT,Types.VARCHAR
  11:                 }

View Full Code Here

STRUCT

public static final int STRUCT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type STRUCT.
Field Value:
2002
Since:
1.2
Usages and Demos :

View More Examples of Types.STRUCT
   1:         return Short.class;
   2:       case Types.STRUCT:
   3:         return Struct.class;
   4:       case Types.TIME:
   5:         return Time.class;

View Full Code Here
   1:             }
   2:         case Types.STRUCT:
   3:             {
   4:                 cname = "java.sql.Struct";
   5:                 break;

View Full Code Here
   1:         case Types.OTHER:
   2:         case Types.STRUCT:
   3:         default:
   4:         ...
   5:         case Types.OTHER:
   6:         case Types.STRUCT:
   7:         default:
   8:             if ( !m_ignoreUnknownTypes ) {
   9:                 return Object.class;

View Full Code Here
   1:                case Types.DISTINCT:
   2:                case Types.STRUCT:
   3:                case Types.ARRAY:
   4:                case Types.BLOB:
   5:                case Types.CLOB:

View Full Code Here
   1:                 return "TINYINT";
   2:             case Types.STRUCT:
   3:                 return "STRUCT";
   4:             case Types.DATE:
   5:                 return "DATE";

View Full Code Here

TIME

public static final int TIME
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIME.
Field Value:
92
Usages and Demos :

View More Examples of Types.TIME
   1:     public int sqlType() {
   2:         return Types.TIME;
   3:     }
   4:     public String getName() { return "time"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.TIME;
   3:     }
   4:     public String getName() { return "time"; }
   5:     

View Full Code Here
   1:             case Types.TIMESTAMP:
   2:             case Types.TIME:
   3:                 return "to_date(null)";
   4:             default:
   5:                 return "to_number(null)";

View Full Code Here
   1:         case java.sql.Types.DATE:
   2:         case java.sql.Types.TIME:
   3:         case java.sql.Types.TIMESTAMP:
   4:             return "DATE";
   5:         case java.sql.Types.INTEGER:

View Full Code Here
   1:         case Types.NUMERIC:    return new DefaultNUMERIC(42,20);
   2:         case Types.TIME:    return DefaultTIME.instance;
   3:         case Types.TIMESTAMP:    return DefaultTIMESTAMP.instance;
   4:         }
   5:         return null;

View Full Code Here

TIMESTAMP

public static final int TIMESTAMP
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TIMESTAMP.
Field Value:
93
Usages and Demos :

View More Examples of Types.TIMESTAMP
   1:     public int getSQLType() {
   2:         return Types.TIMESTAMP;
   3:     }
   4: }

View Full Code Here
   1:                 return "NUMBER(10)";
   2:             case Types.TIMESTAMP:
   3:                 return "TIMESTAMP";
   4:             case Types.NUMERIC:
   5:                 return "NUMERIC(10,5)";

View Full Code Here
   1:                 return "LONG";
   2:             case Types.TIMESTAMP:
   3:                 return "TIMESTAMP";
   4:             case Types.NUMERIC:
   5:                 return "NUMBER";

View Full Code Here
   1:         super();
   2:         registerColumnType( Types.TIMESTAMP, "date" );
   3:     }
   4:         ...
   5:             case Types.DATE:
   6:             case Types.TIMESTAMP:
   7:             case Types.TIME:
   8:                 return "to_date(null)";
   9:             default:

View Full Code Here
   1:         case java.sql.Types.TIME:
   2:         case java.sql.Types.TIMESTAMP:
   3:             return "DATE";
   4:         case java.sql.Types.INTEGER:
   5:             return "INT";

View Full Code Here

TINYINT

public static final int TINYINT
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type TINYINT.
Field Value:
-6
Usages and Demos :

View More Examples of Types.TINYINT
   1:     public int getSQLType() {
   2:         return Types.TINYINT;
   3:     }
   4: 
   5:     public Object getValueFromResultSet(ResultSet rs, MetaField field) throws SQLException {

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.TINYINT;
   3:     }
   4: 
   5:     public String getName() { return "byte"; }

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.TINYINT;
   3:     }
   4:     
   5:     public String getName() { return "byte"; }

View Full Code Here
   1:         register( Types.SMALLINT, "INTEGER2" );
   2:         register( Types.TINYINT, "INTEGER1" );
   3:         register( Types.INTEGER, "INTEGER4" );
   4:         register( Types.CHAR, "CHAR(1)" );
   5:         register( Types.CHAR, "CHAR($1)" );

View Full Code Here
   1:         register( Types.SMALLINT, "INTEGER2" );
   2:         register( Types.TINYINT, "INTEGER1" );
   3:         register( Types.INTEGER, "INTEGER4" );
   4:         register( Types.CHAR, "CHAR(1)" );
   5:         register( Types.CHAR, "CHAR($1)" );

View Full Code Here

VARBINARY

public static final int VARBINARY
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARBINARY.
Field Value:
-3
Usages and Demos :

View More Examples of Types.VARBINARY
   1:     public int sqlType() {
   2:         return Types.VARBINARY;
   3:     }
   4: 
   5:     public Class returnedClass() {

View Full Code Here
   1:     public int sqlType() {
   2:         return Types.VARBINARY;
   3:     }
   4:     
   5:     public Class getReturnedClass() {

View Full Code Here
   1:             case Types.BINARY :
   2:             case Types.VARBINARY:
   3:             case Types.LONGVARBINARY:
   4:                 return byte[].class;
   5:             case Types.DATE:

View Full Code Here
   1:             break;
   2:         case java.sql.Types.VARBINARY: 
   3:         ...
   4:             colType = java.sql.Types.VARBINARY;
   5:             break;
   6:         case java.sql.Types.BINARY: 
   7:             colType = java.sql.Types.BINARY;

View Full Code Here

VARCHAR

public static final int VARCHAR
The constant in the Java programming language, sometimes referred to as a type code, that identifies the generic SQL type VARCHAR.
Field Value:
12
Usages and Demos :

View More Examples of Types.VARCHAR
   1:         Types.INTEGER,
   2:         Types.VARCHAR,
   3:         Types.DECIMAL, 
   4:         ...
   5:         case Types.INTEGER:
   6:         case Types.VARCHAR:
   7:         case Types.CHAR:
   8:         ...
   9:         case Types.INTEGER:
  10:         case Types.VARCHAR:
  11:         case Types.DECIMAL:

View Full Code Here
   1:             int[] types = new int[] {Types.INTEGER,
   2:                                      Types.VARCHAR,
   3:         ...
   4:                                      Types.VARCHAR};
   5: 
   6:         ...
   7:             int[] types = new int[] {Types.INTEGER,
   8:                                      Types.VARCHAR,
   9:                                      Types.VARCHAR,

View Full Code Here
   1:                 "TABLE_NAME", "TABLE_TYPE", "REMARKS"}, new int[] {
   2:                 Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.VARCHAR,
   3:         ...
   4:                 Types.VARCHAR}, null, null);
   5:         if (rs.next()) {
   6:         ...
   7:                 "SQL_DATA_TYPE", "SQL_DATETIME_SUB", "CHAR_OCTET_LENGTH",
   8:                 "ORDINAL_POSITION", "IS_NULLABLE"}, new int[] { Types.VARCHAR,
   9:                 Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.SMALLINT,

View Full Code Here
   1:                                      Types.INTEGER,
   2:                                      Types.VARCHAR,
   3:                                      Types.TIMESTAMP};
   4:         ...
   5:                                      Types.INTEGER,
   6:                                      Types.VARCHAR,
   7:                                      Types.TIMESTAMP,
   8:                                      Types.INTEGER};

View Full Code Here
   1:                                     Types.INTEGER,
   2:                                     Types.VARCHAR,
   3:         ...
   4:                                     Types.VARCHAR,
   5:                                     Types.INTEGER};
   6:             params = new Object[] {unit.getProject().getId(),
   7:                                    unit.getOwner() == null

View Full Code Here