public class JDOConnectionJDBCImpl extends JDOConnectionImpl implements Connection
nucConn
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
Constructor and Description |
---|
JDOConnectionJDBCImpl(org.datanucleus.store.NucleusConnection nconn)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
abort(Executor executor) |
void |
assertAvailable()
Assert the JDOConnection is available.
|
void |
clearWarnings()
Method to clear warnings from the connection.
|
void |
commit()
Method to commit the connection.
|
Array |
createArrayOf(String typeName,
Object[] elements) |
Blob |
createBlob() |
Clob |
createClob() |
NClob |
createNClob() |
SQLXML |
createSQLXML() |
Statement |
createStatement()
Accessor for a statement.
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
Accessor for a statement.
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Accessor for a statement.
|
Struct |
createStruct(String typeName,
Object[] attributes) |
boolean |
getAutoCommit()
Accessor for the autocommit setting.
|
String |
getCatalog()
Accessor for the catalog.
|
Properties |
getClientInfo() |
String |
getClientInfo(String name) |
int |
getHoldability()
Access the holdability of the connection.
|
DatabaseMetaData |
getMetaData()
Accessor for the database metadata.
|
int |
getNetworkTimeout() |
String |
getSchema() |
int |
getTransactionIsolation()
Accessor for the transaction isolation level.
|
Map |
getTypeMap()
Accessor for the type map.
|
SQLWarning |
getWarnings()
Accessor for the warnings.
|
boolean |
isAvailable() |
boolean |
isClosed()
Accessor for whether the connection is closed.
|
boolean |
isReadOnly()
Accessor for whether the connection is read only.
|
boolean |
isValid(int timeout) |
boolean |
isWrapperFor(Class iface) |
String |
nativeSQL(String sql)
Accessor for using native SQL.
|
CallableStatement |
prepareCall(String sql) |
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency) |
CallableStatement |
prepareCall(String arg0,
int arg1,
int arg2,
int arg3) |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String arg0,
int arg1) |
PreparedStatement |
prepareStatement(String arg0,
int[] arg1) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String arg0,
int arg1,
int arg2,
int arg3) |
PreparedStatement |
prepareStatement(String arg0,
String[] arg1) |
void |
releaseSavepoint(Savepoint pt)
Mutator to release the savepoint.
|
void |
rollback()
Method to rollback the connection.
|
void |
rollback(Savepoint pt)
Mutator to rollback the savepoint.
|
void |
setAutoCommit(boolean autoCommit)
Method to set the autocommit for the connection.
|
void |
setCatalog(String catalog)
Mutator for the catalog
|
void |
setClientInfo(Properties properties) |
void |
setClientInfo(String name,
String value) |
void |
setHoldability(int holdability)
Method to set the holdability for the connection.
|
void |
setNetworkTimeout(Executor executor,
int milliseconds) |
void |
setReadOnly(boolean readOnly)
Method to set the read-only nature for the connection.
|
Savepoint |
setSavepoint()
Mutator to set the savepoint.
|
Savepoint |
setSavepoint(String arg0) |
void |
setSchema(String schema) |
void |
setTransactionIsolation(int level)
Method to set the transaction isolation for the connection.
|
void |
setTypeMap(Map map)
Method to set the type map
|
Object |
unwrap(Class iface) |
close, getNativeConnection, throwExceptionNotAvailable, throwExceptionUnsupportedOperation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close
public JDOConnectionJDBCImpl(org.datanucleus.store.NucleusConnection nconn)
nconn
- The Nucleus Connection delegatepublic boolean isAvailable()
public int getHoldability() throws SQLException
getHoldability
in interface Connection
SQLException
- if there is a problempublic int getTransactionIsolation() throws SQLException
getTransactionIsolation
in interface Connection
SQLException
- if there is a problempublic void clearWarnings() throws SQLException
clearWarnings
in interface Connection
SQLException
- thrown if there is a problempublic void commit() throws SQLException
commit
in interface Connection
SQLException
- thrown if an error occurs.public void rollback() throws SQLException
rollback
in interface Connection
SQLException
- thrown if an error occurs.public boolean getAutoCommit() throws SQLException
getAutoCommit
in interface Connection
SQLException
- thrown if an error occurs.public boolean isClosed() throws SQLException
isClosed
in interface Connection
SQLException
- thrown if an error occurs.public boolean isReadOnly() throws SQLException
isReadOnly
in interface Connection
SQLException
- thrown if an error occurs.public void setHoldability(int holdability) throws SQLException
setHoldability
in interface Connection
holdability
- The holdabilitySQLException
- thrown if an error occurs.public void setTransactionIsolation(int level) throws SQLException
setTransactionIsolation
in interface Connection
level
- The transaction isolationSQLException
- thrown if an error occurs.public void setAutoCommit(boolean autoCommit) throws SQLException
setAutoCommit
in interface Connection
autoCommit
- Whether to autocommitSQLException
- thrown if an error occurs.public void setReadOnly(boolean readOnly) throws SQLException
setReadOnly
in interface Connection
readOnly
- whether it is read-onlySQLException
- thrown if an error occurs.public String getCatalog() throws SQLException
getCatalog
in interface Connection
SQLException
- Thrown if an error occurspublic void setCatalog(String catalog) throws SQLException
setCatalog
in interface Connection
catalog
- The catalogSQLException
- Thrown if an error occurspublic DatabaseMetaData getMetaData() throws SQLException
getMetaData
in interface Connection
SQLException
- Thrown if an error occurspublic SQLWarning getWarnings() throws SQLException
getWarnings
in interface Connection
SQLException
- Thrown if an error occurspublic Savepoint setSavepoint() throws SQLException
setSavepoint
in interface Connection
SQLException
- Thrown if an error occurspublic void releaseSavepoint(Savepoint pt) throws SQLException
releaseSavepoint
in interface Connection
pt
- The savepointSQLException
- Thrown if an error occurspublic void rollback(Savepoint pt) throws SQLException
rollback
in interface Connection
pt
- The savepointSQLException
- Thrown if an error occurspublic Statement createStatement() throws SQLException
createStatement
in interface Connection
SQLException
- Thrown if an error occurspublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement
in interface Connection
resultSetType
- type of resultsresultSetConcurrency
- The concurrencySQLException
- Thrown if an error occurspublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
createStatement
in interface Connection
resultSetType
- type of resultsresultSetConcurrency
- The concurrencyresultSetHoldability
- The holdabilitySQLException
- Thrown if an error occurspublic Map getTypeMap() throws SQLException
getTypeMap
in interface Connection
SQLException
- Thrown if an error occurspublic void setTypeMap(Map map) throws SQLException
setTypeMap
in interface Connection
map
- The type mapSQLException
- Thrown if an error occurspublic String nativeSQL(String sql) throws SQLException
nativeSQL
in interface Connection
sql
- The sqlSQLException
- Thrown if an error occurspublic CallableStatement prepareCall(String sql) throws SQLException
prepareCall
in interface Connection
SQLException
public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareCall
in interface Connection
SQLException
public CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3) throws SQLException
prepareCall
in interface Connection
SQLException
public PreparedStatement prepareStatement(String sql) throws SQLException
prepareStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String arg0, int arg1) throws SQLException
prepareStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
prepareStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String arg0, int arg1, int arg2, int arg3) throws SQLException
prepareStatement
in interface Connection
SQLException
public PreparedStatement prepareStatement(String arg0, int[] arg1) throws SQLException
prepareStatement
in interface Connection
SQLException
public Savepoint setSavepoint(String arg0) throws SQLException
setSavepoint
in interface Connection
SQLException
public PreparedStatement prepareStatement(String arg0, String[] arg1) throws SQLException
prepareStatement
in interface Connection
SQLException
public void assertAvailable()
public Array createArrayOf(String typeName, Object[] elements) throws SQLException
createArrayOf
in interface Connection
SQLException
public Blob createBlob() throws SQLException
createBlob
in interface Connection
SQLException
public Clob createClob() throws SQLException
createClob
in interface Connection
SQLException
public Struct createStruct(String typeName, Object[] attributes) throws SQLException
createStruct
in interface Connection
SQLException
public Properties getClientInfo() throws SQLException
getClientInfo
in interface Connection
SQLException
public String getClientInfo(String name) throws SQLException
getClientInfo
in interface Connection
SQLException
public boolean isValid(int timeout) throws SQLException
isValid
in interface Connection
SQLException
public void setClientInfo(Properties properties) throws SQLClientInfoException
setClientInfo
in interface Connection
SQLClientInfoException
public void setClientInfo(String name, String value) throws SQLClientInfoException
setClientInfo
in interface Connection
SQLClientInfoException
public NClob createNClob() throws SQLException
createNClob
in interface Connection
SQLException
public SQLXML createSQLXML() throws SQLException
createSQLXML
in interface Connection
SQLException
public boolean isWrapperFor(Class iface) throws SQLException
isWrapperFor
in interface Wrapper
SQLException
public Object unwrap(Class iface) throws SQLException
unwrap
in interface Wrapper
SQLException
public void setSchema(String schema) throws SQLException
setSchema
in interface Connection
SQLException
public String getSchema() throws SQLException
getSchema
in interface Connection
SQLException
public void abort(Executor executor) throws SQLException
abort
in interface Connection
SQLException
public void setNetworkTimeout(Executor executor, int milliseconds) throws SQLException
setNetworkTimeout
in interface Connection
SQLException
public int getNetworkTimeout() throws SQLException
getNetworkTimeout
in interface Connection
SQLException
Copyright © 2020. All rights reserved.