com.github.asteraether.tomlib.sqlib.SQLDelegatedDatabase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of TomLib Show documentation
Show all versions of TomLib Show documentation
A simple collection of usefull things in java.
The newest version!
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.github.asteraether.tomlib.sqlib;
import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.DatabaseMetaData;
import java.sql.NClob;
import java.sql.PreparedStatement;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
import java.sql.SQLWarning;
import java.sql.SQLXML;
import java.sql.Savepoint;
import java.sql.Statement;
import java.sql.Struct;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;
/**
*
* @author Thomas
*/
public class SQLDelegatedDatabase extends SQLDatabase {
/**
*
* @param driverClass
* @param driver
* @throws ClassNotFoundException
*/
public SQLDelegatedDatabase(String driverClass, String driver) throws ClassNotFoundException {
super(driverClass, driver);
}
/**
*
* @param prop
* @throws ClassNotFoundException
*/
public SQLDelegatedDatabase(SQLDatabaseProperties prop) throws ClassNotFoundException {
super(prop);
}
/**
*
* @return @throws SQLException
*/
public Statement createStatement() throws SQLException {
return conn.createStatement();
}
/**
*
* @param sql
* @return
* @throws SQLException
*/
public PreparedStatement prepareStatement(String sql) throws SQLException {
return conn.prepareStatement(sql);
}
/**
*
* @param sql
* @return
* @throws SQLException
*/
public CallableStatement prepareCall(String sql) throws SQLException {
return conn.prepareCall(sql);
}
/**
*
* @param sql
* @return
* @throws SQLException
*/
public String nativeSQL(String sql) throws SQLException {
return conn.nativeSQL(sql);
}
/**
*
* @param autoCommit
* @throws SQLException
*/
public void setAutoCommit(boolean autoCommit) throws SQLException {
conn.setAutoCommit(autoCommit);
}
/**
*
* @return @throws SQLException
*/
public boolean getAutoCommit() throws SQLException {
return conn.getAutoCommit();
}
/**
*
* @throws SQLException
*/
public void commit() throws SQLException {
conn.commit();
}
/**
*
* @throws SQLException
*/
public void rollback() throws SQLException {
conn.rollback();
}
/**
*
* @return @throws SQLException
*/
public boolean isClosed() throws SQLException {
return conn.isClosed();
}
/**
*
* @return @throws SQLException
*/
public DatabaseMetaData getMetaData() throws SQLException {
return conn.getMetaData();
}
/**
*
* @param readOnly
* @throws SQLException
*/
public void setReadOnly(boolean readOnly) throws SQLException {
conn.setReadOnly(readOnly);
}
/**
*
* @return @throws SQLException
*/
public boolean isReadOnly() throws SQLException {
return conn.isReadOnly();
}
/**
*
* @param catalog
* @throws SQLException
*/
public void setCatalog(String catalog) throws SQLException {
conn.setCatalog(catalog);
}
/**
*
* @return @throws SQLException
*/
public String getCatalog() throws SQLException {
return conn.getCatalog();
}
/**
*
* @param level
* @throws SQLException
*/
public void setTransactionIsolation(int level) throws SQLException {
conn.setTransactionIsolation(level);
}
/**
*
* @return @throws SQLException
*/
public int getTransactionIsolation() throws SQLException {
return conn.getTransactionIsolation();
}
/**
*
* @return @throws SQLException
*/
public SQLWarning getWarnings() throws SQLException {
return conn.getWarnings();
}
/**
*
* @throws SQLException
*/
public void clearWarnings() throws SQLException {
conn.clearWarnings();
}
/**
*
* @param resultSetType
* @param resultSetConcurrency
* @return
* @throws SQLException
*/
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException {
return conn.createStatement(resultSetType, resultSetConcurrency);
}
/**
*
* @param sql
* @param resultSetType
* @param resultSetConcurrency
* @return
* @throws SQLException
*/
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
return conn.prepareStatement(sql, resultSetType, resultSetConcurrency);
}
/**
*
* @param sql
* @param resultSetType
* @param resultSetConcurrency
* @return
* @throws SQLException
*/
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException {
return conn.prepareCall(sql, resultSetType, resultSetConcurrency);
}
/**
*
* @return @throws SQLException
*/
public Map> getTypeMap() throws SQLException {
return conn.getTypeMap();
}
/**
*
* @param map
* @throws SQLException
*/
public void setTypeMap(Map> map) throws SQLException {
conn.setTypeMap(map);
}
/**
*
* @param holdability
* @throws SQLException
*/
public void setHoldability(int holdability) throws SQLException {
conn.setHoldability(holdability);
}
/**
*
* @return @throws SQLException
*/
public int getHoldability() throws SQLException {
return conn.getHoldability();
}
/**
*
* @return @throws SQLException
*/
public Savepoint setSavepoint() throws SQLException {
return conn.setSavepoint();
}
/**
*
* @param name
* @return
* @throws SQLException
*/
public Savepoint setSavepoint(String name) throws SQLException {
return conn.setSavepoint(name);
}
/**
*
* @param savepoint
* @throws SQLException
*/
public void rollback(Savepoint savepoint) throws SQLException {
conn.rollback(savepoint);
}
/**
*
* @param savepoint
* @throws SQLException
*/
public void releaseSavepoint(Savepoint savepoint) throws SQLException {
conn.releaseSavepoint(savepoint);
}
/**
*
* @param resultSetType
* @param resultSetConcurrency
* @param resultSetHoldability
* @return
* @throws SQLException
*/
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
return conn.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability);
}
/**
*
* @param sql
* @param resultSetType
* @param resultSetConcurrency
* @param resultSetHoldability
* @return
* @throws SQLException
*/
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
return conn.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
}
/**
*
* @param sql
* @param resultSetType
* @param resultSetConcurrency
* @param resultSetHoldability
* @return
* @throws SQLException
*/
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
return conn.prepareCall(sql, resultSetType, resultSetConcurrency, resultSetHoldability);
}
/**
*
* @param sql
* @param autoGeneratedKeys
* @return
* @throws SQLException
*/
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
return conn.prepareStatement(sql, autoGeneratedKeys);
}
/**
*
* @param sql
* @param columnIndexes
* @return
* @throws SQLException
*/
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException {
return conn.prepareStatement(sql, columnIndexes);
}
/**
*
* @param sql
* @param columnNames
* @return
* @throws SQLException
*/
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException {
return conn.prepareStatement(sql, columnNames);
}
/**
*
* @return @throws SQLException
*/
public Clob createClob() throws SQLException {
return conn.createClob();
}
/**
*
* @return @throws SQLException
*/
public Blob createBlob() throws SQLException {
return conn.createBlob();
}
/**
*
* @return @throws SQLException
*/
public NClob createNClob() throws SQLException {
return conn.createNClob();
}
/**
*
* @return @throws SQLException
*/
public SQLXML createSQLXML() throws SQLException {
return conn.createSQLXML();
}
/**
*
* @param timeout
* @return
* @throws SQLException
*/
public boolean isValid(int timeout) throws SQLException {
return conn.isValid(timeout);
}
/**
*
* @param name
* @param value
* @throws SQLClientInfoException
*/
public void setClientInfo(String name, String value) throws SQLClientInfoException {
conn.setClientInfo(name, value);
}
/**
*
* @param properties
* @throws SQLClientInfoException
*/
public void setClientInfo(Properties properties) throws SQLClientInfoException {
conn.setClientInfo(properties);
}
/**
*
* @param name
* @return
* @throws SQLException
*/
public String getClientInfo(String name) throws SQLException {
return conn.getClientInfo(name);
}
/**
*
* @return @throws SQLException
*/
public Properties getClientInfo() throws SQLException {
return conn.getClientInfo();
}
/**
*
* @param typeName
* @param elements
* @return
* @throws SQLException
*/
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
return conn.createArrayOf(typeName, elements);
}
/**
*
* @param typeName
* @param attributes
* @return
* @throws SQLException
*/
public Struct createStruct(String typeName, Object[] attributes) throws SQLException {
return conn.createStruct(typeName, attributes);
}
/**
*
* @param schema
* @throws SQLException
*/
public void setSchema(String schema) throws SQLException {
conn.setSchema(schema);
}
/**
*
* @return @throws SQLException
*/
public String getSchema() throws SQLException {
return conn.getSchema();
}
/**
*
* @param executor
* @throws SQLException
*/
public void abort(Executor executor) throws SQLException {
conn.abort(executor);
}
/**
*
* @param executor
* @param milliseconds
* @throws SQLException
*/
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException {
conn.setNetworkTimeout(executor, milliseconds);
}
/**
*
* @return @throws SQLException
*/
public int getNetworkTimeout() throws SQLException {
return conn.getNetworkTimeout();
}
}