-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathBaseDriver.java
54 lines (41 loc) · 1.16 KB
/
BaseDriver.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package JDBCExcel;
//------------------------------------------------------------------------------
// Class: BaseDriver
// Description: Base implementation of all methods and fields
// from DRIVER interface.
//------------------------------------------------------------------------------
import java.sql.*;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Logger;
public class BaseDriver implements java.sql.Driver {
final String msgMNI = "Driver method not implemented";
@Override
public boolean acceptsURL(String s) throws SQLException {
throw new SQLException (msgMNI);
}
@Override
public Connection connect(String url, Properties properties) throws SQLException {
throw new SQLException (msgMNI);
}
@Override
public int getMajorVersion() {
return 0;
}
@Override
public int getMinorVersion() {
return 0;
}
@Override
public Logger getParentLogger() {
return null;
}
@Override
public DriverPropertyInfo[] getPropertyInfo(String s, Properties props) throws SQLException {
throw new SQLException(msgMNI);
}
@Override
public boolean jdbcCompliant() {
return false;
}
}