Fix config files to remove outdated configuration for hibernate
[policy/models.git] / models-provider / src / test / java / org / onap / policy / models / provider / impl / DummyConnection.java
1 /*-
2  * ============LICENSE_START=======================================================
3  *  Copyright (C) 2019 Nordix Foundation.
4  * ================================================================================
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.policy.models.provider.impl;
22
23 import java.sql.Array;
24 import java.sql.Blob;
25 import java.sql.CallableStatement;
26 import java.sql.Clob;
27 import java.sql.Connection;
28 import java.sql.DatabaseMetaData;
29 import java.sql.NClob;
30 import java.sql.PreparedStatement;
31 import java.sql.SQLClientInfoException;
32 import java.sql.SQLException;
33 import java.sql.SQLWarning;
34 import java.sql.SQLXML;
35 import java.sql.Savepoint;
36 import java.sql.Statement;
37 import java.sql.Struct;
38 import java.util.Map;
39 import java.util.Properties;
40 import java.util.concurrent.Executor;
41
42 /**
43  * Dummy database connection.
44  *
45  * @author Liam Fallon (liam.fallon@est.tech)
46  */
47 public class DummyConnection implements Connection {
48
49     @Override
50     public boolean isWrapperFor(Class<?> iface) throws SQLException {
51         return false;
52     }
53
54     @Override
55     public <T> T unwrap(Class<T> iface) throws SQLException {
56         return null;
57     }
58
59     @Override
60     public void abort(Executor executor) throws SQLException {
61         return;
62     }
63
64     @Override
65     public void clearWarnings() throws SQLException {
66         return;
67     }
68
69     @Override
70     public void close() throws SQLException {
71         throw new SQLException("Bad Request");
72     }
73
74     @Override
75     public void commit() throws SQLException {
76         return;
77     }
78
79     @Override
80     public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
81         return null;
82     }
83
84     @Override
85     public Blob createBlob() throws SQLException {
86         return null;
87     }
88
89     @Override
90     public Clob createClob() throws SQLException {
91         return null;
92     }
93
94     @Override
95     public NClob createNClob() throws SQLException {
96         return null;
97     }
98
99     @Override
100     public SQLXML createSQLXML() throws SQLException {
101         return null;
102     }
103
104     @Override
105     public Statement createStatement() throws SQLException {
106         return null;
107     }
108
109     @Override
110     public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
111         return null;
112     }
113
114     @Override
115     public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
116             throws SQLException {
117         return null;
118     }
119
120     @Override
121     public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
122         return null;
123     }
124
125     @Override
126     public boolean getAutoCommit() throws SQLException {
127         return false;
128     }
129
130     @Override
131     public String getCatalog() throws SQLException {
132         return null;
133     }
134
135     @Override
136     public Properties getClientInfo() throws SQLException {
137         return null;
138     }
139
140     @Override
141     public String getClientInfo(String name) throws SQLException {
142         return null;
143     }
144
145     @Override
146     public int getHoldability() throws SQLException {
147         return 0;
148     }
149
150     @Override
151     public DatabaseMetaData getMetaData() throws SQLException {
152         return null;
153     }
154
155     @Override
156     public int getNetworkTimeout() throws SQLException {
157         return 0;
158     }
159
160     @Override
161     public String getSchema() throws SQLException {
162         return null;
163     }
164
165     @Override
166     public int getTransactionIsolation() throws SQLException {
167         return 0;
168     }
169
170     @Override
171     public Map<String, Class<?>> getTypeMap() throws SQLException {
172         return null;
173     }
174
175     @Override
176     public SQLWarning getWarnings() throws SQLException {
177         return null;
178     }
179
180     @Override
181     public boolean isClosed() throws SQLException {
182         return false;
183     }
184
185     @Override
186     public boolean isReadOnly() throws SQLException {
187         return false;
188     }
189
190     @Override
191     public boolean isValid(int timeout) throws SQLException {
192         return false;
193     }
194
195     @Override
196     public String nativeSQL(String sql) throws SQLException {
197         return null;
198     }
199
200     @Override
201     public CallableStatement prepareCall(String sql) throws SQLException {
202         return null;
203     }
204
205     @Override
206     public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
207         return null;
208     }
209
210     @Override
211     public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency,
212             int resultSetHoldability) throws SQLException {
213         return null;
214     }
215
216     @Override
217     public PreparedStatement prepareStatement(String sql) throws SQLException {
218         return null;
219     }
220
221     @Override
222     public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
223         return null;
224     }
225
226     @Override
227     public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
228         return null;
229     }
230
231     @Override
232     public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
233         return null;
234     }
235
236     @Override
237     public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
238             throws SQLException {
239         return null;
240     }
241
242     @Override
243     public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency,
244             int resultSetHoldability) throws SQLException {
245         return null;
246     }
247
248     @Override
249     public void releaseSavepoint(Savepoint savepoint) throws SQLException {
250         return;
251     }
252
253     @Override
254     public void rollback() throws SQLException {
255         return;
256     }
257
258     @Override
259     public void rollback(Savepoint savepoint) throws SQLException {
260         return;
261     }
262
263     @Override
264     public void setAutoCommit(boolean autoCommit) throws SQLException {
265         return;
266     }
267
268     @Override
269     public void setCatalog(String catalog) throws SQLException {
270         return;
271     }
272
273     @Override
274     public void setClientInfo(Properties properties) throws SQLClientInfoException {
275         return;
276     }
277
278     @Override
279     public void setClientInfo(String name, String value) throws SQLClientInfoException {
280         return;
281     }
282
283     @Override
284     public void setHoldability(int holdability) throws SQLException {
285         return;
286     }
287
288     @Override
289     public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
290         return;
291     }
292
293     @Override
294     public void setReadOnly(boolean readOnly) throws SQLException {
295         return;
296     }
297
298     @Override
299     public Savepoint setSavepoint() throws SQLException {
300         return null;
301     }
302
303     @Override
304     public Savepoint setSavepoint(String name) throws SQLException {
305         return null;
306     }
307
308     @Override
309     public void setSchema(String schema) throws SQLException {
310         return;
311     }
312
313     @Override
314     public void setTransactionIsolation(int level) throws SQLException {
315         return;
316     }
317
318     @Override
319     public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
320         return;
321     }
322 }