KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > sql > RowSetMetaData


1 /*
2  * @(#)RowSetMetaData.java 1.8 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 javax.sql;
9
10 import java.sql.*;
11
12 /**
13  * An object that contains information about the columns in a
14  * <code>RowSet</code> object. This interface is
15  * an extension of the <code>ResultSetMetaData</code> interface with
16  * methods for setting the values in a <code>RowSetMetaData</code> object.
17  * When a <code>RowSetReader</code> object reads data into a <code>RowSet</code>
18  * object, it creates a <code>RowSetMetaData</code> object and initializes it
19  * using the methods in the <code>RowSetMetaData</code> interface. Then the
20  * reader passes the <code>RowSetMetaData</code> object to the rowset.
21  * <P>
22  * The methods in this interface are invoked internally when an application
23  * calls the method <code>RowSet.execute</code>; an application
24  * programmer would not use them directly.
25  *
26  * @since 1.4
27  */

28
29 public interface RowSetMetaData extends ResultSetMetaData {
30
31   /**
32    * Sets the number of columns in the <code>RowSet</code> object to
33    * the given number.
34    *
35    * @param columnCount the number of columns in the <code>RowSet</code> object
36    * @exception SQLException if a database access error occurs
37    */

38   void setColumnCount(int columnCount) throws SQLException;
39
40   /**
41    * Sets whether the designated column is automatically numbered,
42    * and thus read-only. The default is for a <code>RowSet</code> object's
43    * columns not to be automatically numbered.
44    *
45    * @param columnIndex the first column is 1, the second is 2, ...
46    * @param property <code>true</code> if the column is automatically
47    * numbered; <code>false</code> if it is not
48    *
49    * @exception SQLException if a database access error occurs
50    */

51   void setAutoIncrement(int columnIndex, boolean property) throws SQLException;
52
53   /**
54    * Sets whether the designated column is case sensitive.
55    * The default is <code>false</code>.
56    *
57    * @param columnIndex the first column is 1, the second is 2, ...
58    * @param property <code>true</code> if the column is case sensitive;
59    * <code>false</code> if it is not
60    *
61    * @exception SQLException if a database access error occurs
62    */

63   void setCaseSensitive(int columnIndex, boolean property) throws SQLException;
64
65   /**
66    * Sets whether the designated column can be used in a where clause.
67    * The default is <code>false</code>.
68    *
69    * @param columnIndex the first column is 1, the second is 2, ...
70    * @param property <code>true</code> if the column can be used in a
71    * <code>WHERE</code> clause; <code>false</code> if it cannot
72    *
73    * @exception SQLException if a database access error occurs
74    */

75   void setSearchable(int columnIndex, boolean property) throws SQLException;
76   
77   /**
78    * Sets whether the designated column is a cash value.
79    * The default is <code>false</code>.
80    *
81    * @param columnIndex the first column is 1, the second is 2, ...
82    * @param property <code>true</code> if the column is a cash value;
83    * <code>false</code> if it is not
84    *
85    * @exception SQLException if a database access error occurs
86    */

87   void setCurrency(int columnIndex, boolean property) throws SQLException;
88   
89   /**
90    * Sets whether the designated column's value can be set to
91    * <code>NULL</code>.
92    * The default is <code>ResultSetMetaData.columnNullableUnknown</code>
93    *
94    * @param columnIndex the first column is 1, the second is 2, ...
95    * @param property one of the following constants:
96    * <code>ResultSetMetaData.columnNoNulls</code>,
97    * <code>ResultSetMetaData.columnNullable</code>, or
98    * <code>ResultSetMetaData.columnNullableUnknown</code>
99    *
100    * @exception SQLException if a database access error occurs
101    */

102   void setNullable(int columnIndex, int property) throws SQLException;
103
104   /**
105    * Sets whether the designated column is a signed number.
106    * The default is <code>false</code>.
107    *
108    * @param columnIndex the first column is 1, the second is 2, ...
109    * @param property <code>true</code> if the column is a signed number;
110    * <code>false</code> if it is not
111    *
112    * @exception SQLException if a database access error occurs
113    */

114   void setSigned(int columnIndex, boolean property) throws SQLException;
115   
116   /**
117    * Sets the designated column's normal maximum width in chars to the
118    * given <code>int</code>.
119    *
120    * @param columnIndex the first column is 1, the second is 2, ...
121    * @param size the normal maximum number of characters for
122    * the designated column
123    *
124    * @exception SQLException if a database access error occurs
125    */

126   void setColumnDisplaySize(int columnIndex, int size) throws SQLException;
127   
128   /**
129    * Sets the suggested column title for use in printouts and
130    * displays, if any, to the given <code>String</code>.
131    *
132    * @param columnIndex the first column is 1, the second is 2, ...
133    * @param label the column title
134    * @exception SQLException if a database access error occurs
135    */

136   void setColumnLabel(int columnIndex, String JavaDoc label) throws SQLException;
137   
138   /**
139    * Sets the name of the designated column to the given <code>String</code>.
140    *
141    * @param columnIndex the first column is 1, the second is 2, ...
142    * @param columnName the designated column's name
143    * @exception SQLException if a database access error occurs
144    */

145   void setColumnName(int columnIndex, String JavaDoc columnName) throws SQLException;
146   
147   /**
148    * Sets the name of the designated column's table's schema, if any, to
149    * the given <code>String</code>.
150    *
151    * @param columnIndex the first column is 1, the second is 2, ...
152    * @param schemaName the schema name
153    * @exception SQLException if a database access error occurs
154    */

155   void setSchemaName(int columnIndex, String JavaDoc schemaName) throws SQLException;
156   
157   /**
158    * Sets the designated column's number of decimal digits to the
159    * given <code>int</code>.
160    *
161    * @param columnIndex the first column is 1, the second is 2, ...
162    * @param precision the total number of decimal digits
163    * @exception SQLException if a database access error occurs
164    */

165   void setPrecision(int columnIndex, int precision) throws SQLException;
166   
167   /**
168    * Sets the designated column's number of digits to the
169    * right of the decimal point to the given <code>int</code>.
170    *
171    * @param columnIndex the first column is 1, the second is 2, ...
172    * @param scale the number of digits to right of decimal point
173    * @exception SQLException if a database access error occurs
174    */

175   void setScale(int columnIndex, int scale) throws SQLException;
176   
177   /**
178    * Sets the designated column's table name, if any, to the given
179    * <code>String</code>.
180    *
181    * @param columnIndex the first column is 1, the second is 2, ...
182    * @param tableName the column's table name
183    * @exception SQLException if a database access error occurs
184    */

185   void setTableName(int columnIndex, String JavaDoc tableName) throws SQLException;
186   
187   /**
188    * Sets the designated column's table's catalog name, if any, to the given
189    * <code>String</code>.
190    *
191    * @param columnIndex the first column is 1, the second is 2, ...
192    * @param catalogName the column's catalog name
193    * @exception SQLException if a database access error occurs
194    */

195   void setCatalogName(int columnIndex, String JavaDoc catalogName) throws SQLException;
196   
197   /**
198    * Sets the designated column's SQL type to the one given.
199    *
200    * @param columnIndex the first column is 1, the second is 2, ...
201    * @param SQLType the column's SQL type
202    * @exception SQLException if a database access error occurs
203    * @see Types
204    */

205   void setColumnType(int columnIndex, int SQLType) throws SQLException;
206   
207   /**
208    * Sets the designated column's type name that is specific to the
209    * data source, if any, to the given <code>String</code>.
210    *
211    * @param columnIndex the first column is 1, the second is 2, ...
212    * @param typeName data source specific type name.
213    * @exception SQLException if a database access error occurs
214    */

215   void setColumnTypeName(int columnIndex, String JavaDoc typeName) throws SQLException;
216
217 }
218
219
220
221
222
223
Popular Tags