Commit 759bd63265b81f1a034117c5cdadc93c58887184
1 parent
258f71ad
Exists in
master
Organização do projeto
Showing
3 changed files
with
364 additions
and
364 deletions
Show diff stats
impl/extension/jdbc/src/main/java/br/gov/frameworkdemoiselle/internal/producer/DataSourceProducer.java
| @@ -21,7 +21,7 @@ import org.slf4j.Logger; | @@ -21,7 +21,7 @@ import org.slf4j.Logger; | ||
| 21 | import br.gov.frameworkdemoiselle.DemoiselleException; | 21 | import br.gov.frameworkdemoiselle.DemoiselleException; |
| 22 | import br.gov.frameworkdemoiselle.annotation.Name; | 22 | import br.gov.frameworkdemoiselle.annotation.Name; |
| 23 | import br.gov.frameworkdemoiselle.internal.configuration.JDBCConfig; | 23 | import br.gov.frameworkdemoiselle.internal.configuration.JDBCConfig; |
| 24 | -import br.gov.frameworkdemoiselle.transaction.BasicDataSourceProxy; | 24 | +import br.gov.frameworkdemoiselle.internal.proxy.BasicDataSourceProxy; |
| 25 | import br.gov.frameworkdemoiselle.util.Beans; | 25 | import br.gov.frameworkdemoiselle.util.Beans; |
| 26 | import br.gov.frameworkdemoiselle.util.ResourceBundle; | 26 | import br.gov.frameworkdemoiselle.util.ResourceBundle; |
| 27 | 27 |
impl/extension/jdbc/src/main/java/br/gov/frameworkdemoiselle/internal/proxy/BasicDataSourceProxy.java
0 → 100644
| @@ -0,0 +1,363 @@ | @@ -0,0 +1,363 @@ | ||
| 1 | +package br.gov.frameworkdemoiselle.internal.proxy; | ||
| 2 | + | ||
| 3 | +import java.io.PrintWriter; | ||
| 4 | +import java.io.Serializable; | ||
| 5 | +import java.sql.Connection; | ||
| 6 | +import java.sql.SQLException; | ||
| 7 | +import java.util.Collection; | ||
| 8 | + | ||
| 9 | +import org.apache.commons.dbcp.BasicDataSource; | ||
| 10 | + | ||
| 11 | +import br.gov.frameworkdemoiselle.DemoiselleException; | ||
| 12 | +import br.gov.frameworkdemoiselle.internal.configuration.JDBCConfig; | ||
| 13 | +import br.gov.frameworkdemoiselle.util.ResourceBundle; | ||
| 14 | + | ||
| 15 | +public class BasicDataSourceProxy extends BasicDataSource implements Serializable { | ||
| 16 | + | ||
| 17 | + private static final long serialVersionUID = 1L; | ||
| 18 | + | ||
| 19 | + private ResourceBundle bundle; | ||
| 20 | + | ||
| 21 | + private String dataSourceName; | ||
| 22 | + | ||
| 23 | + private JDBCConfig config; | ||
| 24 | + | ||
| 25 | + private transient BasicDataSource delegate; | ||
| 26 | + | ||
| 27 | + public BasicDataSourceProxy(String dataSourceName, JDBCConfig config, ResourceBundle bundle) { | ||
| 28 | + this.dataSourceName = dataSourceName; | ||
| 29 | + this.config = config; | ||
| 30 | + this.bundle = bundle; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + private BasicDataSource getDelegate() { | ||
| 34 | + if (this.delegate == null) { | ||
| 35 | + BasicDataSource dataSource = new BasicDataSource(); | ||
| 36 | + | ||
| 37 | + try { | ||
| 38 | + String driver = config.getDriverClass().get(dataSourceName); | ||
| 39 | + String url = config.getUrl().get(dataSourceName); | ||
| 40 | + String username = config.getUsername().get(dataSourceName); | ||
| 41 | + String password = config.getPassword().get(dataSourceName); | ||
| 42 | + | ||
| 43 | + dataSource.setDriverClassName(driver); | ||
| 44 | + dataSource.setUrl(url); | ||
| 45 | + dataSource.setUsername(username); | ||
| 46 | + dataSource.setPassword(password); | ||
| 47 | + | ||
| 48 | + } catch (ClassCastException cause) { | ||
| 49 | + throw new DemoiselleException(bundle.getString("load-duplicated-configuration-failed"), cause); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + delegate = dataSource; | ||
| 53 | + } | ||
| 54 | + | ||
| 55 | + return this.delegate; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public boolean getDefaultAutoCommit() { | ||
| 59 | + return getDelegate().getDefaultAutoCommit(); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public void setDefaultAutoCommit(boolean defaultAutoCommit) { | ||
| 63 | + getDelegate().setDefaultAutoCommit(defaultAutoCommit); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public boolean getDefaultReadOnly() { | ||
| 67 | + return getDelegate().getDefaultReadOnly(); | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public void setDefaultReadOnly(boolean defaultReadOnly) { | ||
| 71 | + getDelegate().setDefaultReadOnly(defaultReadOnly); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public int getDefaultTransactionIsolation() { | ||
| 75 | + return getDelegate().getDefaultTransactionIsolation(); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + public void setDefaultTransactionIsolation(int defaultTransactionIsolation) { | ||
| 79 | + getDelegate().setDefaultTransactionIsolation(defaultTransactionIsolation); | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public String getDefaultCatalog() { | ||
| 83 | + return getDelegate().getDefaultCatalog(); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + public void setDefaultCatalog(String defaultCatalog) { | ||
| 87 | + getDelegate().setDefaultCatalog(defaultCatalog); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public String getDriverClassName() { | ||
| 91 | + return getDelegate().getDriverClassName(); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + public void setDriverClassName(String driverClassName) { | ||
| 95 | + getDelegate().setDriverClassName(driverClassName); | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public ClassLoader getDriverClassLoader() { | ||
| 99 | + return getDelegate().getDriverClassLoader(); | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + public void setDriverClassLoader(ClassLoader driverClassLoader) { | ||
| 103 | + getDelegate().setDriverClassLoader(driverClassLoader); | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public int getMaxActive() { | ||
| 107 | + return getDelegate().getMaxActive(); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public void setMaxActive(int maxActive) { | ||
| 111 | + getDelegate().setMaxActive(maxActive); | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public int getMaxIdle() { | ||
| 115 | + return getDelegate().getMaxIdle(); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public void setMaxIdle(int maxIdle) { | ||
| 119 | + getDelegate().setMaxIdle(maxIdle); | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public int getMinIdle() { | ||
| 123 | + return getDelegate().getMinIdle(); | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + public void setMinIdle(int minIdle) { | ||
| 127 | + getDelegate().setMinIdle(minIdle); | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + public int getInitialSize() { | ||
| 131 | + return getDelegate().getInitialSize(); | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + public void setInitialSize(int initialSize) { | ||
| 135 | + getDelegate().setInitialSize(initialSize); | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + public long getMaxWait() { | ||
| 139 | + return getDelegate().getMaxWait(); | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + public void setMaxWait(long maxWait) { | ||
| 143 | + getDelegate().setMaxWait(maxWait); | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + public boolean isPoolPreparedStatements() { | ||
| 147 | + return getDelegate().isPoolPreparedStatements(); | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + public void setPoolPreparedStatements(boolean poolingStatements) { | ||
| 151 | + getDelegate().setPoolPreparedStatements(poolingStatements); | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public int getMaxOpenPreparedStatements() { | ||
| 155 | + return getDelegate().getMaxOpenPreparedStatements(); | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + public void setMaxOpenPreparedStatements(int maxOpenStatements) { | ||
| 159 | + getDelegate().setMaxOpenPreparedStatements(maxOpenStatements); | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + public boolean getTestOnBorrow() { | ||
| 163 | + return getDelegate().getTestOnBorrow(); | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | + public void setTestOnBorrow(boolean testOnBorrow) { | ||
| 167 | + getDelegate().setTestOnBorrow(testOnBorrow); | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + public boolean getTestOnReturn() { | ||
| 171 | + return getDelegate().getTestOnReturn(); | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + public void setTestOnReturn(boolean testOnReturn) { | ||
| 175 | + getDelegate().setTestOnReturn(testOnReturn); | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + public long getTimeBetweenEvictionRunsMillis() { | ||
| 179 | + return getDelegate().getTimeBetweenEvictionRunsMillis(); | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) { | ||
| 183 | + getDelegate().setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + public int getNumTestsPerEvictionRun() { | ||
| 187 | + return getDelegate().getNumTestsPerEvictionRun(); | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { | ||
| 191 | + getDelegate().setNumTestsPerEvictionRun(numTestsPerEvictionRun); | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + public long getMinEvictableIdleTimeMillis() { | ||
| 195 | + return getDelegate().getMinEvictableIdleTimeMillis(); | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | + public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) { | ||
| 199 | + getDelegate().setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + public boolean getTestWhileIdle() { | ||
| 203 | + return getDelegate().getTestWhileIdle(); | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + public void setTestWhileIdle(boolean testWhileIdle) { | ||
| 207 | + getDelegate().setTestWhileIdle(testWhileIdle); | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + public int getNumActive() { | ||
| 211 | + return getDelegate().getNumActive(); | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + public int getNumIdle() { | ||
| 215 | + return getDelegate().getNumIdle(); | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + public String getPassword() { | ||
| 219 | + return getDelegate().getPassword(); | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + public void setPassword(String password) { | ||
| 223 | + getDelegate().setPassword(password); | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + public String getUrl() { | ||
| 227 | + return getDelegate().getUrl(); | ||
| 228 | + } | ||
| 229 | + | ||
| 230 | + public void setUrl(String url) { | ||
| 231 | + getDelegate().setUrl(url); | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | + public String getUsername() { | ||
| 235 | + return getDelegate().getUsername(); | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + public void setUsername(String username) { | ||
| 239 | + getDelegate().setUsername(username); | ||
| 240 | + } | ||
| 241 | + | ||
| 242 | + public String getValidationQuery() { | ||
| 243 | + return getDelegate().getValidationQuery(); | ||
| 244 | + } | ||
| 245 | + | ||
| 246 | + public void setValidationQuery(String validationQuery) { | ||
| 247 | + getDelegate().setValidationQuery(validationQuery); | ||
| 248 | + } | ||
| 249 | + | ||
| 250 | + public int getValidationQueryTimeout() { | ||
| 251 | + return getDelegate().getValidationQueryTimeout(); | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + public void setValidationQueryTimeout(int timeout) { | ||
| 255 | + getDelegate().setValidationQueryTimeout(timeout); | ||
| 256 | + } | ||
| 257 | + | ||
| 258 | + @SuppressWarnings("rawtypes") | ||
| 259 | + public Collection getConnectionInitSqls() { | ||
| 260 | + return getDelegate().getConnectionInitSqls(); | ||
| 261 | + } | ||
| 262 | + | ||
| 263 | + @SuppressWarnings("rawtypes") | ||
| 264 | + public void setConnectionInitSqls(Collection connectionInitSqls) { | ||
| 265 | + getDelegate().setConnectionInitSqls(connectionInitSqls); | ||
| 266 | + } | ||
| 267 | + | ||
| 268 | + public void setAccessToUnderlyingConnectionAllowed(boolean allow) { | ||
| 269 | + getDelegate().setAccessToUnderlyingConnectionAllowed(allow); | ||
| 270 | + } | ||
| 271 | + | ||
| 272 | + public Connection getConnection(String user, String pass) throws SQLException { | ||
| 273 | + return getDelegate().getConnection(user, pass); | ||
| 274 | + } | ||
| 275 | + | ||
| 276 | + public int getLoginTimeout() throws SQLException { | ||
| 277 | + return getDelegate().getLoginTimeout(); | ||
| 278 | + } | ||
| 279 | + | ||
| 280 | + public PrintWriter getLogWriter() throws SQLException { | ||
| 281 | + return getDelegate().getLogWriter(); | ||
| 282 | + } | ||
| 283 | + | ||
| 284 | + public void setLoginTimeout(int loginTimeout) throws SQLException { | ||
| 285 | + getDelegate().setLoginTimeout(loginTimeout); | ||
| 286 | + } | ||
| 287 | + | ||
| 288 | + public void setLogWriter(PrintWriter logWriter) throws SQLException { | ||
| 289 | + getDelegate().setLogWriter(logWriter); | ||
| 290 | + } | ||
| 291 | + | ||
| 292 | + public boolean getRemoveAbandoned() { | ||
| 293 | + return getDelegate().getRemoveAbandoned(); | ||
| 294 | + } | ||
| 295 | + | ||
| 296 | + public void setRemoveAbandoned(boolean removeAbandoned) { | ||
| 297 | + getDelegate().setRemoveAbandoned(removeAbandoned); | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + public int getRemoveAbandonedTimeout() { | ||
| 301 | + return getDelegate().getRemoveAbandonedTimeout(); | ||
| 302 | + } | ||
| 303 | + | ||
| 304 | + public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) { | ||
| 305 | + getDelegate().setRemoveAbandonedTimeout(removeAbandonedTimeout); | ||
| 306 | + } | ||
| 307 | + | ||
| 308 | + public boolean getLogAbandoned() { | ||
| 309 | + return getDelegate().getLogAbandoned(); | ||
| 310 | + } | ||
| 311 | + | ||
| 312 | + public void setLogAbandoned(boolean logAbandoned) { | ||
| 313 | + getDelegate().setLogAbandoned(logAbandoned); | ||
| 314 | + } | ||
| 315 | + | ||
| 316 | + public void addConnectionProperty(String name, String value) { | ||
| 317 | + getDelegate().addConnectionProperty(name, value); | ||
| 318 | + } | ||
| 319 | + | ||
| 320 | + public void removeConnectionProperty(String name) { | ||
| 321 | + getDelegate().removeConnectionProperty(name); | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | + public void setConnectionProperties(String connectionProperties) { | ||
| 325 | + getDelegate().setConnectionProperties(connectionProperties); | ||
| 326 | + } | ||
| 327 | + | ||
| 328 | + public void close() throws SQLException { | ||
| 329 | + getDelegate().close(); | ||
| 330 | + } | ||
| 331 | + | ||
| 332 | + public boolean equals(Object arg0) { | ||
| 333 | + return getDelegate().equals(arg0); | ||
| 334 | + } | ||
| 335 | + | ||
| 336 | + public Connection getConnection() throws SQLException { | ||
| 337 | + return getDelegate().getConnection(); | ||
| 338 | + } | ||
| 339 | + | ||
| 340 | + public int hashCode() { | ||
| 341 | + return getDelegate().hashCode(); | ||
| 342 | + } | ||
| 343 | + | ||
| 344 | + public boolean isAccessToUnderlyingConnectionAllowed() { | ||
| 345 | + return getDelegate().isAccessToUnderlyingConnectionAllowed(); | ||
| 346 | + } | ||
| 347 | + | ||
| 348 | + public boolean isClosed() { | ||
| 349 | + return getDelegate().isClosed(); | ||
| 350 | + } | ||
| 351 | + | ||
| 352 | + public boolean isWrapperFor(Class<?> iface) throws SQLException { | ||
| 353 | + return getDelegate().isWrapperFor(iface); | ||
| 354 | + } | ||
| 355 | + | ||
| 356 | + public String toString() { | ||
| 357 | + return getDelegate().toString(); | ||
| 358 | + } | ||
| 359 | + | ||
| 360 | + public <T> T unwrap(Class<T> iface) throws SQLException { | ||
| 361 | + return getDelegate().unwrap(iface); | ||
| 362 | + } | ||
| 363 | +} |
impl/extension/jdbc/src/main/java/br/gov/frameworkdemoiselle/transaction/BasicDataSourceProxy.java
| @@ -1,363 +0,0 @@ | @@ -1,363 +0,0 @@ | ||
| 1 | -package br.gov.frameworkdemoiselle.transaction; | ||
| 2 | - | ||
| 3 | -import java.io.PrintWriter; | ||
| 4 | -import java.io.Serializable; | ||
| 5 | -import java.sql.Connection; | ||
| 6 | -import java.sql.SQLException; | ||
| 7 | -import java.util.Collection; | ||
| 8 | - | ||
| 9 | -import org.apache.commons.dbcp.BasicDataSource; | ||
| 10 | - | ||
| 11 | -import br.gov.frameworkdemoiselle.DemoiselleException; | ||
| 12 | -import br.gov.frameworkdemoiselle.internal.configuration.JDBCConfig; | ||
| 13 | -import br.gov.frameworkdemoiselle.util.ResourceBundle; | ||
| 14 | - | ||
| 15 | -public class BasicDataSourceProxy extends BasicDataSource implements Serializable { | ||
| 16 | - | ||
| 17 | - private static final long serialVersionUID = 1L; | ||
| 18 | - | ||
| 19 | - private ResourceBundle bundle; | ||
| 20 | - | ||
| 21 | - private String dataSourceName; | ||
| 22 | - | ||
| 23 | - private JDBCConfig config; | ||
| 24 | - | ||
| 25 | - private transient BasicDataSource delegate; | ||
| 26 | - | ||
| 27 | - public BasicDataSourceProxy(String dataSourceName, JDBCConfig config, ResourceBundle bundle) { | ||
| 28 | - this.dataSourceName = dataSourceName; | ||
| 29 | - this.config = config; | ||
| 30 | - this.bundle = bundle; | ||
| 31 | - } | ||
| 32 | - | ||
| 33 | - private BasicDataSource getDelegate() { | ||
| 34 | - if (this.delegate == null) { | ||
| 35 | - BasicDataSource dataSource = new BasicDataSource(); | ||
| 36 | - | ||
| 37 | - try { | ||
| 38 | - String driver = config.getDriverClass().get(dataSourceName); | ||
| 39 | - String url = config.getUrl().get(dataSourceName); | ||
| 40 | - String username = config.getUsername().get(dataSourceName); | ||
| 41 | - String password = config.getPassword().get(dataSourceName); | ||
| 42 | - | ||
| 43 | - dataSource.setDriverClassName(driver); | ||
| 44 | - dataSource.setUrl(url); | ||
| 45 | - dataSource.setUsername(username); | ||
| 46 | - dataSource.setPassword(password); | ||
| 47 | - | ||
| 48 | - } catch (ClassCastException cause) { | ||
| 49 | - throw new DemoiselleException(bundle.getString("load-duplicated-configuration-failed"), cause); | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - delegate = dataSource; | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - return this.delegate; | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - public boolean getDefaultAutoCommit() { | ||
| 59 | - return getDelegate().getDefaultAutoCommit(); | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - public void setDefaultAutoCommit(boolean defaultAutoCommit) { | ||
| 63 | - getDelegate().setDefaultAutoCommit(defaultAutoCommit); | ||
| 64 | - } | ||
| 65 | - | ||
| 66 | - public boolean getDefaultReadOnly() { | ||
| 67 | - return getDelegate().getDefaultReadOnly(); | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - public void setDefaultReadOnly(boolean defaultReadOnly) { | ||
| 71 | - getDelegate().setDefaultReadOnly(defaultReadOnly); | ||
| 72 | - } | ||
| 73 | - | ||
| 74 | - public int getDefaultTransactionIsolation() { | ||
| 75 | - return getDelegate().getDefaultTransactionIsolation(); | ||
| 76 | - } | ||
| 77 | - | ||
| 78 | - public void setDefaultTransactionIsolation(int defaultTransactionIsolation) { | ||
| 79 | - getDelegate().setDefaultTransactionIsolation(defaultTransactionIsolation); | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - public String getDefaultCatalog() { | ||
| 83 | - return getDelegate().getDefaultCatalog(); | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - public void setDefaultCatalog(String defaultCatalog) { | ||
| 87 | - getDelegate().setDefaultCatalog(defaultCatalog); | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - public String getDriverClassName() { | ||
| 91 | - return getDelegate().getDriverClassName(); | ||
| 92 | - } | ||
| 93 | - | ||
| 94 | - public void setDriverClassName(String driverClassName) { | ||
| 95 | - getDelegate().setDriverClassName(driverClassName); | ||
| 96 | - } | ||
| 97 | - | ||
| 98 | - public ClassLoader getDriverClassLoader() { | ||
| 99 | - return getDelegate().getDriverClassLoader(); | ||
| 100 | - } | ||
| 101 | - | ||
| 102 | - public void setDriverClassLoader(ClassLoader driverClassLoader) { | ||
| 103 | - getDelegate().setDriverClassLoader(driverClassLoader); | ||
| 104 | - } | ||
| 105 | - | ||
| 106 | - public int getMaxActive() { | ||
| 107 | - return getDelegate().getMaxActive(); | ||
| 108 | - } | ||
| 109 | - | ||
| 110 | - public void setMaxActive(int maxActive) { | ||
| 111 | - getDelegate().setMaxActive(maxActive); | ||
| 112 | - } | ||
| 113 | - | ||
| 114 | - public int getMaxIdle() { | ||
| 115 | - return getDelegate().getMaxIdle(); | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - public void setMaxIdle(int maxIdle) { | ||
| 119 | - getDelegate().setMaxIdle(maxIdle); | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | - public int getMinIdle() { | ||
| 123 | - return getDelegate().getMinIdle(); | ||
| 124 | - } | ||
| 125 | - | ||
| 126 | - public void setMinIdle(int minIdle) { | ||
| 127 | - getDelegate().setMinIdle(minIdle); | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - public int getInitialSize() { | ||
| 131 | - return getDelegate().getInitialSize(); | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - public void setInitialSize(int initialSize) { | ||
| 135 | - getDelegate().setInitialSize(initialSize); | ||
| 136 | - } | ||
| 137 | - | ||
| 138 | - public long getMaxWait() { | ||
| 139 | - return getDelegate().getMaxWait(); | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - public void setMaxWait(long maxWait) { | ||
| 143 | - getDelegate().setMaxWait(maxWait); | ||
| 144 | - } | ||
| 145 | - | ||
| 146 | - public boolean isPoolPreparedStatements() { | ||
| 147 | - return getDelegate().isPoolPreparedStatements(); | ||
| 148 | - } | ||
| 149 | - | ||
| 150 | - public void setPoolPreparedStatements(boolean poolingStatements) { | ||
| 151 | - getDelegate().setPoolPreparedStatements(poolingStatements); | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - public int getMaxOpenPreparedStatements() { | ||
| 155 | - return getDelegate().getMaxOpenPreparedStatements(); | ||
| 156 | - } | ||
| 157 | - | ||
| 158 | - public void setMaxOpenPreparedStatements(int maxOpenStatements) { | ||
| 159 | - getDelegate().setMaxOpenPreparedStatements(maxOpenStatements); | ||
| 160 | - } | ||
| 161 | - | ||
| 162 | - public boolean getTestOnBorrow() { | ||
| 163 | - return getDelegate().getTestOnBorrow(); | ||
| 164 | - } | ||
| 165 | - | ||
| 166 | - public void setTestOnBorrow(boolean testOnBorrow) { | ||
| 167 | - getDelegate().setTestOnBorrow(testOnBorrow); | ||
| 168 | - } | ||
| 169 | - | ||
| 170 | - public boolean getTestOnReturn() { | ||
| 171 | - return getDelegate().getTestOnReturn(); | ||
| 172 | - } | ||
| 173 | - | ||
| 174 | - public void setTestOnReturn(boolean testOnReturn) { | ||
| 175 | - getDelegate().setTestOnReturn(testOnReturn); | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - public long getTimeBetweenEvictionRunsMillis() { | ||
| 179 | - return getDelegate().getTimeBetweenEvictionRunsMillis(); | ||
| 180 | - } | ||
| 181 | - | ||
| 182 | - public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis) { | ||
| 183 | - getDelegate().setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); | ||
| 184 | - } | ||
| 185 | - | ||
| 186 | - public int getNumTestsPerEvictionRun() { | ||
| 187 | - return getDelegate().getNumTestsPerEvictionRun(); | ||
| 188 | - } | ||
| 189 | - | ||
| 190 | - public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun) { | ||
| 191 | - getDelegate().setNumTestsPerEvictionRun(numTestsPerEvictionRun); | ||
| 192 | - } | ||
| 193 | - | ||
| 194 | - public long getMinEvictableIdleTimeMillis() { | ||
| 195 | - return getDelegate().getMinEvictableIdleTimeMillis(); | ||
| 196 | - } | ||
| 197 | - | ||
| 198 | - public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis) { | ||
| 199 | - getDelegate().setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); | ||
| 200 | - } | ||
| 201 | - | ||
| 202 | - public boolean getTestWhileIdle() { | ||
| 203 | - return getDelegate().getTestWhileIdle(); | ||
| 204 | - } | ||
| 205 | - | ||
| 206 | - public void setTestWhileIdle(boolean testWhileIdle) { | ||
| 207 | - getDelegate().setTestWhileIdle(testWhileIdle); | ||
| 208 | - } | ||
| 209 | - | ||
| 210 | - public int getNumActive() { | ||
| 211 | - return getDelegate().getNumActive(); | ||
| 212 | - } | ||
| 213 | - | ||
| 214 | - public int getNumIdle() { | ||
| 215 | - return getDelegate().getNumIdle(); | ||
| 216 | - } | ||
| 217 | - | ||
| 218 | - public String getPassword() { | ||
| 219 | - return getDelegate().getPassword(); | ||
| 220 | - } | ||
| 221 | - | ||
| 222 | - public void setPassword(String password) { | ||
| 223 | - getDelegate().setPassword(password); | ||
| 224 | - } | ||
| 225 | - | ||
| 226 | - public String getUrl() { | ||
| 227 | - return getDelegate().getUrl(); | ||
| 228 | - } | ||
| 229 | - | ||
| 230 | - public void setUrl(String url) { | ||
| 231 | - getDelegate().setUrl(url); | ||
| 232 | - } | ||
| 233 | - | ||
| 234 | - public String getUsername() { | ||
| 235 | - return getDelegate().getUsername(); | ||
| 236 | - } | ||
| 237 | - | ||
| 238 | - public void setUsername(String username) { | ||
| 239 | - getDelegate().setUsername(username); | ||
| 240 | - } | ||
| 241 | - | ||
| 242 | - public String getValidationQuery() { | ||
| 243 | - return getDelegate().getValidationQuery(); | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | - public void setValidationQuery(String validationQuery) { | ||
| 247 | - getDelegate().setValidationQuery(validationQuery); | ||
| 248 | - } | ||
| 249 | - | ||
| 250 | - public int getValidationQueryTimeout() { | ||
| 251 | - return getDelegate().getValidationQueryTimeout(); | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - public void setValidationQueryTimeout(int timeout) { | ||
| 255 | - getDelegate().setValidationQueryTimeout(timeout); | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - @SuppressWarnings("rawtypes") | ||
| 259 | - public Collection getConnectionInitSqls() { | ||
| 260 | - return getDelegate().getConnectionInitSqls(); | ||
| 261 | - } | ||
| 262 | - | ||
| 263 | - @SuppressWarnings("rawtypes") | ||
| 264 | - public void setConnectionInitSqls(Collection connectionInitSqls) { | ||
| 265 | - getDelegate().setConnectionInitSqls(connectionInitSqls); | ||
| 266 | - } | ||
| 267 | - | ||
| 268 | - public void setAccessToUnderlyingConnectionAllowed(boolean allow) { | ||
| 269 | - getDelegate().setAccessToUnderlyingConnectionAllowed(allow); | ||
| 270 | - } | ||
| 271 | - | ||
| 272 | - public Connection getConnection(String user, String pass) throws SQLException { | ||
| 273 | - return getDelegate().getConnection(user, pass); | ||
| 274 | - } | ||
| 275 | - | ||
| 276 | - public int getLoginTimeout() throws SQLException { | ||
| 277 | - return getDelegate().getLoginTimeout(); | ||
| 278 | - } | ||
| 279 | - | ||
| 280 | - public PrintWriter getLogWriter() throws SQLException { | ||
| 281 | - return getDelegate().getLogWriter(); | ||
| 282 | - } | ||
| 283 | - | ||
| 284 | - public void setLoginTimeout(int loginTimeout) throws SQLException { | ||
| 285 | - getDelegate().setLoginTimeout(loginTimeout); | ||
| 286 | - } | ||
| 287 | - | ||
| 288 | - public void setLogWriter(PrintWriter logWriter) throws SQLException { | ||
| 289 | - getDelegate().setLogWriter(logWriter); | ||
| 290 | - } | ||
| 291 | - | ||
| 292 | - public boolean getRemoveAbandoned() { | ||
| 293 | - return getDelegate().getRemoveAbandoned(); | ||
| 294 | - } | ||
| 295 | - | ||
| 296 | - public void setRemoveAbandoned(boolean removeAbandoned) { | ||
| 297 | - getDelegate().setRemoveAbandoned(removeAbandoned); | ||
| 298 | - } | ||
| 299 | - | ||
| 300 | - public int getRemoveAbandonedTimeout() { | ||
| 301 | - return getDelegate().getRemoveAbandonedTimeout(); | ||
| 302 | - } | ||
| 303 | - | ||
| 304 | - public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) { | ||
| 305 | - getDelegate().setRemoveAbandonedTimeout(removeAbandonedTimeout); | ||
| 306 | - } | ||
| 307 | - | ||
| 308 | - public boolean getLogAbandoned() { | ||
| 309 | - return getDelegate().getLogAbandoned(); | ||
| 310 | - } | ||
| 311 | - | ||
| 312 | - public void setLogAbandoned(boolean logAbandoned) { | ||
| 313 | - getDelegate().setLogAbandoned(logAbandoned); | ||
| 314 | - } | ||
| 315 | - | ||
| 316 | - public void addConnectionProperty(String name, String value) { | ||
| 317 | - getDelegate().addConnectionProperty(name, value); | ||
| 318 | - } | ||
| 319 | - | ||
| 320 | - public void removeConnectionProperty(String name) { | ||
| 321 | - getDelegate().removeConnectionProperty(name); | ||
| 322 | - } | ||
| 323 | - | ||
| 324 | - public void setConnectionProperties(String connectionProperties) { | ||
| 325 | - getDelegate().setConnectionProperties(connectionProperties); | ||
| 326 | - } | ||
| 327 | - | ||
| 328 | - public void close() throws SQLException { | ||
| 329 | - getDelegate().close(); | ||
| 330 | - } | ||
| 331 | - | ||
| 332 | - public boolean equals(Object arg0) { | ||
| 333 | - return getDelegate().equals(arg0); | ||
| 334 | - } | ||
| 335 | - | ||
| 336 | - public Connection getConnection() throws SQLException { | ||
| 337 | - return getDelegate().getConnection(); | ||
| 338 | - } | ||
| 339 | - | ||
| 340 | - public int hashCode() { | ||
| 341 | - return getDelegate().hashCode(); | ||
| 342 | - } | ||
| 343 | - | ||
| 344 | - public boolean isAccessToUnderlyingConnectionAllowed() { | ||
| 345 | - return getDelegate().isAccessToUnderlyingConnectionAllowed(); | ||
| 346 | - } | ||
| 347 | - | ||
| 348 | - public boolean isClosed() { | ||
| 349 | - return getDelegate().isClosed(); | ||
| 350 | - } | ||
| 351 | - | ||
| 352 | - public boolean isWrapperFor(Class<?> iface) throws SQLException { | ||
| 353 | - return getDelegate().isWrapperFor(iface); | ||
| 354 | - } | ||
| 355 | - | ||
| 356 | - public String toString() { | ||
| 357 | - return getDelegate().toString(); | ||
| 358 | - } | ||
| 359 | - | ||
| 360 | - public <T> T unwrap(Class<T> iface) throws SQLException { | ||
| 361 | - return getDelegate().unwrap(iface); | ||
| 362 | - } | ||
| 363 | -} |