svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.dal / org.gvsig.fmap.dal.db / org.gvsig.fmap.dal.db.jdbc / src / main / java / org / gvsig / fmap / dal / store / jdbc2 / spi / FakeConnection.java @ 47779
History | View | Annotate | Download (7.83 KB)
1 | 45066 | jjdelcerro | /*
|
---|---|---|---|
2 | 45065 | jjdelcerro | * gvSIG. Desktop Geographic Information System.
|
3 | 45063 | jjdelcerro | *
|
4 | 45065 | jjdelcerro | * Copyright (C) 2007-2020 gvSIG Association.
|
5 | 45063 | jjdelcerro | *
|
6 | * This program is free software; you can redistribute it and/or
|
||
7 | * modify it under the terms of the GNU General Public License
|
||
8 | * as published by the Free Software Foundation; either version 3
|
||
9 | * of the License, or (at your option) any later version.
|
||
10 | *
|
||
11 | * This program is distributed in the hope that it will be useful,
|
||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
14 | * GNU General Public License for more details.
|
||
15 | *
|
||
16 | * You should have received a copy of the GNU General Public License
|
||
17 | * along with this program; if not, write to the Free Software
|
||
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
19 | * MA 02110-1301, USA.
|
||
20 | *
|
||
21 | 45065 | jjdelcerro | * For any additional information, do not hesitate to contact us
|
22 | * at info AT gvsig.com, or visit our website www.gvsig.com.
|
||
23 | 45063 | jjdelcerro | */
|
24 | package org.gvsig.fmap.dal.store.jdbc2.spi; |
||
25 | |||
26 | import java.sql.Array; |
||
27 | import java.sql.Blob; |
||
28 | import java.sql.CallableStatement; |
||
29 | import java.sql.Clob; |
||
30 | import java.sql.Connection; |
||
31 | import java.sql.DatabaseMetaData; |
||
32 | import java.sql.NClob; |
||
33 | import java.sql.PreparedStatement; |
||
34 | import java.sql.ResultSet; |
||
35 | import java.sql.SQLClientInfoException; |
||
36 | import java.sql.SQLException; |
||
37 | import java.sql.SQLWarning; |
||
38 | import java.sql.SQLXML; |
||
39 | import java.sql.Savepoint; |
||
40 | import java.sql.Statement; |
||
41 | import java.sql.Struct; |
||
42 | import java.util.Map; |
||
43 | import java.util.Properties; |
||
44 | import java.util.concurrent.Executor; |
||
45 | |||
46 | /**
|
||
47 | *
|
||
48 | * @author gvSIG Team
|
||
49 | */
|
||
50 | public class FakeConnection implements Connection { |
||
51 | |||
52 | public FakeConnection() {
|
||
53 | |||
54 | } |
||
55 | |||
56 | @Override
|
||
57 | public Statement createStatement() throws SQLException { |
||
58 | return new FakeStatement(this); |
||
59 | } |
||
60 | |||
61 | @Override
|
||
62 | public PreparedStatement prepareStatement(String sql) throws SQLException { |
||
63 | return new FakePreparedStatement(this); |
||
64 | } |
||
65 | |||
66 | @Override
|
||
67 | public CallableStatement prepareCall(String sql) throws SQLException { |
||
68 | return null; |
||
69 | } |
||
70 | |||
71 | @Override
|
||
72 | public String nativeSQL(String sql) throws SQLException { |
||
73 | return null; |
||
74 | } |
||
75 | |||
76 | @Override
|
||
77 | public void setAutoCommit(boolean autoCommit) throws SQLException { |
||
78 | |||
79 | } |
||
80 | |||
81 | @Override
|
||
82 | public boolean getAutoCommit() throws SQLException { |
||
83 | return false; |
||
84 | } |
||
85 | |||
86 | @Override
|
||
87 | public void commit() throws SQLException { |
||
88 | |||
89 | } |
||
90 | |||
91 | @Override
|
||
92 | public void rollback() throws SQLException { |
||
93 | |||
94 | } |
||
95 | |||
96 | @Override
|
||
97 | public void close() throws SQLException { |
||
98 | |||
99 | } |
||
100 | |||
101 | @Override
|
||
102 | public boolean isClosed() throws SQLException { |
||
103 | return false; |
||
104 | } |
||
105 | |||
106 | @Override
|
||
107 | public DatabaseMetaData getMetaData() throws SQLException { |
||
108 | return null; |
||
109 | } |
||
110 | |||
111 | @Override
|
||
112 | public void setReadOnly(boolean readOnly) throws SQLException { |
||
113 | |||
114 | } |
||
115 | |||
116 | @Override
|
||
117 | public boolean isReadOnly() throws SQLException { |
||
118 | return false; |
||
119 | } |
||
120 | |||
121 | @Override
|
||
122 | public void setCatalog(String catalog) throws SQLException { |
||
123 | |||
124 | } |
||
125 | |||
126 | @Override
|
||
127 | public String getCatalog() throws SQLException { |
||
128 | return null; |
||
129 | } |
||
130 | |||
131 | @Override
|
||
132 | public void setTransactionIsolation(int level) throws SQLException { |
||
133 | |||
134 | } |
||
135 | |||
136 | @Override
|
||
137 | public int getTransactionIsolation() throws SQLException { |
||
138 | return Connection.TRANSACTION_SERIALIZABLE; |
||
139 | } |
||
140 | |||
141 | @Override
|
||
142 | public SQLWarning getWarnings() throws SQLException { |
||
143 | return null; |
||
144 | } |
||
145 | |||
146 | @Override
|
||
147 | public void clearWarnings() throws SQLException { |
||
148 | |||
149 | } |
||
150 | |||
151 | @Override
|
||
152 | public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException { |
||
153 | return new FakeStatement(this); |
||
154 | } |
||
155 | |||
156 | @Override
|
||
157 | public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { |
||
158 | return new FakePreparedStatement(this); |
||
159 | } |
||
160 | |||
161 | @Override
|
||
162 | public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { |
||
163 | return null; |
||
164 | } |
||
165 | |||
166 | @Override
|
||
167 | public Map<String, Class<?>> getTypeMap() throws SQLException { |
||
168 | return null; |
||
169 | } |
||
170 | |||
171 | @Override
|
||
172 | public void setTypeMap(Map<String, Class<?>> map) throws SQLException { |
||
173 | |||
174 | } |
||
175 | |||
176 | @Override
|
||
177 | public void setHoldability(int holdability) throws SQLException { |
||
178 | |||
179 | } |
||
180 | |||
181 | @Override
|
||
182 | public int getHoldability() throws SQLException { |
||
183 | return ResultSet.CLOSE_CURSORS_AT_COMMIT; |
||
184 | } |
||
185 | |||
186 | @Override
|
||
187 | public Savepoint setSavepoint() throws SQLException { |
||
188 | return null; |
||
189 | } |
||
190 | |||
191 | @Override
|
||
192 | public Savepoint setSavepoint(String name) throws SQLException { |
||
193 | return null; |
||
194 | } |
||
195 | |||
196 | @Override
|
||
197 | public void rollback(Savepoint savepoint) throws SQLException { |
||
198 | |||
199 | } |
||
200 | |||
201 | @Override
|
||
202 | public void releaseSavepoint(Savepoint savepoint) throws SQLException { |
||
203 | |||
204 | } |
||
205 | |||
206 | @Override
|
||
207 | public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { |
||
208 | return new FakeStatement(this); |
||
209 | } |
||
210 | |||
211 | @Override
|
||
212 | public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { |
||
213 | return new FakePreparedStatement(this); |
||
214 | } |
||
215 | |||
216 | @Override
|
||
217 | public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException { |
||
218 | return null; |
||
219 | } |
||
220 | |||
221 | @Override
|
||
222 | public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException { |
||
223 | return new FakePreparedStatement(this); |
||
224 | } |
||
225 | |||
226 | @Override
|
||
227 | public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException { |
||
228 | return new FakePreparedStatement(this); |
||
229 | } |
||
230 | |||
231 | @Override
|
||
232 | public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException { |
||
233 | return new FakePreparedStatement(this); |
||
234 | } |
||
235 | |||
236 | @Override
|
||
237 | public Clob createClob() throws SQLException { |
||
238 | return null; |
||
239 | } |
||
240 | |||
241 | @Override
|
||
242 | public Blob createBlob() throws SQLException { |
||
243 | return null; |
||
244 | } |
||
245 | |||
246 | @Override
|
||
247 | public NClob createNClob() throws SQLException { |
||
248 | return null; |
||
249 | } |
||
250 | |||
251 | @Override
|
||
252 | public SQLXML createSQLXML() throws SQLException { |
||
253 | return null; |
||
254 | } |
||
255 | |||
256 | @Override
|
||
257 | public boolean isValid(int timeout) throws SQLException { |
||
258 | return false; |
||
259 | } |
||
260 | |||
261 | @Override
|
||
262 | public void setClientInfo(String name, String value) throws SQLClientInfoException { |
||
263 | |||
264 | } |
||
265 | |||
266 | @Override
|
||
267 | public void setClientInfo(Properties properties) throws SQLClientInfoException { |
||
268 | |||
269 | } |
||
270 | |||
271 | @Override
|
||
272 | public String getClientInfo(String name) throws SQLException { |
||
273 | return null; |
||
274 | } |
||
275 | |||
276 | @Override
|
||
277 | public Properties getClientInfo() throws SQLException { |
||
278 | return null; |
||
279 | } |
||
280 | |||
281 | @Override
|
||
282 | public Array createArrayOf(String typeName, Object[] elements) throws SQLException { |
||
283 | return null; |
||
284 | } |
||
285 | |||
286 | @Override
|
||
287 | public Struct createStruct(String typeName, Object[] attributes) throws SQLException { |
||
288 | return null; |
||
289 | } |
||
290 | |||
291 | @Override
|
||
292 | public void setSchema(String schema) throws SQLException { |
||
293 | |||
294 | } |
||
295 | |||
296 | @Override
|
||
297 | public String getSchema() throws SQLException { |
||
298 | return null; |
||
299 | } |
||
300 | |||
301 | @Override
|
||
302 | public void abort(Executor executor) throws SQLException { |
||
303 | |||
304 | } |
||
305 | |||
306 | @Override
|
||
307 | public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException { |
||
308 | |||
309 | } |
||
310 | |||
311 | @Override
|
||
312 | public int getNetworkTimeout() throws SQLException { |
||
313 | return 0; |
||
314 | } |
||
315 | |||
316 | @Override
|
||
317 | public <T> T unwrap(Class<T> iface) throws SQLException { |
||
318 | return null; |
||
319 | } |
||
320 | |||
321 | @Override
|
||
322 | public boolean isWrapperFor(Class<?> iface) throws SQLException { |
||
323 | return false; |
||
324 | } |
||
325 | |||
326 | } |