001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package java.sql;
019:
020: /**
021: * A class which defines constants used to identify generic SQL types, also
022: * called JDBC types. The type constant values are equivalent to those in XOPEN.
023: */
024: public class Types {
025:
026: /*
027: * Private constructor to prevent instantiation.
028: */
029: private Types() {
030: super ();
031: }
032:
033: /**
034: * The type code that identifies the SQL type ARRAY.
035: */
036: public static final int ARRAY = 2003;
037:
038: /**
039: * The type code that identifies the SQL type BIGINT.
040: */
041: public static final int BIGINT = -5;
042:
043: /**
044: * The type code that identifies the SQL type BINARY.
045: */
046: public static final int BINARY = -2;
047:
048: /**
049: * The type code that identifies the SQL type BIT.
050: */
051: public static final int BIT = -7;
052:
053: /**
054: * The type code that identifies the SQL type BLOB.
055: */
056: public static final int BLOB = 2004;
057:
058: /**
059: * The type code that identifies the SQL type BOOLEAN.
060: */
061: public static final int BOOLEAN = 16;
062:
063: /**
064: * The type code that identifies the SQL type CHAR.
065: */
066: public static final int CHAR = 1;
067:
068: /**
069: * The type code that identifies the SQL type CLOB.
070: */
071: public static final int CLOB = 2005;
072:
073: /**
074: * The type code that identifies the SQL type DATALINK.
075: */
076: public static final int DATALINK = 70;
077:
078: /**
079: * The type code that identifies the SQL type DATE.
080: */
081: public static final int DATE = 91;
082:
083: /**
084: * The type code that identifies the SQL type DECIMAL.
085: */
086: public static final int DECIMAL = 3;
087:
088: /**
089: * The type code that identifies the SQL type DISTINCT.
090: */
091: public static final int DISTINCT = 2001;
092:
093: /**
094: * The type code that identifies the SQL type DOUBLE.
095: */
096: public static final int DOUBLE = 8;
097:
098: /**
099: * The type code that identifies the SQL type FLOAT.
100: */
101: public static final int FLOAT = 6;
102:
103: /**
104: * The type code that identifies the SQL type INTEGER.
105: */
106: public static final int INTEGER = 4;
107:
108: /**
109: * The type code that identifies the SQL type JAVA_OBJECT.
110: */
111: public static final int JAVA_OBJECT = 2000;
112:
113: /**
114: * The type code that identifies the SQL type LONGVARBINARY.
115: */
116: public static final int LONGVARBINARY = -4;
117:
118: /**
119: * The type code that identifies the SQL type LONGVARCHAR.
120: */
121: public static final int LONGVARCHAR = -1;
122:
123: /**
124: * The type code that identifies the SQL type NULL.
125: */
126: public static final int NULL = 0;
127:
128: /**
129: * The type code that identifies the SQL type NUMERIC.
130: */
131: public static final int NUMERIC = 2;
132:
133: /**
134: * The type code that identifies that the SQL type is database specific and
135: * is mapped to a Java object, accessed via the methods
136: * <code>getObject</code> and <code>setObject</code>.
137: */
138: public static final int OTHER = 1111;
139:
140: /**
141: * The type code that identifies the SQL type REAL.
142: */
143: public static final int REAL = 7;
144:
145: /**
146: * The type code that identifies the SQL type REF.
147: */
148: public static final int REF = 2006;
149:
150: /**
151: * The type code that identifies the SQL type SMALLINT.
152: */
153: public static final int SMALLINT = 5;
154:
155: /**
156: * The type code that identifies the SQL type STRUCT.
157: */
158: public static final int STRUCT = 2002;
159:
160: /**
161: * The type code that identifies the SQL type TIME.
162: */
163: public static final int TIME = 92;
164:
165: /**
166: * The type code that identifies the SQL type TIMESTAMP.
167: */
168: public static final int TIMESTAMP = 93;
169:
170: /**
171: * The type code that identifies the SQL type TINYINT.
172: */
173: public static final int TINYINT = -6;
174:
175: /**
176: * The type code that identifies the SQL type VARBINARY.
177: */
178: public static final int VARBINARY = -3;
179:
180: /**
181: * The type code that identifies the SQL type VARCHAR.
182: */
183: public static final int VARCHAR = 12;
184: }
|