1 29 30 package com.caucho.amber.jdbc; 31 32 import java.sql.*; 33 import java.util.Map ; 34 35 38 public class AmberConnectionImpl implements Connection { 39 private Connection _conn; 40 41 44 public Connection getConnection() 45 { 46 return _conn; 47 } 48 49 54 public String getCatalog() 55 throws SQLException 56 { 57 return getConnection().getCatalog(); 58 } 59 60 63 public void setCatalog(String catalog) 64 throws SQLException 65 { 66 getConnection().setCatalog(catalog); 67 } 68 69 72 public DatabaseMetaData getMetaData() 73 throws SQLException 74 { 75 return getConnection().getMetaData(); 76 } 77 78 81 public Map getTypeMap() 82 throws SQLException 83 { 84 return getConnection().getTypeMap(); 85 } 86 87 90 public void setTypeMap(Map <String ,Class <?>> map) 91 throws SQLException 92 { 93 getConnection().setTypeMap(map); 94 } 95 96 99 public String nativeSQL(String sql) 100 throws SQLException 101 { 102 return getConnection().nativeSQL(sql); 103 } 104 105 public int getTransactionIsolation() 106 throws SQLException 107 { 108 return getConnection().getTransactionIsolation(); 109 } 110 111 public void setTransactionIsolation(int isolation) 112 throws SQLException 113 { 114 getConnection().setTransactionIsolation(isolation); 115 } 116 117 public SQLWarning getWarnings() 118 throws SQLException 119 { 120 return getConnection().getWarnings(); 121 } 122 123 public void clearWarnings() 124 throws SQLException 125 { 126 getConnection().clearWarnings(); 127 } 128 129 public void setReadOnly(boolean readOnly) 130 throws SQLException 131 { 132 getConnection().setReadOnly(readOnly); 133 } 134 135 public boolean isReadOnly() 136 throws SQLException 137 { 138 return getConnection().isReadOnly(); 139 } 140 141 148 public Statement createStatement() 149 throws SQLException 150 { 151 return getConnection().createStatement(); 152 } 153 154 161 public Statement createStatement(int resultSetType, int resultSetConcurrency) 162 throws SQLException 163 { 164 return getConnection().createStatement(resultSetType, resultSetConcurrency); 165 } 166 167 public Statement createStatement(int resultSetType, 168 int resultSetConcurrency, 169 int resultSetHoldability) 170 throws SQLException 171 { 172 return getConnection().createStatement(resultSetType, 173 resultSetConcurrency, 174 resultSetHoldability); 175 } 176 177 178 public PreparedStatement prepareStatement(String sql) 179 throws SQLException 180 { 181 return getConnection().prepareStatement(sql); 182 } 183 184 public PreparedStatement prepareStatement(String sql, 185 int resultSetType) 186 throws SQLException 187 { 188 return getConnection().prepareStatement(sql, resultSetType); 189 } 190 191 public PreparedStatement prepareStatement(String sql, int resultSetType, 192 int resultSetConcurrency) 193 throws SQLException 194 { 195 return getConnection().prepareStatement(sql, resultSetType, 196 resultSetConcurrency); 197 } 198 199 public PreparedStatement prepareStatement(String sql, 200 int resultSetType, 201 int resultSetConcurrency, 202 int resultSetHoldability) 203 throws SQLException 204 { 205 return getConnection().prepareStatement(sql, resultSetType, 206 resultSetConcurrency, 207 resultSetHoldability); 208 } 209 210 public PreparedStatement prepareStatement(String sql, 211 int []columnIndexes) 212 throws SQLException 213 { 214 return getConnection().prepareStatement(sql, columnIndexes); 215 } 216 217 public PreparedStatement prepareStatement(String sql, 218 String []columnNames) 219 throws SQLException 220 { 221 return getConnection().prepareStatement(sql, columnNames); 222 } 223 224 public CallableStatement prepareCall(String sql) 225 throws SQLException 226 { 227 return getConnection().prepareCall(sql); 228 } 229 230 public CallableStatement prepareCall(String sql, int resultSetType, 231 int resultSetConcurrency) 232 throws SQLException 233 { 234 return getConnection().prepareCall(sql, resultSetType, 235 resultSetConcurrency); 236 } 237 238 public CallableStatement prepareCall(String sql, 239 int resultSetType, 240 int resultSetConcurrency, 241 int resultSetHoldability) 242 throws SQLException 243 { 244 return getConnection().prepareCall(sql, resultSetType, 245 resultSetConcurrency, 246 resultSetHoldability); 247 } 248 249 public boolean getAutoCommit() 250 throws SQLException 251 { 252 return getConnection().getAutoCommit(); 253 } 254 255 public void setAutoCommit(boolean autoCommit) 256 throws SQLException 257 { 258 getConnection().setAutoCommit(autoCommit); 259 } 260 261 public void commit() 262 throws SQLException 263 { 264 getConnection().commit(); 265 } 266 267 public void rollback() 268 throws SQLException 269 { 270 getConnection().rollback(); 271 } 272 273 276 public boolean isClosed() 277 throws SQLException 278 { 279 return getConnection().isClosed(); 280 } 281 282 286 public void close() throws SQLException 287 { 288 getConnection().close(); 289 } 290 291 public void setHoldability(int hold) 292 throws SQLException 293 { 294 getConnection().setHoldability(hold); 295 } 296 297 public int getHoldability() 298 throws SQLException 299 { 300 return getConnection().getHoldability(); 301 } 302 303 public Savepoint setSavepoint() 304 throws SQLException 305 { 306 return getConnection().setSavepoint(); 307 } 308 309 public Savepoint setSavepoint(String name) 310 throws SQLException 311 { 312 return getConnection().setSavepoint(name); 313 } 314 315 public void releaseSavepoint(Savepoint savepoint) 316 throws SQLException 317 { 318 getConnection().releaseSavepoint(savepoint); 319 } 320 321 public void rollback(Savepoint savepoint) 322 throws SQLException 323 { 324 getConnection().rollback(savepoint); 325 } 326 327 public String toString() 328 { 329 return "AmberConnection[" + _conn + "]"; 330 } 331 } 332 | Popular Tags |