1 21 package net.sf.hajdbc.sql; 22 23 import java.sql.Connection ; 24 import java.sql.Driver ; 25 import java.sql.DriverPropertyInfo ; 26 import java.sql.SQLException ; 27 import java.util.Properties ; 28 29 34 public class MockDriver implements Driver 35 { 36 39 public Connection connect(String url, Properties properties) throws SQLException 40 { 41 return new MockConnection(); 42 } 43 44 47 public boolean acceptsURL(String url) throws SQLException 48 { 49 return url.startsWith("jdbc:mock:"); 50 } 51 52 55 public DriverPropertyInfo [] getPropertyInfo(String url, Properties properties) throws SQLException 56 { 57 return new DriverPropertyInfo [0]; 58 } 59 60 63 public int getMajorVersion() 64 { 65 return 0; 66 } 67 68 71 public int getMinorVersion() 72 { 73 return 0; 74 } 75 76 79 public boolean jdbcCompliant() 80 { 81 return false; 82 } 83 } 84 | Popular Tags |