1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.synchronoss.cpo.jdbc;
22
23 import javax.sql.DataSource;
24 import java.io.PrintWriter;
25 import java.sql.*;
26 import java.util.*;
27 import java.util.logging.Logger;
28
29
30
31
32 public abstract class AbstractJdbcDataSource extends AbstractJdbcDataSourceInfo implements DataSource {
33
34 private PrintWriter printWriter_ = null;
35 private int timeout_ = 0;
36
37 public AbstractJdbcDataSource(String dataSourceName) {
38 super(dataSourceName);
39 }
40
41 public AbstractJdbcDataSource(String className, SortedMap<String, String> properties) {
42 super(className, properties);
43 }
44
45 public AbstractJdbcDataSource(String className, Properties properties) {
46 super(className, properties);
47 }
48
49 @Override
50 public Connection getConnection(String userName, String password) throws SQLException {
51 throw new UnsupportedOperationException("Not supported yet.");
52 }
53
54 @Override
55 public PrintWriter getLogWriter() throws SQLException {
56 return printWriter_;
57 }
58
59 @Override
60 public void setLogWriter(PrintWriter out) throws SQLException {
61 printWriter_ = out;
62 }
63
64 @Override
65 public void setLoginTimeout(int seconds) throws SQLException {
66 timeout_ = seconds;
67 }
68
69 @Override
70 public int getLoginTimeout() throws SQLException {
71 return timeout_;
72 }
73
74 @Override
75 public <T> T unwrap(Class<T> iface) throws SQLException {
76 throw new UnsupportedOperationException("Not supported yet.");
77 }
78
79 @Override
80 public boolean isWrapperFor(Class<?> iface) throws SQLException {
81 return false;
82 }
83
84
85 @Override
86 public Logger getParentLogger() throws SQLFeatureNotSupportedException {
87 throw new SQLFeatureNotSupportedException();
88 }
89 }