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 / FakeStatement.java @ 47779
History | View | Annotate | Download (5.68 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2020 gvSIG Association.
|
5 |
*
|
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 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.fmap.dal.store.jdbc2.spi; |
25 |
|
26 |
import java.sql.Connection; |
27 |
import java.sql.ResultSet; |
28 |
import java.sql.SQLException; |
29 |
import java.sql.SQLWarning; |
30 |
import java.sql.Statement; |
31 |
|
32 |
/**
|
33 |
*
|
34 |
* @author gvSIG Team
|
35 |
*/
|
36 |
public class FakeStatement implements Statement { |
37 |
|
38 |
private final Connection connection; |
39 |
|
40 |
public FakeStatement(Connection connection) { |
41 |
this.connection = connection;
|
42 |
} |
43 |
|
44 |
@Override
|
45 |
public ResultSet executeQuery(String sql) throws SQLException { |
46 |
return null; |
47 |
} |
48 |
|
49 |
@Override
|
50 |
public int executeUpdate(String sql) throws SQLException { |
51 |
return -1; |
52 |
} |
53 |
|
54 |
@Override
|
55 |
public void close() throws SQLException { |
56 |
|
57 |
} |
58 |
|
59 |
@Override
|
60 |
public int getMaxFieldSize() throws SQLException { |
61 |
return -1; |
62 |
} |
63 |
|
64 |
@Override
|
65 |
public void setMaxFieldSize(int max) throws SQLException { |
66 |
|
67 |
} |
68 |
|
69 |
@Override
|
70 |
public int getMaxRows() throws SQLException { |
71 |
return -1; |
72 |
} |
73 |
|
74 |
@Override
|
75 |
public void setMaxRows(int max) throws SQLException { |
76 |
|
77 |
} |
78 |
|
79 |
@Override
|
80 |
public void setEscapeProcessing(boolean enable) throws SQLException { |
81 |
|
82 |
} |
83 |
|
84 |
@Override
|
85 |
public int getQueryTimeout() throws SQLException { |
86 |
return -1; |
87 |
} |
88 |
|
89 |
@Override
|
90 |
public void setQueryTimeout(int seconds) throws SQLException { |
91 |
|
92 |
} |
93 |
|
94 |
@Override
|
95 |
public void cancel() throws SQLException { |
96 |
|
97 |
} |
98 |
|
99 |
@Override
|
100 |
public SQLWarning getWarnings() throws SQLException { |
101 |
return null; |
102 |
} |
103 |
|
104 |
@Override
|
105 |
public void clearWarnings() throws SQLException { |
106 |
|
107 |
} |
108 |
|
109 |
@Override
|
110 |
public void setCursorName(String name) throws SQLException { |
111 |
|
112 |
} |
113 |
|
114 |
@Override
|
115 |
public boolean execute(String sql) throws SQLException { |
116 |
return false; |
117 |
} |
118 |
|
119 |
@Override
|
120 |
public ResultSet getResultSet() throws SQLException { |
121 |
return null; |
122 |
} |
123 |
|
124 |
@Override
|
125 |
public int getUpdateCount() throws SQLException { |
126 |
return -1; |
127 |
} |
128 |
|
129 |
@Override
|
130 |
public boolean getMoreResults() throws SQLException { |
131 |
return false; |
132 |
} |
133 |
|
134 |
@Override
|
135 |
public void setFetchDirection(int direction) throws SQLException { |
136 |
|
137 |
} |
138 |
|
139 |
@Override
|
140 |
public int getFetchDirection() throws SQLException { |
141 |
return -1; |
142 |
} |
143 |
|
144 |
@Override
|
145 |
public void setFetchSize(int rows) throws SQLException { |
146 |
|
147 |
} |
148 |
|
149 |
@Override
|
150 |
public int getFetchSize() throws SQLException { |
151 |
return -1; |
152 |
} |
153 |
|
154 |
@Override
|
155 |
public int getResultSetConcurrency() throws SQLException { |
156 |
return -1; |
157 |
} |
158 |
|
159 |
@Override
|
160 |
public int getResultSetType() throws SQLException { |
161 |
return -1; |
162 |
} |
163 |
|
164 |
@Override
|
165 |
public void addBatch(String sql) throws SQLException { |
166 |
|
167 |
} |
168 |
|
169 |
@Override
|
170 |
public void clearBatch() throws SQLException { |
171 |
|
172 |
} |
173 |
|
174 |
@Override
|
175 |
public int[] executeBatch() throws SQLException { |
176 |
return null; |
177 |
} |
178 |
|
179 |
@Override
|
180 |
public Connection getConnection() throws SQLException { |
181 |
return this.connection; |
182 |
} |
183 |
|
184 |
@Override
|
185 |
public boolean getMoreResults(int current) throws SQLException { |
186 |
return false; |
187 |
} |
188 |
|
189 |
@Override
|
190 |
public ResultSet getGeneratedKeys() throws SQLException { |
191 |
return null; |
192 |
} |
193 |
|
194 |
@Override
|
195 |
public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException { |
196 |
return -1; |
197 |
} |
198 |
|
199 |
@Override
|
200 |
public int executeUpdate(String sql, int[] columnIndexes) throws SQLException { |
201 |
return -1; |
202 |
} |
203 |
|
204 |
@Override
|
205 |
public int executeUpdate(String sql, String[] columnNames) throws SQLException { |
206 |
return -1; |
207 |
} |
208 |
|
209 |
@Override
|
210 |
public boolean execute(String sql, int autoGeneratedKeys) throws SQLException { |
211 |
return false; |
212 |
} |
213 |
|
214 |
@Override
|
215 |
public boolean execute(String sql, int[] columnIndexes) throws SQLException { |
216 |
return false; |
217 |
} |
218 |
|
219 |
@Override
|
220 |
public boolean execute(String sql, String[] columnNames) throws SQLException { |
221 |
return false; |
222 |
} |
223 |
|
224 |
@Override
|
225 |
public int getResultSetHoldability() throws SQLException { |
226 |
return -1; |
227 |
} |
228 |
|
229 |
@Override
|
230 |
public boolean isClosed() throws SQLException { |
231 |
return false; |
232 |
} |
233 |
|
234 |
@Override
|
235 |
public void setPoolable(boolean poolable) throws SQLException { |
236 |
|
237 |
} |
238 |
|
239 |
@Override
|
240 |
public boolean isPoolable() throws SQLException { |
241 |
return false; |
242 |
} |
243 |
|
244 |
@Override
|
245 |
public void closeOnCompletion() throws SQLException { |
246 |
|
247 |
} |
248 |
|
249 |
@Override
|
250 |
public boolean isCloseOnCompletion() throws SQLException { |
251 |
return false; |
252 |
} |
253 |
|
254 |
@Override
|
255 |
public <T> T unwrap(Class<T> iface) throws SQLException { |
256 |
return null; |
257 |
} |
258 |
|
259 |
@Override
|
260 |
public boolean isWrapperFor(Class<?> iface) throws SQLException { |
261 |
return false; |
262 |
} |
263 |
|
264 |
} |