public class TorqueConnectionImpl extends Object implements TorqueConnection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Constructor and Description |
---|
TorqueConnectionImpl(Connection con)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
abort(Executor executor) |
void |
clearWarnings() |
void |
close() |
void |
commit() |
Array |
createArrayOf(String typeName,
Object[] elements) |
Blob |
createBlob() |
Clob |
createClob() |
NClob |
createNClob() |
SQLXML |
createSQLXML() |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
Struct |
createStruct(String typeName,
Object[] attributes) |
boolean |
getAutoCommit() |
String |
getCatalog() |
Properties |
getClientInfo() |
String |
getClientInfo(String name) |
int |
getHoldability() |
DatabaseMetaData |
getMetaData() |
int |
getNetworkTimeout() |
String |
getSchema() |
int |
getTransactionIsolation() |
Map<String,Class<?>> |
getTypeMap() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isCommitted()
Has Transaction.commit() been called successfully on
this connection?
|
boolean |
isReadOnly() |
boolean |
isRolledBack()
Has Transaction.rollback() been called successfully on
this connection?
|
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(Class<?> iface) |
String |
nativeSQL(String sql) |
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
void |
releaseSavepoint(Savepoint savepoint) |
void |
rollback() |
void |
rollback(Savepoint savepoint) |
void |
setAutoCommit(boolean autoCommit) |
void |
setCatalog(String catalog) |
void |
setClientInfo(Properties properties) |
void |
setClientInfo(String name,
String value) |
void |
setCommitted(boolean committed)
Called by TransactionManagerImpl.commit() to track state
|
void |
setHoldability(int holdability) |
void |
setNetworkTimeout(Executor executor,
int milliseconds) |
void |
setReadOnly(boolean readOnly) |
void |
setRolledBack(boolean rolledBack)
Called by TransactionManagerImpl.rollback() to track state
|
Savepoint |
setSavepoint() |
Savepoint |
setSavepoint(String name) |
void |
setSchema(String schema) |
void |
setTransactionIsolation(int level) |
void |
setTypeMap(Map<String,Class<?>> map) |
<T> T |
unwrap(Class<T> iface) |
public TorqueConnectionImpl(Connection con)
con
- Connection objectpublic void setCommitted(boolean committed)
setCommitted
in interface TorqueConnection
committed
- the committed state to setpublic boolean isCommitted()
isCommitted
in interface TorqueConnection
public void setRolledBack(boolean rolledBack)
setRolledBack
in interface TorqueConnection
rolledBack
- the rolledBack state to setpublic boolean isRolledBack()
isRolledBack
in interface TorqueConnection
public <T> T unwrap(Class<T> iface) throws SQLException
unwrap
in interface Wrapper
SQLException
Wrapper.unwrap(java.lang.Class)
public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
Wrapper.isWrapperFor(java.lang.Class)
public Statement createStatement() throws SQLException
createStatement
in interface Connection
SQLException
Connection.createStatement()
public PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement
in interface Connection
SQLException
Connection.prepareStatement(java.lang.String)
public CallableStatement prepareCall(String sql) throws SQLException
prepareCall
in interface Connection
SQLException
Connection.prepareCall(java.lang.String)
public String nativeSQL(String sql) throws SQLException
nativeSQL
in interface Connection
SQLException
Connection.nativeSQL(java.lang.String)
public void setAutoCommit(boolean autoCommit) throws SQLException
setAutoCommit
in interface Connection
SQLException
Connection.setAutoCommit(boolean)
public boolean getAutoCommit() throws SQLException
getAutoCommit
in interface Connection
SQLException
Connection.getAutoCommit()
public void commit() throws SQLException
commit
in interface Connection
SQLException
Connection.commit()
public void rollback() throws SQLException
rollback
in interface Connection
SQLException
Connection.rollback()
public void close() throws TorqueException
close
in interface AutoCloseable
close
in interface Connection
close
in interface TorqueConnection
TorqueException
Connection.close()
public boolean isClosed() throws SQLException
isClosed
in interface Connection
SQLException
Connection.isClosed()
public DatabaseMetaData getMetaData() throws SQLException
getMetaData
in interface Connection
SQLException
Connection.getMetaData()
public void setReadOnly(boolean readOnly) throws SQLException
setReadOnly
in interface Connection
SQLException
Connection.setReadOnly(boolean)
public boolean isReadOnly() throws SQLException
isReadOnly
in interface Connection
SQLException
Connection.isReadOnly()
public void setCatalog(String catalog) throws SQLException
setCatalog
in interface Connection
SQLException
Connection.setCatalog(java.lang.String)
public String getCatalog() throws SQLException
getCatalog
in interface Connection
SQLException
Connection.getCatalog()
public void setTransactionIsolation(int level) throws SQLException
setTransactionIsolation
in interface Connection
SQLException
Connection.setTransactionIsolation(int)
public int getTransactionIsolation() throws SQLException
getTransactionIsolation
in interface Connection
SQLException
Connection.getTransactionIsolation()
public SQLWarning getWarnings() throws SQLException
getWarnings
in interface Connection
SQLException
Connection.getWarnings()
public void clearWarnings() throws SQLException
clearWarnings
in interface Connection
SQLException
Connection.clearWarnings()
public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement
in interface Connection
SQLException
Connection.createStatement(int, int)
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement
in interface Connection
SQLException
Connection.prepareStatement(java.lang.String, int, int)
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall
in interface Connection
SQLException
Connection.prepareCall(java.lang.String, int, int)
public Map<String,Class<?>> getTypeMap() throws SQLException
getTypeMap
in interface Connection
SQLException
Connection.getTypeMap()
public void setTypeMap(Map<String,Class<?>> map) throws SQLException
setTypeMap
in interface Connection
SQLException
Connection.setTypeMap(java.util.Map)
public void setHoldability(int holdability) throws SQLException
setHoldability
in interface Connection
SQLException
Connection.setHoldability(int)
public int getHoldability() throws SQLException
getHoldability
in interface Connection
SQLException
Connection.getHoldability()
public Savepoint setSavepoint() throws SQLException
setSavepoint
in interface Connection
SQLException
Connection.setSavepoint()
public Savepoint setSavepoint(String name) throws SQLException
setSavepoint
in interface Connection
SQLException
Connection.setSavepoint(java.lang.String)
public void rollback(Savepoint savepoint) throws SQLException
rollback
in interface Connection
SQLException
Connection.rollback(java.sql.Savepoint)
public void releaseSavepoint(Savepoint savepoint) throws SQLException
releaseSavepoint
in interface Connection
SQLException
Connection.releaseSavepoint(java.sql.Savepoint)
public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement
in interface Connection
SQLException
Connection.createStatement(int, int, int)
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareStatement
in interface Connection
SQLException
Connection.prepareStatement(java.lang.String, int, int, int)
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
prepareCall
in interface Connection
SQLException
Connection.prepareCall(java.lang.String, int, int, int)
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
prepareStatement
in interface Connection
SQLException
Connection.prepareStatement(java.lang.String, int)
public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
prepareStatement
in interface Connection
SQLException
Connection.prepareStatement(java.lang.String, int[])
public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
prepareStatement
in interface Connection
SQLException
Connection.prepareStatement(java.lang.String, java.lang.String[])
public Clob createClob() throws SQLException
createClob
in interface Connection
SQLException
Connection.createClob()
public Blob createBlob() throws SQLException
createBlob
in interface Connection
SQLException
Connection.createBlob()
public NClob createNClob() throws SQLException
createNClob
in interface Connection
SQLException
Connection.createNClob()
public SQLXML createSQLXML() throws SQLException
createSQLXML
in interface Connection
SQLException
Connection.createSQLXML()
public boolean isValid(int timeout) throws SQLException
isValid
in interface Connection
SQLException
Connection.isValid(int)
public void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo
in interface Connection
SQLClientInfoException
Connection.setClientInfo(java.lang.String, java.lang.String)
public void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo
in interface Connection
SQLClientInfoException
Connection.setClientInfo(java.util.Properties)
public String getClientInfo(String name) throws SQLException
getClientInfo
in interface Connection
SQLException
Connection.getClientInfo(java.lang.String)
public Properties getClientInfo() throws SQLException
getClientInfo
in interface Connection
SQLException
Connection.getClientInfo()
public Array createArrayOf(String typeName, Object[] elements) throws SQLException
createArrayOf
in interface Connection
SQLException
Connection.createArrayOf(java.lang.String, java.lang.Object[])
public Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct
in interface Connection
SQLException
Connection.createStruct(java.lang.String, java.lang.Object[])
public void setSchema(String schema) throws SQLException
setSchema
in interface Connection
SQLException
Connection.setSchema(java.lang.String)
public String getSchema() throws SQLException
getSchema
in interface Connection
SQLException
Connection.getSchema()
public void abort(Executor executor) throws SQLException
abort
in interface Connection
SQLException
Connection.abort(java.util.concurrent.Executor)
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
setNetworkTimeout
in interface Connection
SQLException
Connection.setNetworkTimeout(java.util.concurrent.Executor, int)
public int getNetworkTimeout() throws SQLException
getNetworkTimeout
in interface Connection
SQLException
Connection.getNetworkTimeout()
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.