|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.api.jdo.JDOConnectionImpl
org.datanucleus.store.rdbms.JDOConnectionImpl
public final class JDOConnectionImpl
Implementation of a JDO connection for RDBMS datastores. Provides a wrapper to a java.sql.Connection in this implementation.
| Field Summary | |
|---|---|
protected static org.datanucleus.util.Localiser |
LOCALISER
Localisation utility for output messages |
| Fields inherited from class org.datanucleus.api.jdo.JDOConnectionImpl |
|---|
nucConn |
| Fields inherited from interface java.sql.Connection |
|---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Constructor Summary | |
|---|---|
JDOConnectionImpl(org.datanucleus.store.NucleusConnection nconn)
Constructor. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class org.datanucleus.api.jdo.JDOConnectionImpl |
|---|
close, getNativeConnection, throwExceptionNotAvailable, throwExceptionUnsupportedOperation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.Connection |
|---|
close |
| Methods inherited from interface org.datanucleus.store.NucleusConnection |
|---|
close, getNativeConnection |
| Field Detail |
|---|
protected static final org.datanucleus.util.Localiser LOCALISER
| Constructor Detail |
|---|
public JDOConnectionImpl(org.datanucleus.store.NucleusConnection nconn)
nconn - The Nucleus Connection delegate| Method Detail |
|---|
public boolean isAvailable()
isAvailable in interface org.datanucleus.store.NucleusConnection
public int getHoldability()
throws SQLException
getHoldability in interface ConnectionSQLException - if there is a problem
public int getTransactionIsolation()
throws SQLException
getTransactionIsolation in interface ConnectionSQLException - if there is a problem
public void clearWarnings()
throws SQLException
clearWarnings in interface ConnectionSQLException - thrown if there is a problem
public void commit()
throws SQLException
commit in interface ConnectionSQLException - thrown if an error occurs.
public void rollback()
throws SQLException
rollback in interface ConnectionSQLException - thrown if an error occurs.
public boolean getAutoCommit()
throws SQLException
getAutoCommit in interface ConnectionSQLException - thrown if an error occurs.
public boolean isClosed()
throws SQLException
isClosed in interface ConnectionSQLException - thrown if an error occurs.
public boolean isReadOnly()
throws SQLException
isReadOnly in interface ConnectionSQLException - thrown if an error occurs.
public void setHoldability(int holdability)
throws SQLException
setHoldability in interface Connectionholdability - The holdability
SQLException - thrown if an error occurs.
public void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface Connectionlevel - The transaction isolation
SQLException - thrown if an error occurs.
public void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionautoCommit - Whether to autocommit
SQLException - thrown if an error occurs.
public void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface ConnectionreadOnly - whether it is read-only
SQLException - thrown if an error occurs.
public String getCatalog()
throws SQLException
getCatalog in interface ConnectionSQLException - Thrown if an error occurs
public void setCatalog(String catalog)
throws SQLException
setCatalog in interface Connectioncatalog - The catalog
SQLException - Thrown if an error occurs
public DatabaseMetaData getMetaData()
throws SQLException
getMetaData in interface ConnectionSQLException - Thrown if an error occurs
public SQLWarning getWarnings()
throws SQLException
getWarnings in interface ConnectionSQLException - Thrown if an error occurs
public Savepoint setSavepoint()
throws SQLException
setSavepoint in interface ConnectionSQLException - Thrown if an error occurs
public void releaseSavepoint(Savepoint pt)
throws SQLException
releaseSavepoint in interface Connectionpt - The savepoint
SQLException - Thrown if an error occurs
public void rollback(Savepoint pt)
throws SQLException
rollback in interface Connectionpt - The savepoint
SQLException - Thrown if an error occurs
public Statement createStatement()
throws SQLException
createStatement in interface ConnectionSQLException - Thrown if an error occurs
public Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws SQLException
createStatement in interface ConnectionresultSetType - type of resultsresultSetConcurrency - The concurrency
SQLException - Thrown if an error occurs
public Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws SQLException
createStatement in interface ConnectionresultSetType - type of resultsresultSetConcurrency - The concurrencyresultSetHoldability - The holdability
SQLException - Thrown if an error occurs
public Map getTypeMap()
throws SQLException
getTypeMap in interface ConnectionSQLException - Thrown if an error occurs
public void setTypeMap(Map map)
throws SQLException
setTypeMap in interface Connectionmap - The type map
SQLException - Thrown if an error occurs
public String nativeSQL(String sql)
throws SQLException
nativeSQL in interface Connectionsql - The sql
SQLException - Thrown if an error occurs
public CallableStatement prepareCall(String sql)
throws SQLException
prepareCall in interface ConnectionSQLException
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
prepareCall in interface ConnectionSQLException
public CallableStatement prepareCall(String arg0,
int arg1,
int arg2,
int arg3)
throws SQLException
prepareCall in interface ConnectionSQLException
public PreparedStatement prepareStatement(String sql)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String arg0,
int arg1)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String arg0,
int arg1,
int arg2,
int arg3)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String arg0,
int[] arg1)
throws SQLException
prepareStatement in interface ConnectionSQLException
public Savepoint setSavepoint(String arg0)
throws SQLException
setSavepoint in interface ConnectionSQLException
public PreparedStatement prepareStatement(String arg0,
String[] arg1)
throws SQLException
prepareStatement in interface ConnectionSQLExceptionpublic void assertAvailable()
Exception - if the connection is no longer available
public Array createArrayOf(String typeName,
Object[] elements)
throws SQLException
createArrayOf in interface ConnectionSQLException
public Blob createBlob()
throws SQLException
createBlob in interface ConnectionSQLException
public Clob createClob()
throws SQLException
createClob in interface ConnectionSQLException
public Struct createStruct(String typeName,
Object[] attributes)
throws SQLException
createStruct in interface ConnectionSQLException
public Properties getClientInfo()
throws SQLException
getClientInfo in interface ConnectionSQLException
public String getClientInfo(String name)
throws SQLException
getClientInfo in interface ConnectionSQLException
public boolean isValid(int timeout)
throws SQLException
isValid in interface ConnectionSQLException
public void setClientInfo(Properties properties)
throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoException
public void setClientInfo(String name,
String value)
throws SQLClientInfoException
setClientInfo in interface ConnectionSQLClientInfoException
public NClob createNClob()
throws SQLException
createNClob in interface ConnectionSQLException
public SQLXML createSQLXML()
throws SQLException
createSQLXML in interface ConnectionSQLException
public boolean isWrapperFor(Class iface)
throws SQLException
isWrapperFor in interface WrapperSQLException
public Object unwrap(Class iface)
throws SQLException
unwrap in interface WrapperSQLException
public void setSchema(String schema)
throws SQLException
SQLException
public String getSchema()
throws SQLException
SQLException
public void abort(Executor executor)
throws SQLException
SQLException
public void setNetworkTimeout(Executor executor,
int milliseconds)
throws SQLException
SQLException
public int getNetworkTimeout()
throws SQLException
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||