Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/jdk/java/sql/testng/util/StubConnection.java
41152 views
1
/*
2
* Copyright (c) 2014, 2018, 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.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
package util;
24
25
import java.sql.Array;
26
import java.sql.Blob;
27
import java.sql.CallableStatement;
28
import java.sql.Clob;
29
import java.sql.Connection;
30
import java.sql.DatabaseMetaData;
31
import java.sql.NClob;
32
import java.sql.PreparedStatement;
33
import java.sql.SQLClientInfoException;
34
import java.sql.SQLException;
35
import java.sql.SQLWarning;
36
import java.sql.SQLXML;
37
import java.sql.Savepoint;
38
import java.sql.Statement;
39
import java.sql.Struct;
40
import java.util.Map;
41
import java.util.Properties;
42
import java.util.concurrent.Executor;
43
44
public class StubConnection implements Connection {
45
46
private boolean autoCommit = false;
47
48
@Override
49
public Statement createStatement() throws SQLException {
50
throw new UnsupportedOperationException("Not supported yet.");
51
}
52
53
@Override
54
public PreparedStatement prepareStatement(String sql) throws SQLException {
55
throw new UnsupportedOperationException("Not supported yet.");
56
}
57
58
@Override
59
public CallableStatement prepareCall(String sql) throws SQLException {
60
throw new UnsupportedOperationException("Not supported yet.");
61
}
62
63
@Override
64
public String nativeSQL(String sql) throws SQLException {
65
throw new UnsupportedOperationException("Not supported yet.");
66
}
67
68
@Override
69
public void setAutoCommit(boolean autoCommit) throws SQLException {
70
System.out.println("**** in StubConnection.setAutoCommit");
71
this.autoCommit = autoCommit;
72
}
73
74
@Override
75
public boolean getAutoCommit() throws SQLException {
76
System.out.println("*** in StubConnection.getAutoCommit");
77
return autoCommit;
78
}
79
80
@Override
81
public void commit() throws SQLException {
82
throw new UnsupportedOperationException("Not supported yet.");
83
}
84
85
@Override
86
public void rollback() throws SQLException {
87
throw new UnsupportedOperationException("Not supported yet.");
88
}
89
90
@Override
91
public void close() throws SQLException {
92
throw new UnsupportedOperationException("Not supported yet.");
93
}
94
95
@Override
96
public boolean isClosed() throws SQLException {
97
throw new UnsupportedOperationException("Not supported yet.");
98
}
99
100
@Override
101
public DatabaseMetaData getMetaData() throws SQLException {
102
throw new UnsupportedOperationException("Not supported yet.");
103
}
104
105
@Override
106
public void setReadOnly(boolean readOnly) throws SQLException {
107
throw new UnsupportedOperationException("Not supported yet.");
108
}
109
110
@Override
111
public boolean isReadOnly() throws SQLException {
112
throw new UnsupportedOperationException("Not supported yet.");
113
}
114
115
@Override
116
public void setCatalog(String catalog) throws SQLException {
117
throw new UnsupportedOperationException("Not supported yet.");
118
}
119
120
@Override
121
public String getCatalog() throws SQLException {
122
throw new UnsupportedOperationException("Not supported yet.");
123
}
124
125
@Override
126
public void setTransactionIsolation(int level) throws SQLException {
127
throw new UnsupportedOperationException("Not supported yet.");
128
}
129
130
@Override
131
public int getTransactionIsolation() throws SQLException {
132
throw new UnsupportedOperationException("Not supported yet.");
133
}
134
135
@Override
136
public SQLWarning getWarnings() throws SQLException {
137
throw new UnsupportedOperationException("Not supported yet.");
138
}
139
140
@Override
141
public void clearWarnings() throws SQLException {
142
throw new UnsupportedOperationException("Not supported yet.");
143
}
144
145
@Override
146
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
147
throw new UnsupportedOperationException("Not supported yet.");
148
}
149
150
@Override
151
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
152
throw new UnsupportedOperationException("Not supported yet.");
153
}
154
155
@Override
156
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
157
throw new UnsupportedOperationException("Not supported yet.");
158
}
159
160
@Override
161
public Map<String, Class<?>> getTypeMap() throws SQLException {
162
throw new UnsupportedOperationException("Not supported yet.");
163
}
164
165
@Override
166
public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
167
throw new UnsupportedOperationException("Not supported yet.");
168
}
169
170
@Override
171
public void setHoldability(int holdability) throws SQLException {
172
throw new UnsupportedOperationException("Not supported yet.");
173
}
174
175
@Override
176
public int getHoldability() throws SQLException {
177
throw new UnsupportedOperationException("Not supported yet.");
178
}
179
180
@Override
181
public Savepoint setSavepoint() throws SQLException {
182
throw new UnsupportedOperationException("Not supported yet.");
183
}
184
185
@Override
186
public Savepoint setSavepoint(String name) throws SQLException {
187
throw new UnsupportedOperationException("Not supported yet.");
188
}
189
190
@Override
191
public void rollback(Savepoint savepoint) throws SQLException {
192
throw new UnsupportedOperationException("Not supported yet.");
193
}
194
195
@Override
196
public void releaseSavepoint(Savepoint savepoint) throws SQLException {
197
throw new UnsupportedOperationException("Not supported yet.");
198
}
199
200
@Override
201
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
202
throw new UnsupportedOperationException("Not supported yet.");
203
}
204
205
@Override
206
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
207
throw new UnsupportedOperationException("Not supported yet.");
208
}
209
210
@Override
211
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
212
throw new UnsupportedOperationException("Not supported yet.");
213
}
214
215
@Override
216
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
217
throw new UnsupportedOperationException("Not supported yet.");
218
}
219
220
@Override
221
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
222
throw new UnsupportedOperationException("Not supported yet.");
223
}
224
225
@Override
226
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
227
throw new UnsupportedOperationException("Not supported yet.");
228
}
229
230
@Override
231
public Clob createClob() throws SQLException {
232
throw new UnsupportedOperationException("Not supported yet.");
233
}
234
235
@Override
236
public Blob createBlob() throws SQLException {
237
throw new UnsupportedOperationException("Not supported yet.");
238
}
239
240
@Override
241
public NClob createNClob() throws SQLException {
242
throw new UnsupportedOperationException("Not supported yet.");
243
}
244
245
@Override
246
public SQLXML createSQLXML() throws SQLException {
247
throw new UnsupportedOperationException("Not supported yet.");
248
}
249
250
@Override
251
public boolean isValid(int timeout) throws SQLException {
252
throw new UnsupportedOperationException("Not supported yet.");
253
}
254
255
@Override
256
public void setClientInfo(String name, String value) throws SQLClientInfoException {
257
throw new UnsupportedOperationException("Not supported yet.");
258
}
259
260
@Override
261
public void setClientInfo(Properties properties) throws SQLClientInfoException {
262
throw new UnsupportedOperationException("Not supported yet.");
263
}
264
265
@Override
266
public String getClientInfo(String name) throws SQLException {
267
throw new UnsupportedOperationException("Not supported yet.");
268
}
269
270
@Override
271
public Properties getClientInfo() throws SQLException {
272
throw new UnsupportedOperationException("Not supported yet.");
273
}
274
275
@Override
276
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
277
throw new UnsupportedOperationException("Not supported yet.");
278
}
279
280
@Override
281
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
282
throw new UnsupportedOperationException("Not supported yet.");
283
}
284
285
@Override
286
public void setSchema(String schema) throws SQLException {
287
throw new UnsupportedOperationException("Not supported yet.");
288
}
289
290
@Override
291
public String getSchema() throws SQLException {
292
throw new UnsupportedOperationException("Not supported yet.");
293
}
294
295
@Override
296
public void abort(Executor executor) throws SQLException {
297
throw new UnsupportedOperationException("Not supported yet.");
298
}
299
300
@Override
301
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
302
throw new UnsupportedOperationException("Not supported yet.");
303
}
304
305
@Override
306
public int getNetworkTimeout() throws SQLException {
307
throw new UnsupportedOperationException("Not supported yet.");
308
}
309
310
@Override
311
public <T> T unwrap(Class<T> iface) throws SQLException {
312
throw new UnsupportedOperationException("Not supported yet.");
313
}
314
315
@Override
316
public boolean isWrapperFor(Class<?> iface) throws SQLException {
317
throw new UnsupportedOperationException("Not supported yet.");
318
}
319
}
320
321