Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/src/java.sql/share/classes/javax/sql/RowSetMetaData.java
41152 views
1
/*
2
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation. Oracle designates this
8
* particular file as subject to the "Classpath" exception as provided
9
* by Oracle in the LICENSE file that accompanied this code.
10
*
11
* This code is distributed in the hope that it will be useful, but WITHOUT
12
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
* version 2 for more details (a copy is included in the LICENSE file that
15
* accompanied this code).
16
*
17
* You should have received a copy of the GNU General Public License version
18
* 2 along with this work; if not, write to the Free Software Foundation,
19
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
*
21
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
* or visit www.oracle.com if you need additional information or have any
23
* questions.
24
*/
25
26
package javax.sql;
27
28
import java.sql.*;
29
30
/**
31
* An object that contains information about the columns in a
32
* {@code RowSet} object. This interface is
33
* an extension of the {@code ResultSetMetaData} interface with
34
* methods for setting the values in a {@code RowSetMetaData} object.
35
* When a {@code RowSetReader} object reads data into a {@code RowSet}
36
* object, it creates a {@code RowSetMetaData} object and initializes it
37
* using the methods in the {@code RowSetMetaData} interface. Then the
38
* reader passes the {@code RowSetMetaData} object to the rowset.
39
* <P>
40
* The methods in this interface are invoked internally when an application
41
* calls the method {@code RowSet.execute}; an application
42
* programmer would not use them directly.
43
*
44
* @since 1.4
45
*/
46
47
public interface RowSetMetaData extends ResultSetMetaData {
48
49
/**
50
* Sets the number of columns in the {@code RowSet} object to
51
* the given number.
52
*
53
* @param columnCount the number of columns in the {@code RowSet} object
54
* @throws SQLException if a database access error occurs
55
*/
56
void setColumnCount(int columnCount) throws SQLException;
57
58
/**
59
* Sets whether the designated column is automatically numbered,
60
* The default is for a {@code RowSet} object's
61
* columns not to be automatically numbered.
62
*
63
* @param columnIndex the first column is 1, the second is 2, ...
64
* @param property {@code true} if the column is automatically
65
* numbered; {@code false} if it is not
66
*
67
* @throws SQLException if a database access error occurs
68
*/
69
void setAutoIncrement(int columnIndex, boolean property) throws SQLException;
70
71
/**
72
* Sets whether the designated column is case sensitive.
73
* The default is {@code false}.
74
*
75
* @param columnIndex the first column is 1, the second is 2, ...
76
* @param property {@code true} if the column is case sensitive;
77
* {@code false} if it is not
78
*
79
* @throws SQLException if a database access error occurs
80
*/
81
void setCaseSensitive(int columnIndex, boolean property) throws SQLException;
82
83
/**
84
* Sets whether the designated column can be used in a where clause.
85
* The default is {@code false}.
86
*
87
* @param columnIndex the first column is 1, the second is 2, ...
88
* @param property {@code true} if the column can be used in a
89
* {@code WHERE} clause; {@code false} if it cannot
90
*
91
* @throws SQLException if a database access error occurs
92
*/
93
void setSearchable(int columnIndex, boolean property) throws SQLException;
94
95
/**
96
* Sets whether the designated column is a cash value.
97
* The default is {@code false}.
98
*
99
* @param columnIndex the first column is 1, the second is 2, ...
100
* @param property {@code true} if the column is a cash value;
101
* {@code false} if it is not
102
*
103
* @throws SQLException if a database access error occurs
104
*/
105
void setCurrency(int columnIndex, boolean property) throws SQLException;
106
107
/**
108
* Sets whether the designated column's value can be set to
109
* {@code NULL}.
110
* The default is {@code ResultSetMetaData.columnNullableUnknown}
111
*
112
* @param columnIndex the first column is 1, the second is 2, ...
113
* @param property one of the following constants:
114
* {@code ResultSetMetaData.columnNoNulls},
115
* {@code ResultSetMetaData.columnNullable}, or
116
* {@code ResultSetMetaData.columnNullableUnknown}
117
*
118
* @throws SQLException if a database access error occurs
119
*/
120
void setNullable(int columnIndex, int property) throws SQLException;
121
122
/**
123
* Sets whether the designated column is a signed number.
124
* The default is {@code false}.
125
*
126
* @param columnIndex the first column is 1, the second is 2, ...
127
* @param property {@code true} if the column is a signed number;
128
* {@code false} if it is not
129
*
130
* @throws SQLException if a database access error occurs
131
*/
132
void setSigned(int columnIndex, boolean property) throws SQLException;
133
134
/**
135
* Sets the designated column's normal maximum width in chars to the
136
* given {@code int}.
137
*
138
* @param columnIndex the first column is 1, the second is 2, ...
139
* @param size the normal maximum number of characters for
140
* the designated column
141
*
142
* @throws SQLException if a database access error occurs
143
*/
144
void setColumnDisplaySize(int columnIndex, int size) throws SQLException;
145
146
/**
147
* Sets the suggested column title for use in printouts and
148
* displays, if any, to the given {@code String}.
149
*
150
* @param columnIndex the first column is 1, the second is 2, ...
151
* @param label the column title
152
* @throws SQLException if a database access error occurs
153
*/
154
void setColumnLabel(int columnIndex, String label) throws SQLException;
155
156
/**
157
* Sets the name of the designated column to the given {@code String}.
158
*
159
* @param columnIndex the first column is 1, the second is 2, ...
160
* @param columnName the designated column's name
161
* @throws SQLException if a database access error occurs
162
*/
163
void setColumnName(int columnIndex, String columnName) throws SQLException;
164
165
/**
166
* Sets the name of the designated column's table's schema, if any, to
167
* the given {@code String}.
168
*
169
* @param columnIndex the first column is 1, the second is 2, ...
170
* @param schemaName the schema name
171
* @throws SQLException if a database access error occurs
172
*/
173
void setSchemaName(int columnIndex, String schemaName) throws SQLException;
174
175
/**
176
* Sets the designated column's number of decimal digits to the
177
* given {@code int}.
178
*
179
* @param columnIndex the first column is 1, the second is 2, ...
180
* @param precision the total number of decimal digits
181
* @throws SQLException if a database access error occurs
182
*/
183
void setPrecision(int columnIndex, int precision) throws SQLException;
184
185
/**
186
* Sets the designated column's number of digits to the
187
* right of the decimal point to the given {@code int}.
188
*
189
* @param columnIndex the first column is 1, the second is 2, ...
190
* @param scale the number of digits to right of decimal point
191
* @throws SQLException if a database access error occurs
192
*/
193
void setScale(int columnIndex, int scale) throws SQLException;
194
195
/**
196
* Sets the designated column's table name, if any, to the given
197
* {@code String}.
198
*
199
* @param columnIndex the first column is 1, the second is 2, ...
200
* @param tableName the column's table name
201
* @throws SQLException if a database access error occurs
202
*/
203
void setTableName(int columnIndex, String tableName) throws SQLException;
204
205
/**
206
* Sets the designated column's table's catalog name, if any, to the given
207
* {@code String}.
208
*
209
* @param columnIndex the first column is 1, the second is 2, ...
210
* @param catalogName the column's catalog name
211
* @throws SQLException if a database access error occurs
212
*/
213
void setCatalogName(int columnIndex, String catalogName) throws SQLException;
214
215
/**
216
* Sets the designated column's SQL type to the one given.
217
*
218
* @param columnIndex the first column is 1, the second is 2, ...
219
* @param SQLType the column's SQL type
220
* @throws SQLException if a database access error occurs
221
* @see Types
222
*/
223
void setColumnType(int columnIndex, int SQLType) throws SQLException;
224
225
/**
226
* Sets the designated column's type name that is specific to the
227
* data source, if any, to the given {@code String}.
228
*
229
* @param columnIndex the first column is 1, the second is 2, ...
230
* @param typeName data source specific type name.
231
* @throws SQLException if a database access error occurs
232
*/
233
void setColumnTypeName(int columnIndex, String typeName) throws SQLException;
234
235
}
236
237