01: package liquibase.database;
02:
03: import java.sql.*;
04:
05: /**
06: * A liquibase abstraction over the normal Connection that is available in
07: * java.sql. This interface allows wrappers and aspects over the basic
08: * connection.
09: *
10: * @see SybaseConnectionDelegate
11: * @see SQLConnectionDelegate
12: * @author <a href="mailto:csuml@yahoo.co.uk">Paul Keeble</a>
13: *
14: */
15: public interface DatabaseConnection {
16:
17: public void close() throws SQLException;
18:
19: public void commit() throws SQLException;
20:
21: public Statement createStatement() throws SQLException;
22:
23: public Statement createStatement(int resultSetType,
24: int resultSetConcurrency) throws SQLException;
25:
26: public Statement createStatement(int resultSetType,
27: int resultSetConcurrency, int resultSetHoldability)
28: throws SQLException;
29:
30: public boolean getAutoCommit() throws SQLException;
31:
32: public String getCatalog() throws SQLException;
33:
34: public DatabaseMetaData getMetaData() throws SQLException;
35:
36: public String nativeSQL(String sql) throws SQLException;
37:
38: public CallableStatement prepareCall(String sql)
39: throws SQLException;
40:
41: public CallableStatement prepareCall(String sql, int resultSetType,
42: int resultSetConcurrency) throws SQLException;
43:
44: public CallableStatement prepareCall(String sql, int resultSetType,
45: int resultSetConcurrency, int resultSetHoldability)
46: throws SQLException;
47:
48: public PreparedStatement prepareStatement(String sql)
49: throws SQLException;
50:
51: public PreparedStatement prepareStatement(String sql,
52: int autoGeneratedKeys) throws SQLException;
53:
54: public PreparedStatement prepareStatement(String sql,
55: int[] columnIndexes) throws SQLException;
56:
57: public PreparedStatement prepareStatement(String sql,
58: String[] columnNames) throws SQLException;
59:
60: public PreparedStatement prepareStatement(String sql,
61: int resultSetType, int resultSetConcurrency)
62: throws SQLException;
63:
64: public PreparedStatement prepareStatement(String sql,
65: int resultSetType, int resultSetConcurrency,
66: int resultSetHoldability) throws SQLException;
67:
68: public void rollback() throws SQLException;
69:
70: public void setAutoCommit(boolean autoCommit) throws SQLException;
71:
72: public Connection getUnderlyingConnection();
73: }
|