1 package org.davidmoten.rx.jdbc.internal;
2
3 import java.sql.Array;
4 import java.sql.Blob;
5 import java.sql.CallableStatement;
6 import java.sql.Clob;
7 import java.sql.Connection;
8 import java.sql.DatabaseMetaData;
9 import java.sql.NClob;
10 import java.sql.PreparedStatement;
11 import java.sql.SQLClientInfoException;
12 import java.sql.SQLException;
13 import java.sql.SQLWarning;
14 import java.sql.SQLXML;
15 import java.sql.Savepoint;
16 import java.sql.Statement;
17 import java.sql.Struct;
18 import java.util.Map;
19 import java.util.Properties;
20 import java.util.concurrent.Executor;
21
22 public interface DelegatedConnection extends Connection {
23
24 Connection con();
25
26 default <T> T unwrap(Class<T> iface) throws SQLException {
27 return con().unwrap(iface);
28 }
29
30 default boolean isWrapperFor(Class<?> iface) throws SQLException {
31 return con().isWrapperFor(iface);
32 }
33
34 default Statement createStatement() throws SQLException {
35 return con().createStatement();
36 }
37
38 default PreparedStatement prepareStatement(String sql) throws SQLException {
39 return con().prepareStatement(sql);
40 }
41
42 default CallableStatement prepareCall(String sql) throws SQLException {
43 return con().prepareCall(sql);
44 }
45
46 default String nativeSQL(String sql) throws SQLException {
47 return con().nativeSQL(sql);
48 }
49
50 default void setAutoCommit(boolean autoCommit) throws SQLException {
51 con().setAutoCommit(autoCommit);
52 }
53
54 default boolean getAutoCommit() throws SQLException {
55 return con().getAutoCommit();
56 }
57
58 default void commit() throws SQLException {
59 con().commit();
60 }
61
62 default void rollback() throws SQLException {
63 con().rollback();
64 }
65
66 default void close() throws SQLException {
67 con().close();
68 }
69
70 default boolean isClosed() throws SQLException {
71 return con().isClosed();
72 }
73
74 default DatabaseMetaData getMetaData() throws SQLException {
75 return con().getMetaData();
76 }
77
78 default void setReadOnly(boolean readOnly) throws SQLException {
79 con().setReadOnly(readOnly);
80 }
81
82 default boolean isReadOnly() throws SQLException {
83 return con().isReadOnly();
84 }
85
86 default void setCatalog(String catalog) throws SQLException {
87 con().setCatalog(catalog);
88 }
89
90 default String getCatalog() throws SQLException {
91 return con().getCatalog();
92 }
93
94 default void setTransactionIsolation(int level) throws SQLException {
95 con().setTransactionIsolation(level);
96 }
97
98 default int getTransactionIsolation() throws SQLException {
99 return con().getTransactionIsolation();
100 }
101
102 default SQLWarning getWarnings() throws SQLException {
103 return con().getWarnings();
104 }
105
106 default void clearWarnings() throws SQLException {
107 con().clearWarnings();
108 }
109
110 default Statement createStatement(int resultSetType, int resultSetConcurrency)
111 throws SQLException {
112 return con().createStatement(resultSetType, resultSetConcurrency);
113 }
114
115 default PreparedStatement prepareStatement(String sql, int resultSetType,
116 int resultSetConcurrency) throws SQLException {
117 return con().prepareStatement(sql, resultSetType, resultSetConcurrency);
118 }
119
120 default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency)
121 throws SQLException {
122 return con().prepareCall(sql, resultSetType, resultSetConcurrency);
123 }
124
125 default Map<String, Class<?>> getTypeMap() throws SQLException {
126 return con().getTypeMap();
127 }
128
129 default void setTypeMap(Map<String, Class<?>> map) throws SQLException {
130 con().setTypeMap(map);
131 }
132
133 default void setHoldability(int holdability) throws SQLException {
134 con().setHoldability(holdability);
135 }
136
137 default int getHoldability() throws SQLException {
138 return con().getHoldability();
139 }
140
141 default Savepoint setSavepoint() throws SQLException {
142 return con().setSavepoint();
143 }
144
145 default Savepoint setSavepoint(String name) throws SQLException {
146 return con().setSavepoint(name);
147 }
148
149 default void rollback(Savepoint savepoint) throws SQLException {
150 con().rollback(savepoint);
151 }
152
153 default void releaseSavepoint(Savepoint savepoint) throws SQLException {
154 con().releaseSavepoint(savepoint);
155 }
156
157 default Statement createStatement(int resultSetType, int resultSetConcurrency,
158 int resultSetHoldability) throws SQLException {
159 return con().createStatement(resultSetType, resultSetConcurrency, resultSetHoldability);
160 }
161
162 default PreparedStatement prepareStatement(String sql, int resultSetType,
163 int resultSetConcurrency, int resultSetHoldability) throws SQLException {
164 return con().prepareStatement(sql, resultSetType, resultSetConcurrency,
165 resultSetHoldability);
166 }
167
168 default CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency,
169 int resultSetHoldability) throws SQLException {
170 return con().prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
171 }
172
173 default PreparedStatement prepareStatement(String sql, int autoGeneratedKeys)
174 throws SQLException {
175 return con().prepareStatement(sql, autoGeneratedKeys);
176 }
177
178 default PreparedStatement prepareStatement(String sql, int[] columnIndexes)
179 throws SQLException {
180 return con().prepareStatement(sql, columnIndexes);
181 }
182
183 default PreparedStatement prepareStatement(String sql, String[] columnNames)
184 throws SQLException {
185 return con().prepareStatement(sql, columnNames);
186 }
187
188 default Clob createClob() throws SQLException {
189 return con().createClob();
190 }
191
192 default Blob createBlob() throws SQLException {
193 return con().createBlob();
194 }
195
196 default NClob createNClob() throws SQLException {
197 return con().createNClob();
198 }
199
200 default SQLXML createSQLXML() throws SQLException {
201 return con().createSQLXML();
202 }
203
204 default boolean isValid(int timeout) throws SQLException {
205 return con().isValid(timeout);
206 }
207
208 default void setClientInfo(String name, String value) throws SQLClientInfoException {
209 con().setClientInfo(name, value);
210 }
211
212 default void setClientInfo(Properties properties) throws SQLClientInfoException {
213 con().setClientInfo(properties);
214 }
215
216 default String getClientInfo(String name) throws SQLException {
217 return con().getClientInfo(name);
218 }
219
220 default Properties getClientInfo() throws SQLException {
221 return con().getClientInfo();
222 }
223
224 default Array createArrayOf(String typeName, Object[] elements) throws SQLException {
225 return con().createArrayOf(typeName, elements);
226 }
227
228 default Struct createStruct(String typeName, Object[] attributes) throws SQLException {
229 return con().createStruct(typeName, attributes);
230 }
231
232 default void setSchema(String schema) throws SQLException {
233 con().setSchema(schema);
234 }
235
236 default String getSchema() throws SQLException {
237 return con().getSchema();
238 }
239
240 default void abort(Executor executor) throws SQLException {
241 con().abort(executor);
242 }
243
244 default void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
245 con().setNetworkTimeout(executor, milliseconds);
246 }
247
248 default int getNetworkTimeout() throws SQLException {
249 return con().getNetworkTimeout();
250 }
251
252 }