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 throw new UnsupportedOperationException("Not yet implemented");
236 public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
237 throws SQLException {
238 // TODO Auto-generated method stub
243 public PreparedStatement prepareStatement(String sql, int[] columnIndexes)
244 throws SQLException {
245 // TODO Auto-generated method stub
250 public PreparedStatement prepareStatement(String sql, String[] columnNames)
251 throws SQLException {
252 // TODO Auto-generated method stub
257 public PreparedStatement prepareStatement(String sql, int resultSetType,
258 int resultSetConcurrency) throws SQLException {
259 // TODO Auto-generated method stub
264 public PreparedStatement prepareStatement(String sql, int resultSetType,
265 int resultSetConcurrency, int resultSetHoldability)
266 throws SQLException {
267 // TODO Auto-generated method stub
272 public void releaseSavepoint(Savepoint savepoint) throws SQLException {
273 // TODO Auto-generated method stub
278 public void rollback() throws SQLException {
279 // TODO Auto-generated method stub
284 public void rollback(Savepoint savepoint) throws SQLException {
285 // TODO Auto-generated method stub
290 public void setAutoCommit(boolean autoCommit) throws SQLException {
291 // TODO Auto-generated method stub
296 public void setCatalog(String catalog) throws SQLException {
297 // TODO Auto-generated method stub
302 public void setClientInfo(Properties properties)
303 throws SQLClientInfoException {
304 // TODO Auto-generated method stub
309 public void setClientInfo(String name, String value)
310 throws SQLClientInfoException {
311 // TODO Auto-generated method stub
316 public void setHoldability(int holdability) throws SQLException {
317 // TODO Auto-generated method stub
322 public void setNetworkTimeout(Executor executor, int milliseconds)
323 throws SQLException {
324 // TODO Auto-generated method stub
329 public void setReadOnly(boolean readOnly) throws SQLException {
330 // TODO Auto-generated method stub
335 public Savepoint setSavepoint() throws SQLException {
336 // TODO Auto-generated method stub
341 public Savepoint setSavepoint(String name) throws SQLException {
342 // TODO Auto-generated method stub
347 public void setSchema(String schema) throws SQLException {
348 // TODO Auto-generated method stub
353 public void setTransactionIsolation(int level) throws SQLException {
354 // TODO Auto-generated method stub
359 public void setTypeMap(Map<String, Class<?>> map) throws SQLException {
360 // TODO Auto-generated method stub