001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package javax.sql;
019:
020: import java.sql.ResultSetMetaData;
021: import java.sql.SQLException;
022:
023: /**
024: * An interface which provides facilities for getting information about the
025: * columns in a RowSet.
026: * <p>
027: * RowSetMetaData extends ResultSetMetaData, adding new operations for carrying
028: * out value sets.
029: * <p>
030: * Application code would not normally call this interface directly. It would be
031: * called internally when <code>RowSet.execute</code> is called.
032: */
033: public interface RowSetMetaData extends ResultSetMetaData {
034:
035: /**
036: * Sets automatic numbering for a specified column in the RowSet. If
037: * automatic numbering is on, the column is read only. The default value is
038: * for automatic numbering to be off.
039: *
040: * @param columnIndex
041: * the index number for the column, where the first column has
042: * index 1.
043: * @param autoIncrement
044: * true to set automatic numbering on, false to turn it off.
045: * @throws SQLException
046: * if a problem occurs accessing the database
047: */
048: public void setAutoIncrement(int columnIndex, boolean autoIncrement)
049: throws SQLException;
050:
051: /**
052: * Sets the case sensitive property for a specified column in the RowSet.
053: * The default is that the column is not case sensitive.
054: *
055: * @param columnIndex
056: * the index number for the column, where the first column has
057: * index 1.
058: * @param caseSensitive
059: * true to make the column case sensitive, false to make it not
060: * case sensitive.
061: * @throws SQLException
062: * if a problem occurs accessing the database
063: */
064: public void setCaseSensitive(int columnIndex, boolean caseSensitive)
065: throws SQLException;
066:
067: /**
068: * Sets the Catalog Name for a specified column in the RowSet.
069: *
070: * @param columnIndex
071: * the index number for the column, where the first column has
072: * index 1.
073: * @param catalogName
074: * a string containing the new Catalog Name
075: * @throws SQLException
076: * if a problem occurs accessing the database
077: */
078: public void setCatalogName(int columnIndex, String catalogName)
079: throws SQLException;
080:
081: /**
082: * Sets the number of columns in the Row Set.
083: *
084: * @param columnCount
085: * an integer containing the number of columns in the RowSet.
086: * @throws SQLException
087: * if a problem occurs accessing the database
088: */
089: public void setColumnCount(int columnCount) throws SQLException;
090:
091: /**
092: * Sets the normal maximum width in characters for a specified column in the
093: * RowSet.
094: *
095: * @param columnIndex
096: * the index number for the column, where the first column has
097: * index 1.
098: * @param displaySize
099: * an integer with the normal maximum column width in characters
100: * @throws SQLException
101: * if a problem occurs accessing the database
102: */
103: public void setColumnDisplaySize(int columnIndex, int displaySize)
104: throws SQLException;
105:
106: /**
107: *
108: * @param columnIndex
109: * the index number for the column, where the first column has
110: * index 1.
111: * @param theLabel
112: * @throws SQLException
113: * if a problem occurs accessing the database
114: */
115: public void setColumnLabel(int columnIndex, String theLabel)
116: throws SQLException;
117:
118: /**
119: * Sets the suggested column label for a specified column in the RowSet.
120: * This label is typically used in displaying or printing the column.
121: *
122: * @param columnIndex
123: * the index number for the column, where the first column has
124: * index 1.
125: * @param theColumnName
126: * a string containing the column label
127: * @throws SQLException
128: * if a problem occurs accessing the database
129: */
130: public void setColumnName(int columnIndex, String theColumnName)
131: throws SQLException;
132:
133: /**
134: * Sets the SQL type for a specified column in the RowSet
135: *
136: * @param columnIndex
137: * the index number for the column, where the first column has
138: * index 1.
139: * @param theSQLType
140: * an integer containing the SQL Type, as defined by
141: * java.sql.Types.
142: * @throws SQLException
143: * if a problem occurs accessing the database
144: */
145: public void setColumnType(int columnIndex, int theSQLType)
146: throws SQLException;
147:
148: /**
149: * Sets the Type Name for a specified column in the RowSet, where the data
150: * type is specific to the datasource.
151: *
152: * @param columnIndex
153: * the index number for the column, where the first column has
154: * index 1.
155: * @param theTypeName
156: * a string containing the Type Name for the column
157: * @throws SQLException
158: * if a problem occurs accessing the database
159: */
160: public void setColumnTypeName(int columnIndex, String theTypeName)
161: throws SQLException;
162:
163: /**
164: * Sets whether a specified column is a currency value.
165: *
166: * @param columnIndex
167: * the index number for the column, where the first column has
168: * index 1.
169: * @param isCurrency
170: * true if the column should be treated as a currency value,
171: * false if it should not be treated as a currency value.
172: * @throws SQLException
173: * if a problem occurs accessing the database
174: */
175: public void setCurrency(int columnIndex, boolean isCurrency)
176: throws SQLException;
177:
178: /**
179: * Sets whether a specified column can contain SQL NULL values.
180: *
181: * @param columnIndex
182: * the index number for the column, where the first column has
183: * index 1.
184: * @param nullability
185: * an integer which is one of the following values:
186: * ResultSetMetaData.columnNoNulls,
187: * ResultSetMetaData.columnNullable, or
188: * ResultSetMetaData.columnNullableUnknown
189: * <p>
190: * The default value is ResultSetMetaData.columnNullableUnknown
191: * @throws SQLException
192: * if a problem occurs accessing the database
193: */
194: public void setNullable(int columnIndex, int nullability)
195: throws SQLException;
196:
197: /**
198: * Sets the number of decimal digits for a specified column in the RowSet.
199: *
200: * @param columnIndex
201: * the index number for the column, where the first column has
202: * index 1.
203: * @param thePrecision
204: * an integer containing the number of decimal digits
205: * @throws SQLException
206: * if a problem occurs accessing the database
207: */
208: public void setPrecision(int columnIndex, int thePrecision)
209: throws SQLException;
210:
211: /**
212: * For the column specified by <code>columnIndex</code> declares how many
213: * digits there should be after a decimal point.
214: *
215: * @param columnIndex
216: * the index number for the column, where the first column has
217: * index 1.
218: * @param theScale
219: * an integer containing the number of digits after the decimal
220: * point
221: * @throws SQLException
222: * if a problem occurs accessing the database
223: */
224: public void setScale(int columnIndex, int theScale)
225: throws SQLException;
226:
227: /**
228: * Sets the Schema Name for a specified column in the RowSet
229: *
230: * @param columnIndex
231: * the index number for the column, where the first column has
232: * index 1.
233: * @param theSchemaName
234: * a String containing the schema name
235: * @throws SQLException
236: * if a problem occurs accessing the database
237: */
238: public void setSchemaName(int columnIndex, String theSchemaName)
239: throws SQLException;
240:
241: /**
242: * Sets whether a specified column can be used in a search involving a WHERE
243: * clause. The default value is false.
244: *
245: * @param columnIndex
246: * the index number for the column, where the first column has
247: * index 1.
248: * @param isSearchable
249: * true of the column can be used in a WHERE clause search, false
250: * otherwise.
251: * @throws SQLException
252: * if a problem occurs accessing the database
253: */
254: public void setSearchable(int columnIndex, boolean isSearchable)
255: throws SQLException;
256:
257: /**
258: * Sets if a specified column can contain signed numbers
259: *
260: * @param columnIndex
261: * the index number for the column, where the first column has
262: * index 1.
263: * @param isSigned
264: * true if the column can contain signed numbers, false otherwise
265: * @throws SQLException
266: * if a problem occurs accessing the database
267: */
268: public void setSigned(int columnIndex, boolean isSigned)
269: throws SQLException;
270:
271: /**
272: * Sets the Table Name for a specified column in the RowSet
273: *
274: * @param columnIndex
275: * the index number for the column, where the first column has
276: * index 1.
277: * @param theTableName
278: * a String containing the Table Name for the column
279: * @throws SQLException
280: * if a problem occurs accessing the database
281: */
282: public void setTableName(int columnIndex, String theTableName)
283: throws SQLException;
284: }
|