1 //======================================================================== 2 //$Id: MockDataSource.java 1692 2007-03-23 04:33:07Z janb $ 3 //Copyright 2006 Mort Bay Consulting Pty. Ltd. 4 //------------------------------------------------------------------------ 5 //Licensed under the Apache License, Version 2.0 (the "License"); 6 //you may not use this file except in compliance with the License. 7 //You may obtain a copy of the License at 8 //http://www.apache.org/licenses/LICENSE-2.0 9 //Unless required by applicable law or agreed to in writing, software 10 //distributed under the License is distributed on an "AS IS" BASIS, 11 //WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 //See the License for the specific language governing permissions and 13 //limitations under the License. 14 //======================================================================== 15 16 package com.acme; 17 18 import java.io.PrintWriter; 19 import java.sql.Connection; 20 import java.sql.SQLException; 21 22 import javax.sql.DataSource; 23 24 /** 25 * MockDataSource 26 * 27 * 28 */ 29 public class MockDataSource implements DataSource 30 { 31 32 /** 33 * @see javax.sql.DataSource#getConnection() 34 */ 35 public Connection getConnection() throws SQLException 36 { 37 // TODO Auto-generated method stub 38 return null; 39 } 40 41 /** 42 * @see javax.sql.DataSource#getConnection(java.lang.String, java.lang.String) 43 */ 44 public Connection getConnection(String username, String password) 45 throws SQLException 46 { 47 // TODO Auto-generated method stub 48 return null; 49 } 50 51 /** 52 * @see javax.sql.DataSource#getLogWriter() 53 */ 54 public PrintWriter getLogWriter() throws SQLException 55 { 56 // TODO Auto-generated method stub 57 return null; 58 } 59 60 /** 61 * @see javax.sql.DataSource#getLoginTimeout() 62 */ 63 public int getLoginTimeout() throws SQLException 64 { 65 // TODO Auto-generated method stub 66 return 0; 67 } 68 69 /** 70 * @see javax.sql.DataSource#setLogWriter(java.io.PrintWriter) 71 */ 72 public void setLogWriter(PrintWriter out) throws SQLException 73 { 74 // TODO Auto-generated method stub 75 76 } 77 78 /** 79 * @see javax.sql.DataSource#setLoginTimeout(int) 80 */ 81 public void setLoginTimeout(int seconds) throws SQLException 82 { 83 // TODO Auto-generated method stub 84 85 } 86 87 }