| 1 21 package net.sf.hajdbc.sql; 22 23 import java.sql.CallableStatement ; 24 import java.sql.Connection ; 25 import java.sql.DatabaseMetaData ; 26 import java.sql.PreparedStatement ; 27 import java.sql.ResultSet ; 28 import java.sql.SQLException ; 29 import java.sql.SQLWarning ; 30 import java.sql.Savepoint ; 31 import java.sql.Statement ; 32 import java.util.Map ; 33 34 39 public class MockConnection implements Connection 40 { 41 44 public Statement createStatement() throws SQLException  45 { 46 return new MockStatement(); 47 } 48 49 52 public PreparedStatement prepareStatement(String arg0) throws SQLException  53 { 54 return null; 55 } 56 57 60 public CallableStatement prepareCall(String arg0) throws SQLException  61 { 62 return null; 63 } 64 65 68 public String nativeSQL(String arg0) throws SQLException  69 { 70 return null; 71 } 72 73 76 public void setAutoCommit(boolean arg0) throws SQLException  77 { 78 } 79 80 83 public boolean getAutoCommit() throws SQLException  84 { 85 return false; 86 } 87 88 91 public void commit() throws SQLException  92 { 93 } 94 95 98 public void rollback() throws SQLException  99 { 100 } 101 102 105 public void close() throws SQLException  106 { 107 } 108 109 112 public boolean isClosed() throws SQLException  113 { 114 return false; 115 } 116 117 120 public DatabaseMetaData getMetaData() throws SQLException  121 { 122 return null; 123 } 124 125 128 public void setReadOnly(boolean arg0) throws SQLException  129 { 130 } 131 132 135 public boolean isReadOnly() throws SQLException  136 { 137 return false; 138 } 139 140 143 public void setCatalog(String arg0) throws SQLException  144 { 145 } 146 147 150 public String getCatalog() throws SQLException  151 { 152 return null; 153 } 154 155 158 public void setTransactionIsolation(int arg0) throws SQLException  159 { 160 } 161 162 165 public int getTransactionIsolation() throws SQLException  166 { 167 return 0; 168 } 169 170 173 public SQLWarning getWarnings() throws SQLException  174 { 175 return null; 176 } 177 178 181 public void clearWarnings() throws SQLException  182 { 183 } 184 185 188 public Statement createStatement(int arg0, int arg1) throws SQLException  189 { 190 return null; 191 } 192 193 196 public PreparedStatement prepareStatement(String arg0, int arg1, int arg2) throws SQLException  197 { 198 return null; 199 } 200 201 204 public CallableStatement prepareCall(String arg0, int arg1, int arg2) throws SQLException  205 { 206 return null; 207 } 208 209 212 public Map getTypeMap() throws SQLException  213 { 214 return null; 215 } 216 217 220 public void setTypeMap(Map arg0) throws SQLException  221 { 222 } 223 224 227 public void setHoldability(int arg0) throws SQLException  228 { 229 } 230 231 234 public int getHoldability() throws SQLException  235 { 236 return 0; 237 } 238 239 242 public Savepoint setSavepoint() throws SQLException  243 { 244 return null; 245 } 246 247 250 public Savepoint setSavepoint(String arg0) throws SQLException  251 { 252 return null; 253 } 254 255 258 public void rollback(Savepoint arg0) throws SQLException  259 { 260 } 261 262 265 public void releaseSavepoint(Savepoint arg0) throws SQLException  266 { 267 } 268 269 272 public Statement createStatement(int arg0, int arg1, int arg2) throws SQLException  273 { 274 return null; 275 } 276 277 280 public PreparedStatement prepareStatement(String arg0, int arg1, int arg2, int arg3) throws SQLException  281 { 282 return null; 283 } 284 285 288 public CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException  289 { 290 return null; 291 } 292 293 296 public PreparedStatement prepareStatement(String arg0, int arg1) throws SQLException  297 { 298 return null; 299 } 300 301 304 public PreparedStatement prepareStatement(String arg0, int[] arg1) throws SQLException  305 { 306 return null; 307 } 308 309 312 public PreparedStatement prepareStatement(String arg0, String [] arg1) throws SQLException  313 { 314 return null; 315 } 316 317 private class MockStatement implements Statement 318 { 319 322 public ResultSet executeQuery(String arg0) throws SQLException  323 { 324 return null; 325 } 326 327 330 public int executeUpdate(String arg0) throws SQLException  331 { 332 return 0; 333 } 334 335 338 public void close() throws SQLException  339 { 340 } 341 342 345 public int getMaxFieldSize() throws SQLException  346 { 347 return 0; 348 } 349 350 353 public void setMaxFieldSize(int arg0) throws SQLException  354 { 355 } 356 357 360 public int getMaxRows() throws SQLException  361 { 362 return 0; 363 } 364 365 368 public void setMaxRows(int arg0) throws SQLException  369 { 370 } 371 372 375 public void setEscapeProcessing(boolean arg0) throws SQLException  376 { 377 } 378 379 382 public int getQueryTimeout() throws SQLException  383 { 384 return 0; 385 } 386 387 390 public void setQueryTimeout(int arg0) throws SQLException  391 { 392 } 393 394 397 public void cancel() throws SQLException  398 { 399 } 400 401 404 public SQLWarning getWarnings() throws SQLException  405 { 406 return null; 407 } 408 409 412 public void clearWarnings() throws SQLException  413 { 414 } 415 416 419 public void setCursorName(String arg0) throws SQLException  420 { 421 } 422 423 426 public boolean execute(String arg0) throws SQLException  427 { 428 return false; 429 } 430 431 434 public ResultSet getResultSet() throws SQLException  435 { 436 return null; 437 } 438 439 442 public int getUpdateCount() throws SQLException  443 { 444 return 0; 445 } 446 447 450 public boolean getMoreResults() throws SQLException  451 { 452 return false; 453 } 454 455 458 public void setFetchDirection(int arg0) throws SQLException  459 { 460 } 461 462 465 public int getFetchDirection() throws SQLException  466 { 467 return 0; 468 } 469 470 473 public void setFetchSize(int arg0) throws SQLException  474 { 475 } 476 477 480 public int getFetchSize() throws SQLException  481 { 482 return 0; 483 } 484 485 488 public int getResultSetConcurrency() throws SQLException  489 { 490 return 0; 491 } 492 493 496 public int getResultSetType() throws SQLException  497 { 498 return 0; 499 } 500 501 504 public void addBatch(String arg0) throws SQLException  505 { 506 } 507 508 511 public void clearBatch() throws SQLException  512 { 513 } 514 515 518 public int[] executeBatch() throws SQLException  519 { 520 return null; 521 } 522 523 526 public Connection getConnection() throws SQLException  527 { 528 return null; 529 } 530 531 534 public boolean getMoreResults(int arg0) throws SQLException  535 { 536 return false; 537 } 538 539 542 public ResultSet getGeneratedKeys() throws SQLException  543 { 544 return null; 545 } 546 547 550 public int executeUpdate(String arg0, int arg1) throws SQLException  551 { 552 return 0; 553 } 554 555 558 public int executeUpdate(String arg0, int[] arg1) throws SQLException  559 { 560 return 0; 561 } 562 563 566 public int executeUpdate(String arg0, String [] arg1) throws SQLException  567 { 568 return 0; 569 } 570 571 574 public boolean execute(String arg0, int arg1) throws SQLException  575 { 576 return false; 577 } 578 579 582 public boolean execute(String arg0, int[] arg1) throws SQLException  583 { 584 return false; 585 } 586 587 590 public boolean execute(String arg0, String [] arg1) throws SQLException  591 { 592 return false; 593 } 594 595 598 public int getResultSetHoldability() throws SQLException  599 { 600 return 0; 601 } 602 } 603 } 604 | Popular Tags |