1 package net.sourceforge.jdbclogger.core; 2 18 import java.sql.Connection ; 19 import java.sql.Driver ; 20 import java.sql.DriverPropertyInfo ; 21 import java.sql.SQLException ; 22 import java.util.ArrayList ; 23 import java.util.List ; 24 import java.util.Properties ; 25 26 30 public abstract class AbstractWrapperDriver implements Driver 31 { 32 protected Driver _driver; 33 protected List formatters; 34 35 public AbstractWrapperDriver() 36 { 37 formatters = new ArrayList (); 38 } 39 40 public Driver getDriver() 41 { 42 return _driver; 43 } 44 45 public void setDriver(Driver driver) 46 { 47 _driver = driver; 48 } 49 50 public boolean acceptsURL(String s) throws SQLException 51 { 52 return _driver.acceptsURL(s); 53 } 54 55 public int getMajorVersion() 56 { 57 return _driver.getMajorVersion(); 58 } 59 60 public int getMinorVersion() 61 { 62 return _driver.getMinorVersion(); 63 } 64 65 public DriverPropertyInfo [] getPropertyInfo(String s, Properties properties) throws SQLException 66 { 67 return _driver.getPropertyInfo(s, properties); 68 } 69 70 public boolean jdbcCompliant() 71 { 72 return _driver.jdbcCompliant(); 73 } 74 75 public abstract Connection connect(String s, Properties properties) throws SQLException ; 76 77 80 public List getFormatters() { 81 return formatters; 82 } 83 84 87 public void setFormatters(List formatters) { 88 this.formatters = formatters; 89 } 90 } 91 | Popular Tags |