@Test public void testLeoDataSource() throws Exception { LeoDataSource dataSource = new LeoDataSource(connection); assertNotNull(dataSource); PrintWriter pw = new PrintWriter(new StringWriter()); assertNotNull(pw); dataSource.setLogWriter(pw); assertEquals(null, dataSource.getLogWriter()); dataSource.setLoginTimeout(25); assertEquals(0, dataSource.getLoginTimeout()); assertEquals(null, dataSource.getParentLogger()); }
public LeoDataSource(Connection conn) throws SQLException { this.mConn = conn; this.mDriver = mConn.getMetaData().getDriverName(); this.mUrl = mConn.getMetaData().getURL(); }
LeoDataSource implements DataSource { public LeoDataSource(Connection conn) throws SQLException { this.mConn = conn; this.mDriver = mConn.getMetaData().getDriverName(); this.mUrl = mConn.getMetaData().getURL(); } }
LeoDataSource implements DataSource { public LeoDataSource(Connection conn) throws SQLException { this.mConn = conn; this.mDriver = mConn.getMetaData().getDriverName(); this.mUrl = mConn.getMetaData().getURL(); } LeoDataSource(Connection conn);  LeoDataSource(String driver, String url, String username, String password); }
LeoDataSource implements DataSource { public LeoDataSource(Connection conn) throws SQLException { this.mConn = conn; this.mDriver = mConn.getMetaData().getDriverName(); this.mUrl = mConn.getMetaData().getURL(); } LeoDataSource(Connection conn);  LeoDataSource(String driver, String url, String username, String password); @Override PrintWriter getLogWriter(); @Override void setLogWriter(PrintWriter out); @Override void setLoginTimeout(int seconds); @Override int getLoginTimeout(); Logger getParentLogger(); @Override Connection getConnection(); @Override Connection getConnection(String username, String password); @Override T unwrap(Class<T> iface); @Override boolean isWrapperFor(Class<?> iface); }
LeoDataSource implements DataSource { public LeoDataSource(Connection conn) throws SQLException { this.mConn = conn; this.mDriver = mConn.getMetaData().getDriverName(); this.mUrl = mConn.getMetaData().getURL(); } LeoDataSource(Connection conn);  LeoDataSource(String driver, String url, String username, String password); @Override PrintWriter getLogWriter(); @Override void setLogWriter(PrintWriter out); @Override void setLoginTimeout(int seconds); @Override int getLoginTimeout(); Logger getParentLogger(); @Override Connection getConnection(); @Override Connection getConnection(String username, String password); @Override T unwrap(Class<T> iface); @Override boolean isWrapperFor(Class<?> iface);  }