1 22 package org.jboss.test.jca.jdbc; 23 24 import java.sql.Connection ; 25 import java.sql.SQLException ; 26 import java.sql.Statement ; 27 import java.sql.PreparedStatement ; 28 import java.sql.CallableStatement ; 29 import java.sql.DatabaseMetaData ; 30 import java.util.Map ; 31 import java.sql.SQLWarning ; 32 import java.sql.Savepoint ; 33 34 35 44 45 public class TestConnection implements Connection { 46 47 private TestDriver driver; 48 49 private boolean autocommit; 50 51 private boolean closed; 52 53 public TestConnection(TestDriver driver) 54 { 55 this.driver = driver; 56 } 57 58 public void setFail(boolean fail) 59 { 60 driver.setFail(fail); 61 } 62 63 public int getClosedCount() 64 { 65 return driver.getClosedCount(); 66 } 67 68 70 public Statement createStatement(int n, int n1, int n2) throws SQLException { 71 return null; 72 } 73 74 public void clearWarnings() 75 { 76 } 77 78 public void close() 79 { 80 closed = true; 81 driver.connectionClosed(); 82 } 83 84 public void commit() 85 { 86 } 87 88 public Statement createStatement() throws SQLException 89 { 90 return new TestStatement(driver); 91 } 92 93 public Statement createStatement(int rst, int rsc) throws SQLException 94 { 95 return null; 96 } 97 98 public boolean getAutoCommit() 99 { 100 return autocommit; 101 } 102 103 public void setAutoCommit(boolean autocommit) 104 { 105 this.autocommit = autocommit; 106 } 107 108 public String getCatalog() 109 { 110 return null; 111 } 112 113 public DatabaseMetaData getMetaData() 114 { 115 return null; 116 } 117 118 public int getTransactionIsolation() 119 { 120 return 0; 121 } 122 123 public Map getTypeMap() 124 { 125 return null; 126 } 127 128 public SQLWarning getWarnings() 129 { 130 return null; 131 } 132 133 public boolean isClosed() 134 { 135 return closed; 136 } 137 138 public boolean isReadOnly() 139 { 140 return false; 141 } 142 143 public String nativeSQL(String sql) 144 { 145 return sql; 146 } 147 148 public CallableStatement prepareCall(String sql) 149 { 150 return null; 151 } 152 153 public CallableStatement prepareCall(String sql, int rst) 154 { 155 return null; 156 } 157 158 public CallableStatement prepareCall(String sql, int[] rst) 159 { 160 return null; 161 } 162 163 public CallableStatement prepareCall(String sql, int rst, int rsc) 164 { 165 return null; 166 } 167 168 public CallableStatement prepareCall(String sql, String [] rst) 169 { 170 return null; 171 } 172 173 public CallableStatement prepareCall(String sql, int rst, int rsc, int i) 174 { 175 return null; 176 } 177 178 public PreparedStatement prepareStatement(String sql) 179 { 180 return new TestPreparedStatement(driver); 181 } 182 183 public PreparedStatement prepareStatement(String sql, int rst, int rsc) 184 { 185 return new TestPreparedStatement(driver); 186 } 187 188 public PreparedStatement prepareStatement(String sql, int rst) 189 { 190 return null; 191 } 192 193 public PreparedStatement prepareStatement(String sql, int[] rst) 194 { 195 return null; 196 } 197 198 public PreparedStatement prepareStatement(String sql, String [] rst) 199 { 200 return null; 201 } 202 203 public PreparedStatement prepareStatement(String sql, int rst, int rsc, int i) 204 { 205 return null; 206 } 207 208 public void rollback() 209 { 210 } 211 212 public void setCatalog(String cat) 213 { 214 } 215 216 public void setReadOnly(boolean r0) 217 { 218 } 219 220 public void setTransactionIsolation(int level) 221 { 222 } 223 224 public void setTypeMap(Map map) 225 { 226 } 227 228 public void setHoldability(int h) 229 { 230 } 231 232 public int getHoldability() 233 { 234 return 0; 235 } 236 237 public Savepoint setSavepoint() 238 { 239 return null; 240 } 241 242 public Savepoint setSavepoint(String name) 243 { 244 return null; 245 } 246 247 public void rollback(Savepoint s) 248 { 249 } 250 public void commit(Savepoint s) 251 { 252 } 253 254 public void releaseSavepoint(Savepoint s) 255 { 256 } 257 258 } | Popular Tags |