1 11 12 package org.jivesoftware.database; 13 14 import java.sql.*; 15 import java.util.Map ; 16 17 23 public class AbstractConnection implements Connection { 24 25 protected Connection connection; 26 27 public AbstractConnection(Connection connection) { 28 this.connection = connection; 29 } 30 31 public Statement createStatement() throws SQLException { 32 return connection.createStatement(); 33 } 34 35 public PreparedStatement prepareStatement(String sql) throws SQLException { 36 return connection.prepareStatement(sql); 37 } 38 39 public CallableStatement prepareCall(String sql) throws SQLException { 40 return connection.prepareCall(sql); 41 } 42 43 public String nativeSQL(String sql) throws SQLException { 44 return connection.nativeSQL(sql); 45 } 46 47 public void setAutoCommit(boolean autoCommit) throws SQLException { 48 connection.setAutoCommit(autoCommit); 49 } 50 51 public boolean getAutoCommit() throws SQLException { 52 return connection.getAutoCommit(); 53 } 54 55 public void close() throws SQLException { 56 connection.close(); 57 } 58 59 public void commit() throws SQLException { 60 connection.commit(); 61 } 62 63 public void rollback() throws SQLException { 64 connection.rollback(); 65 } 66 67 public boolean isClosed() throws SQLException { 68 return connection.isClosed(); 69 } 70 71 public DatabaseMetaData getMetaData() throws SQLException { 72 return connection.getMetaData(); 73 } 74 75 public void setReadOnly(boolean readOnly) throws SQLException { 76 connection.setReadOnly(readOnly); 77 } 78 79 public boolean isReadOnly() throws SQLException { 80 return connection.isReadOnly(); 81 } 82 83 public void setCatalog(String catalog) throws SQLException { 84 connection.setCatalog(catalog); 85 } 86 87 public String getCatalog() throws SQLException { 88 return connection.getCatalog(); 89 } 90 91 public void setTransactionIsolation(int level) throws SQLException { 92 connection.setTransactionIsolation(level); 93 } 94 95 public int getTransactionIsolation() throws SQLException { 96 return connection.getTransactionIsolation(); 97 } 98 99 public SQLWarning getWarnings() throws SQLException { 100 return connection.getWarnings(); 101 } 102 103 public void clearWarnings() throws SQLException { 104 connection.clearWarnings(); 105 } 106 107 public Statement createStatement(int resultSetType, int resultSetConcurrency) 108 throws SQLException { 109 return connection.createStatement(resultSetType, resultSetConcurrency); 110 } 111 112 public PreparedStatement prepareStatement(String sql, int resultSetType, 113 int resultSetConcurrency) throws SQLException { 114 return connection.prepareStatement(sql, resultSetType, resultSetConcurrency); 115 } 116 117 public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) 118 throws SQLException { 119 return connection.prepareCall(sql, resultSetType, resultSetConcurrency); 120 } 121 122 public Map <String , Class <?>> getTypeMap() throws SQLException { 123 return connection.getTypeMap(); 124 } 125 126 public void setTypeMap(Map <String , Class <?>> map) throws SQLException { 127 connection.setTypeMap(map); 128 } 129 130 public void setHoldability(int holdability) throws SQLException { 131 connection.setHoldability(holdability); 132 } 133 134 public int getHoldability() throws SQLException { 135 return connection.getHoldability(); 136 } 137 138 public Savepoint setSavepoint() throws SQLException { 139 return connection.setSavepoint(); 140 } 141 142 public Savepoint setSavepoint(String name) throws SQLException { 143 return connection.setSavepoint(name); 144 } 145 146 public void rollback(Savepoint savepoint) throws SQLException { 147 connection.rollback(savepoint); 148 } 149 150 public void releaseSavepoint(Savepoint savepoint) throws SQLException { 151 connection.releaseSavepoint(savepoint); 152 } 153 154 public Statement createStatement(int resultSetType, int resultSetConcurrency, 155 int resultSetHoldability) throws SQLException { 156 return connection.createStatement(resultSetType, resultSetConcurrency, 157 resultSetHoldability); 158 } 159 160 public PreparedStatement prepareStatement(String sql, int resultSetType, 161 int resultSetConcurrency, int resultSetHoldability) 162 throws SQLException { 163 return connection.prepareStatement(sql, resultSetType, resultSetConcurrency, 164 resultSetHoldability); 165 } 166 167 public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, 168 int resultSetHoldability) throws SQLException { 169 return connection.prepareCall(sql, resultSetType, resultSetConcurrency, 170 resultSetHoldability); 171 } 172 173 public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) 174 throws SQLException { 175 return connection.prepareStatement(sql, autoGeneratedKeys); 176 } 177 178 public PreparedStatement prepareStatement(String sql, int columnIndexes[]) throws SQLException { 179 return connection.prepareStatement(sql, columnIndexes); 180 } 181 182 public PreparedStatement prepareStatement(String sql, String columnNames[]) 183 throws SQLException { 184 return connection.prepareStatement(sql, columnNames); 185 } 186 } 187 | Popular Tags |