KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > sql > Types


1 /*
2  * @(#)Types.java 1.25 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.sql;
9
10 /**
11  * <P>The class that defines the constants that are used to identify generic
12  * SQL types, called JDBC types.
13  * The actual type constant values are equivalent to those in XOPEN.
14  * <p>
15  * This class is never instantiated.
16  */

17 public class Types {
18
19 /**
20  * <P>The constant in the Java programming language, sometimes referred
21  * to as a type code, that identifies the generic SQL type
22  * <code>BIT</code>.
23  */

24     public final static int BIT = -7;
25
26 /**
27  * <P>The constant in the Java programming language, sometimes referred
28  * to as a type code, that identifies the generic SQL type
29  * <code>TINYINT</code>.
30  */

31     public final static int TINYINT = -6;
32
33 /**
34  * <P>The constant in the Java programming language, sometimes referred
35  * to as a type code, that identifies the generic SQL type
36  * <code>SMALLINT</code>.
37  */

38     public final static int SMALLINT = 5;
39
40 /**
41  * <P>The constant in the Java programming language, sometimes referred
42  * to as a type code, that identifies the generic SQL type
43  * <code>INTEGER</code>.
44  */

45     public final static int INTEGER = 4;
46
47 /**
48  * <P>The constant in the Java programming language, sometimes referred
49  * to as a type code, that identifies the generic SQL type
50  * <code>BIGINT</code>.
51  */

52     public final static int BIGINT = -5;
53
54 /**
55  * <P>The constant in the Java programming language, sometimes referred
56  * to as a type code, that identifies the generic SQL type
57  * <code>FLOAT</code>.
58  */

59     public final static int FLOAT = 6;
60
61 /**
62  * <P>The constant in the Java programming language, sometimes referred
63  * to as a type code, that identifies the generic SQL type
64  * <code>REAL</code>.
65  */

66     public final static int REAL = 7;
67
68
69 /**
70  * <P>The constant in the Java programming language, sometimes referred
71  * to as a type code, that identifies the generic SQL type
72  * <code>DOUBLE</code>.
73  */

74     public final static int DOUBLE = 8;
75
76 /**
77  * <P>The constant in the Java programming language, sometimes referred
78  * to as a type code, that identifies the generic SQL type
79  * <code>NUMERIC</code>.
80  */

81     public final static int NUMERIC = 2;
82
83 /**
84  * <P>The constant in the Java programming language, sometimes referred
85  * to as a type code, that identifies the generic SQL type
86  * <code>DECIMAL</code>.
87  */

88     public final static int DECIMAL = 3;
89
90 /**
91  * <P>The constant in the Java programming language, sometimes referred
92  * to as a type code, that identifies the generic SQL type
93  * <code>CHAR</code>.
94  */

95     public final static int CHAR = 1;
96
97 /**
98  * <P>The constant in the Java programming language, sometimes referred
99  * to as a type code, that identifies the generic SQL type
100  * <code>VARCHAR</code>.
101  */

102     public final static int VARCHAR = 12;
103
104 /**
105  * <P>The constant in the Java programming language, sometimes referred
106  * to as a type code, that identifies the generic SQL type
107  * <code>LONGVARCHAR</code>.
108  */

109     public final static int LONGVARCHAR = -1;
110
111
112 /**
113  * <P>The constant in the Java programming language, sometimes referred
114  * to as a type code, that identifies the generic SQL type
115  * <code>DATE</code>.
116  */

117     public final static int DATE = 91;
118
119 /**
120  * <P>The constant in the Java programming language, sometimes referred
121  * to as a type code, that identifies the generic SQL type
122  * <code>TIME</code>.
123  */

124     public final static int TIME = 92;
125
126 /**
127  * <P>The constant in the Java programming language, sometimes referred
128  * to as a type code, that identifies the generic SQL type
129  * <code>TIMESTAMP</code>.
130  */

131     public final static int TIMESTAMP = 93;
132
133
134 /**
135  * <P>The constant in the Java programming language, sometimes referred
136  * to as a type code, that identifies the generic SQL type
137  * <code>BINARY</code>.
138  */

139     public final static int BINARY = -2;
140
141 /**
142  * <P>The constant in the Java programming language, sometimes referred
143  * to as a type code, that identifies the generic SQL type
144  * <code>VARBINARY</code>.
145  */

146     public final static int VARBINARY = -3;
147
148 /**
149  * <P>The constant in the Java programming language, sometimes referred
150  * to as a type code, that identifies the generic SQL type
151  * <code>LONGVARBINARY</code>.
152  */

153     public final static int LONGVARBINARY = -4;
154
155 /**
156  * <P>The constant in the Java programming language, sometimes referred
157  * to as a type code, that identifies the generic SQL type
158  * <code>NULL</code>.
159  */

160     public final static int NULL = 0;
161
162     /**
163      * The constant in the Java programming language that indicates
164      * that the SQL type is database-specific and
165      * gets mapped to a Java object that can be accessed via
166      * the methods <code>getObject</code> and <code>setObject</code>.
167      */

168     public final static int OTHER = 1111;
169
170         
171
172     /**
173      * The constant in the Java programming language, sometimes referred to
174      * as a type code, that identifies the generic SQL type
175      * <code>JAVA_OBJECT</code>.
176      * @since 1.2
177      */

178         public final static int JAVA_OBJECT = 2000;
179
180     /**
181      * The constant in the Java programming language, sometimes referred to
182      * as a type code, that identifies the generic SQL type
183      * <code>DISTINCT</code>.
184      * @since 1.2
185      */

186         public final static int DISTINCT = 2001;
187     
188     /**
189      * The constant in the Java programming language, sometimes referred to
190      * as a type code, that identifies the generic SQL type
191      * <code>STRUCT</code>.
192      * @since 1.2
193      */

194         public final static int STRUCT = 2002;
195
196     /**
197      * The constant in the Java programming language, sometimes referred to
198      * as a type code, that identifies the generic SQL type
199      * <code>ARRAY</code>.
200      * @since 1.2
201      */

202         public final static int ARRAY = 2003;
203
204     /**
205      * The constant in the Java programming language, sometimes referred to
206      * as a type code, that identifies the generic SQL type
207      * <code>BLOB</code>.
208      * @since 1.2
209      */

210         public final static int BLOB = 2004;
211
212     /**
213      * The constant in the Java programming language, sometimes referred to
214      * as a type code, that identifies the generic SQL type
215      * <code>CLOB</code>.
216      * @since 1.2
217      */

218         public final static int CLOB = 2005;
219
220     /**
221      * The constant in the Java programming language, sometimes referred to
222      * as a type code, that identifies the generic SQL type
223      * <code>REF</code>.
224      * @since 1.2
225      */

226         public final static int REF = 2006;
227         
228     /**
229      * The constant in the Java programming language, somtimes referred to
230      * as a type code, that identifies the generic SQL type <code>DATALINK</code>.
231      *
232      * @since 1.4
233      */

234     public final static int DATALINK = 70;
235
236     /**
237      * The constant in the Java programming language, somtimes referred to
238      * as a type code, that identifies the generic SQL type <code>BOOLEAN</code>.
239      *
240      * @since 1.4
241      */

242     public final static int BOOLEAN = 16;
243
244     // Prevent instantiation
245
private Types() {}
246 }
247
248
249
Popular Tags