1 package net.jaekl.cfb.db.driver;
5 import java.sql.CallableStatement;
7 import java.sql.Connection;
8 import java.sql.DatabaseMetaData;
10 import java.sql.PreparedStatement;
11 import java.sql.SQLClientInfoException;
12 import java.sql.SQLException;
13 import java.sql.SQLWarning;
14 import java.sql.SQLXML;
15 import java.sql.Savepoint;
16 import java.sql.Statement;
17 import java.sql.Struct;
19 import java.util.Properties;
20 import java.util.concurrent.Executor;
22 public class ConnectionMock implements Connection {
25 public boolean isWrapperFor(Class<?> arg0) throws SQLException {
26 // TODO Auto-generated method stub
31 public <T> T unwrap(Class<T> arg0) throws SQLException {
32 // TODO Auto-generated method stub
37 public void abort(Executor executor) throws SQLException {
38 // TODO Auto-generated method stub
43 public void clearWarnings() throws SQLException {
44 // TODO Auto-generated method stub
49 public void close() throws SQLException {
50 // TODO Auto-generated method stub
55 public void commit() throws SQLException {
56 // TODO Auto-generated method stub
61 public Array createArrayOf(String typeName, Object[] elements)
63 // TODO Auto-generated method stub
68 public Blob createBlob() throws SQLException {
69 // TODO Auto-generated method stub
74 public Clob createClob() throws SQLException {
75 // TODO Auto-generated method stub
80 public NClob createNClob() throws SQLException {
81 // TODO Auto-generated method stub
86 public SQLXML createSQLXML() throws SQLException {
87 // TODO Auto-generated method stub
92 public Statement createStatement() throws SQLException {
93 // TODO Auto-generated method stub
98 public Statement createStatement(int resultSetType, int resultSetConcurrency)
100 // TODO Auto-generated method stub
105 public Statement createStatement(int resultSetType,
106 int resultSetConcurrency, int resultSetHoldability)
107 throws SQLException {
108 // TODO Auto-generated method stub
113 public Struct createStruct(String typeName, Object[] attributes)
114 throws SQLException {
115 // TODO Auto-generated method stub
120 public boolean getAutoCommit() throws SQLException {
121 // TODO Auto-generated method stub
126 public String getCatalog() throws SQLException {
127 // TODO Auto-generated method stub
132 public Properties getClientInfo() throws SQLException {
133 // TODO Auto-generated method stub
138 public String getClientInfo(String name) throws SQLException {
139 // TODO Auto-generated method stub
144 public int getHoldability() throws SQLException {
145 // TODO Auto-generated method stub
150 public DatabaseMetaData getMetaData() throws SQLException {
151 DatabaseMetaData result = new DatabaseMetaDataMock();
156 public int getNetworkTimeout() throws SQLException {
157 // TODO Auto-generated method stub
162 public String getSchema() throws SQLException {
163 // TODO Auto-generated method stub
168 public int getTransactionIsolation() throws SQLException {
169 // TODO Auto-generated method stub
174 public Map<String, Class<?>> getTypeMap() throws SQLException {
175 // TODO Auto-generated method stub
180 public SQLWarning getWarnings() throws SQLException {
181 // TODO Auto-generated method stub
186 public boolean isClosed() throws SQLException {
187 // TODO Auto-generated method stub
192 public boolean isReadOnly() throws SQLException {
193 // TODO Auto-generated method stub
198 public boolean isValid(int timeout) throws SQLException {
199 // TODO Auto-generated method stub
204 public String nativeSQL(String sql) throws SQLException {
205 // TODO Auto-generated method stub
210 public CallableStatement prepareCall(String sql) throws SQLException {
211 // TODO Auto-generated method stub
216 public CallableStatement prepareCall(String sql, int resultSetType,
217 int resultSetConcurrency) throws SQLException {
218 // TODO Auto-generated method stub
223 public CallableStatement prepareCall(String sql, int resultSetType,
224 int resultSetConcurrency, int resultSetHoldability)
225 throws SQLException {
226 // TODO Auto-generated method stub
231 public PreparedStatement prepareStatement(String sql) throws SQLException {
232 // TODO Auto-generated method stub
237 public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
238 throws SQLException {
239 // TODO Auto-generated method stub
244 public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
245 throws SQLException {
246 // TODO Auto-generated method stub
251 public PreparedStatement prepareStatement(String sql, String[] columnNames)
252 throws SQLException {
253 // TODO Auto-generated method stub
258 public PreparedStatement prepareStatement(String sql, int resultSetType,
259 int resultSetConcurrency) throws SQLException {
260 // TODO Auto-generated method stub
265 public PreparedStatement prepareStatement(String sql, int resultSetType,
266 int resultSetConcurrency, int resultSetHoldability)
267 throws SQLException {
268 // TODO Auto-generated method stub
273 public void releaseSavepoint(Savepoint savepoint) throws SQLException {
274 // TODO Auto-generated method stub
279 public void rollback() throws SQLException {
280 // TODO Auto-generated method stub
285 public void rollback(Savepoint savepoint) throws SQLException {
286 // TODO Auto-generated method stub
291 public void setAutoCommit(boolean autoCommit) throws SQLException {
292 // TODO Auto-generated method stub
297 public void setCatalog(String catalog) throws SQLException {
298 // TODO Auto-generated method stub
303 public void setClientInfo(Properties properties)
304 throws SQLClientInfoException {
305 // TODO Auto-generated method stub
310 public void setClientInfo(String name, String value)
311 throws SQLClientInfoException {
312 // TODO Auto-generated method stub
317 public void setHoldability(int holdability) throws SQLException {
318 // TODO Auto-generated method stub
323 public void setNetworkTimeout(Executor executor, int milliseconds)
324 throws SQLException {
325 // TODO Auto-generated method stub
330 public void setReadOnly(boolean readOnly) throws SQLException {
331 // TODO Auto-generated method stub
336 public Savepoint setSavepoint() throws SQLException {
337 // TODO Auto-generated method stub
342 public Savepoint setSavepoint(String name) throws SQLException {
343 // TODO Auto-generated method stub
348 public void setSchema(String schema) throws SQLException {
349 // TODO Auto-generated method stub
354 public void setTransactionIsolation(int level) throws SQLException {
355 // TODO Auto-generated method stub
360 public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
361 // TODO Auto-generated method stub