1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.sql;
  6. import java.sql.*;
  7. /**
  8. * <P>The RowSetMetaData interface extends ResultSetMetaData with
  9. * methods that allow a metadata object to be initialized. A
  10. * RowSetReader may create a RowSetMetaData and pass it to a rowset
  11. * when new data is read.
  12. */
  13. public interface RowSetMetaData extends ResultSetMetaData {
  14. /**
  15. * Set the number of columns in the RowSet.
  16. *
  17. * @param columnCount number of columns.
  18. * @exception SQLException if a database-access error occurs.
  19. */
  20. void setColumnCount(int columnCount) throws SQLException;
  21. /**
  22. * Specify whether the is column automatically numbered, thus read-only.
  23. *
  24. * @param column the first column is 1, the second is 2, ...
  25. * @param property is either true or false.
  26. *
  27. * @default is false.
  28. * @exception SQLException if a database-access error occurs.
  29. */
  30. void setAutoIncrement(int columnIndex, boolean property) throws SQLException;
  31. /**
  32. * Specify whether the column is case sensitive.
  33. *
  34. * @param column the first column is 1, the second is 2, ...
  35. * @param property is either true or false.
  36. *
  37. * @default is false.
  38. * @exception SQLException if a database-access error occurs.
  39. */
  40. void setCaseSensitive(int columnIndex, boolean property) throws SQLException;
  41. /**
  42. * Specify whether the column can be used in a where clause.
  43. *
  44. * @param column the first column is 1, the second is 2, ...
  45. * @param property is either true or false.
  46. *
  47. * @default is false.
  48. * @exception SQLException if a database-access error occurs.
  49. */
  50. void setSearchable(int columnIndex, boolean property) throws SQLException;
  51. /**
  52. * Specify whether the column is a cash value.
  53. *
  54. * @param column the first column is 1, the second is 2, ...
  55. * @param property is either true or false.
  56. *
  57. * @default is false.
  58. * @exception SQLException if a database-access error occurs.
  59. */
  60. void setCurrency(int columnIndex, boolean property) throws SQLException;
  61. /**
  62. * Specify whether the column's value can be set to NULL.
  63. *
  64. * @param column the first column is 1, the second is 2, ...
  65. * @param property is either one of columnNoNulls, columnNullable or columnNullableUnknown.
  66. *
  67. * @default is columnNullableUnknown.
  68. * @exception SQLException if a database-access error occurs.
  69. */
  70. void setNullable(int columnIndex, int property) throws SQLException;
  71. /**
  72. * Speicfy whether the column is a signed number.
  73. *
  74. * @param column the first column is 1, the second is 2, ...
  75. * @param property is either true or false.
  76. *
  77. * @default is false.
  78. * @exception SQLException if a database-access error occurs.
  79. */
  80. void setSigned(int columnIndex, boolean property) throws SQLException;
  81. /**
  82. * Specify the column's normal max width in chars.
  83. *
  84. * @param column the first column is 1, the second is 2, ...
  85. * @param size size of the column
  86. *
  87. * @exception SQLException if a database-access error occurs.
  88. */
  89. void setColumnDisplaySize(int columnIndex, int size) throws SQLException;
  90. /**
  91. * Specify the suggested column title for use in printouts and
  92. * displays, if any.
  93. *
  94. * @param column the first column is 1, the second is 2, ...
  95. * @param label the column title
  96. * @exception SQLException if a database-access error occurs.
  97. */
  98. void setColumnLabel(int columnIndex, String label) throws SQLException;
  99. /**
  100. * Specify the column name.
  101. *
  102. * @param column the first column is 1, the second is 2, ...
  103. * @param columnName the column name
  104. * @exception SQLException if a database-access error occurs.
  105. */
  106. void setColumnName(int columnIndex, String columnName) throws SQLException;
  107. /**
  108. * Specify the column's table's schema, if any.
  109. *
  110. * @param column the first column is 1, the second is 2, ...
  111. * @param schemaName the schema name
  112. * @exception SQLException if a database-access error occurs.
  113. */
  114. void setSchemaName(int columnIndex, String schemaName) throws SQLException;
  115. /**
  116. * Specify the column's number of decimal digits.
  117. *
  118. * @param column the first column is 1, the second is 2, ...
  119. * @param precision number of decimal digits.
  120. * @exception SQLException if a database-access error occurs.
  121. */
  122. void setPrecision(int columnIndex, int precision) throws SQLException;
  123. /**
  124. * Specify the column's number of digits to right of the decimal point.
  125. *
  126. * @param column the first column is 1, the second is 2, ...
  127. * @param scale number of digits to right of decimal point.
  128. * @exception SQLException if a database-access error occurs.
  129. */
  130. void setScale(int columnIndex, int scale) throws SQLException;
  131. /**
  132. * Specify the column's table name, if any.
  133. *
  134. * @param column the first column is 1, the second is 2, ...
  135. * @param tableName column's table name.
  136. * @exception SQLException if a database-access error occurs.
  137. */
  138. void setTableName(int columnIndex, String tableName) throws SQLException;
  139. /**
  140. * Specify the column's table's catalog name, if any.
  141. *
  142. * @param column the first column is 1, the second is 2, ...
  143. * @param catalogName column's catalog name.
  144. * @exception SQLException if a database-access error occurs.
  145. */
  146. void setCatalogName(int columnIndex, String catalogName) throws SQLException;
  147. /**
  148. * Specify the column's SQL type.
  149. *
  150. * @param column the first column is 1, the second is 2, ...
  151. * @param SQLType column's SQL type.
  152. * @exception SQLException if a database-access error occurs.
  153. * @see Types
  154. */
  155. void setColumnType(int columnIndex, int SQLType) throws SQLException;
  156. /**
  157. * Specify the column's data source specific type name, if any.
  158. *
  159. * @param column the first column is 1, the second is 2, ...
  160. * @param typeName data source specific type name.
  161. * @exception SQLException if a database-access error occurs.
  162. */
  163. void setColumnTypeName(int columnIndex, String typeName) throws SQLException;
  164. }