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