1. /*
  2. * @(#)Types.java 1.15 01/11/29
  3. *
  4. * Copyright 2002 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 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. *
  13. */
  14. public class Types {
  15. public final static int BIT = -7;
  16. public final static int TINYINT = -6;
  17. public final static int SMALLINT = 5;
  18. public final static int INTEGER = 4;
  19. public final static int BIGINT = -5;
  20. public final static int FLOAT = 6;
  21. public final static int REAL = 7;
  22. public final static int DOUBLE = 8;
  23. public final static int NUMERIC = 2;
  24. public final static int DECIMAL = 3;
  25. public final static int CHAR = 1;
  26. public final static int VARCHAR = 12;
  27. public final static int LONGVARCHAR = -1;
  28. public final static int DATE = 91;
  29. public final static int TIME = 92;
  30. public final static int TIMESTAMP = 93;
  31. public final static int BINARY = -2;
  32. public final static int VARBINARY = -3;
  33. public final static int LONGVARBINARY = -4;
  34. public final static int NULL = 0;
  35. /**
  36. * <code>OTHER</code> indicates that the SQL type is database-specific and
  37. * gets mapped to a Java object that can be accessed via
  38. * the methods <code>getObject</code> and <code>setObject</code>.
  39. */
  40. public final static int OTHER = 1111;
  41. /**
  42. * JDBC 2.0
  43. *
  44. * A type representing a Java Object.
  45. */
  46. public final static int JAVA_OBJECT = 2000;
  47. /**
  48. * JDBC 2.0
  49. *
  50. * A type based on a built-in type.
  51. * One of the two user-defined data types (UDTs).
  52. */
  53. public final static int DISTINCT = 2001;
  54. /**
  55. * JDBC 2.0
  56. *
  57. * A type consisting of attributes that may be any type.
  58. * One of the two user-defined data types (UDTs).
  59. */
  60. public final static int STRUCT = 2002;
  61. /**
  62. * JDBC 2.0
  63. *
  64. * A type representing an SQL ARRAY.
  65. */
  66. public final static int ARRAY = 2003;
  67. /**
  68. * JDBC 2.0
  69. *
  70. * A type representing an SQL Binary Large Object.
  71. */
  72. public final static int BLOB = 2004;
  73. /**
  74. * JDBC 2.0
  75. *
  76. * A type representing an SQL Character Large Object.
  77. */
  78. public final static int CLOB = 2005;
  79. /**
  80. * JDBC 2.0
  81. *
  82. * A type representing an SQL REF<structured type>.
  83. */
  84. public final static int REF = 2006;
  85. // Prevent instantiation
  86. private Types() {}
  87. }