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. package java.sql;
  8. /**
  9. * <P>The class that defines the constants that are used to identify generic
  10. * SQL types, called JDBC types.
  11. * The actual type constant values are equivalent to those in XOPEN.
  12. * <p>
  13. * This class is never instantiated.
  14. */
  15. public class Types {
  16. /**
  17. * <P>The constant in the Java programming language, sometimes referred
  18. * to as a type code, that identifies the generic SQL type
  19. * <code>BIT</code>.
  20. */
  21. public final static int BIT = -7;
  22. /**
  23. * <P>The constant in the Java programming language, sometimes referred
  24. * to as a type code, that identifies the generic SQL type
  25. * <code>TINYINT</code>.
  26. */
  27. public final static int TINYINT = -6;
  28. /**
  29. * <P>The constant in the Java programming language, sometimes referred
  30. * to as a type code, that identifies the generic SQL type
  31. * <code>SMALLINT</code>.
  32. */
  33. public final static int SMALLINT = 5;
  34. /**
  35. * <P>The constant in the Java programming language, sometimes referred
  36. * to as a type code, that identifies the generic SQL type
  37. * <code>INTEGER</code>.
  38. */
  39. public final static int INTEGER = 4;
  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>BIGINT</code>.
  44. */
  45. public final static int BIGINT = -5;
  46. /**
  47. * <P>The constant in the Java programming language, sometimes referred
  48. * to as a type code, that identifies the generic SQL type
  49. * <code>FLOAT</code>.
  50. */
  51. public final static int FLOAT = 6;
  52. /**
  53. * <P>The constant in the Java programming language, sometimes referred
  54. * to as a type code, that identifies the generic SQL type
  55. * <code>REAL</code>.
  56. */
  57. public final static int REAL = 7;
  58. /**
  59. * <P>The constant in the Java programming language, sometimes referred
  60. * to as a type code, that identifies the generic SQL type
  61. * <code>DOUBLE</code>.
  62. */
  63. public final static int DOUBLE = 8;
  64. /**
  65. * <P>The constant in the Java programming language, sometimes referred
  66. * to as a type code, that identifies the generic SQL type
  67. * <code>NUMERIC</code>.
  68. */
  69. public final static int NUMERIC = 2;
  70. /**
  71. * <P>The constant in the Java programming language, sometimes referred
  72. * to as a type code, that identifies the generic SQL type
  73. * <code>DECIMAL</code>.
  74. */
  75. public final static int DECIMAL = 3;
  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>CHAR</code>.
  80. */
  81. public final static int CHAR = 1;
  82. /**
  83. * <P>The constant in the Java programming language, sometimes referred
  84. * to as a type code, that identifies the generic SQL type
  85. * <code>VARCHAR</code>.
  86. */
  87. public final static int VARCHAR = 12;
  88. /**
  89. * <P>The constant in the Java programming language, sometimes referred
  90. * to as a type code, that identifies the generic SQL type
  91. * <code>LONGVARCHAR</code>.
  92. */
  93. public final static int LONGVARCHAR = -1;
  94. /**
  95. * <P>The constant in the Java programming language, sometimes referred
  96. * to as a type code, that identifies the generic SQL type
  97. * <code>DATE</code>.
  98. */
  99. public final static int DATE = 91;
  100. /**
  101. * <P>The constant in the Java programming language, sometimes referred
  102. * to as a type code, that identifies the generic SQL type
  103. * <code>TIME</code>.
  104. */
  105. public final static int TIME = 92;
  106. /**
  107. * <P>The constant in the Java programming language, sometimes referred
  108. * to as a type code, that identifies the generic SQL type
  109. * <code>TIMESTAMP</code>.
  110. */
  111. public final static int TIMESTAMP = 93;
  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>BINARY</code>.
  116. */
  117. public final static int BINARY = -2;
  118. /**
  119. * <P>The constant in the Java programming language, sometimes referred
  120. * to as a type code, that identifies the generic SQL type
  121. * <code>VARBINARY</code>.
  122. */
  123. public final static int VARBINARY = -3;
  124. /**
  125. * <P>The constant in the Java programming language, sometimes referred
  126. * to as a type code, that identifies the generic SQL type
  127. * <code>LONGVARBINARY</code>.
  128. */
  129. public final static int LONGVARBINARY = -4;
  130. /**
  131. * <P>The constant in the Java programming language, sometimes referred
  132. * to as a type code, that identifies the generic SQL type
  133. * <code>NULL</code>.
  134. */
  135. public final static int NULL = 0;
  136. /**
  137. * The constant in the Java programming language that indicates
  138. * that the SQL type is database-specific and
  139. * gets mapped to a Java object that can be accessed via
  140. * the methods <code>getObject</code> and <code>setObject</code>.
  141. */
  142. public final static int OTHER = 1111;
  143. /**
  144. * The constant in the Java programming language, sometimes referred to
  145. * as a type code, that identifies the generic SQL type
  146. * <code>JAVA_OBJECT</code>.
  147. * @since 1.2
  148. */
  149. public final static int JAVA_OBJECT = 2000;
  150. /**
  151. * The constant in the Java programming language, sometimes referred to
  152. * as a type code, that identifies the generic SQL type
  153. * <code>DISTINCT</code>.
  154. * @since 1.2
  155. */
  156. public final static int DISTINCT = 2001;
  157. /**
  158. * The constant in the Java programming language, sometimes referred to
  159. * as a type code, that identifies the generic SQL type
  160. * <code>STRUCT</code>.
  161. * @since 1.2
  162. */
  163. public final static int STRUCT = 2002;
  164. /**
  165. * The constant in the Java programming language, sometimes referred to
  166. * as a type code, that identifies the generic SQL type
  167. * <code>ARRAY</code>.
  168. * @since 1.2
  169. */
  170. public final static int ARRAY = 2003;
  171. /**
  172. * The constant in the Java programming language, sometimes referred to
  173. * as a type code, that identifies the generic SQL type
  174. * <code>BLOB</code>.
  175. * @since 1.2
  176. */
  177. public final static int BLOB = 2004;
  178. /**
  179. * The constant in the Java programming language, sometimes referred to
  180. * as a type code, that identifies the generic SQL type
  181. * <code>CLOB</code>.
  182. * @since 1.2
  183. */
  184. public final static int CLOB = 2005;
  185. /**
  186. * The constant in the Java programming language, sometimes referred to
  187. * as a type code, that identifies the generic SQL type
  188. * <code>REF</code>.
  189. * @since 1.2
  190. */
  191. public final static int REF = 2006;
  192. /**
  193. * The constant in the Java programming language, somtimes referred to
  194. * as a type code, that identifies the generic SQL type <code>DATALINK</code>.
  195. *
  196. * @since 1.4
  197. */
  198. public final static int DATALINK = 70;
  199. /**
  200. * The constant in the Java programming language, somtimes referred to
  201. * as a type code, that identifies the generic SQL type <code>BOOLEAN</code>.
  202. *
  203. * @since 1.4
  204. */
  205. public final static int BOOLEAN = 16;
  206. // Prevent instantiation
  207. private Types() {}
  208. }