1 package org.opendaylight.controller.md.sal.dom.xsql.jdbc;
3 import java.sql.Connection;
4 import java.sql.Driver;
5 import java.sql.DriverManager;
6 import java.sql.DriverPropertyInfo;
7 import java.sql.SQLException;
8 import java.sql.SQLFeatureNotSupportedException;
9 import java.util.Properties;
10 import java.util.logging.Logger;
12 public class JDBCDriver implements Driver {
14 public static JDBCDriver drv = new JDBCDriver();
18 DriverManager.registerDriver(this);
19 } catch (SQLException e) {
20 // TODO Auto-generated catch block
26 public boolean acceptsURL(String arg0) throws SQLException {
31 public Connection connect(String url, Properties arg1) throws SQLException {
32 System.err.println("JDBC Connection");
34 if (url.equals("svr")) {
35 return new JDBCConnection(true);
37 return new JDBCConnection(url);
39 } catch (Exception err) {
40 err.printStackTrace();
46 public int getMajorVersion() {
51 public int getMinorVersion() {
56 public DriverPropertyInfo[] getPropertyInfo(String arg0, Properties arg1)
58 DriverPropertyInfo i = new DriverPropertyInfo("NQL", "NQL");
59 return new DriverPropertyInfo[] {i};
63 public boolean jdbcCompliant() {
68 public Logger getParentLogger() throws SQLFeatureNotSupportedException {
69 // TODO Auto-generated method stub