1 19 20 package org.apache.cayenne.project; 21 22 import java.io.PrintWriter ; 23 import java.sql.Connection ; 24 import java.sql.SQLException ; 25 26 import javax.sql.DataSource ; 27 28 import org.apache.cayenne.conn.DataSourceInfo; 29 30 33 public class ProjectDataSource implements DataSource { 34 35 protected DataSourceInfo info; 36 37 public ProjectDataSource(DataSourceInfo info) { 38 this.info = info; 39 } 40 41 public DataSourceInfo getDataSourceInfo() { 42 return info; 43 } 44 45 public Connection getConnection() throws SQLException { 46 throw new SQLException ("Method not implemented"); 47 } 48 49 public Connection getConnection(String username, String password) throws SQLException { 50 throw new SQLException ("Method not implemented"); 51 } 52 53 public PrintWriter getLogWriter() throws SQLException { 54 return new PrintWriter (System.out); 55 } 56 57 public void setLogWriter(PrintWriter out) throws SQLException { 58 } 59 60 public void setLoginTimeout(int seconds) throws SQLException { 61 } 62 63 public int getLoginTimeout() throws SQLException { 64 throw new SQLException ("Method not implemented"); 65 } 66 } 67 | Popular Tags |