org.apache.derby.impl.jdbc
Class EmbedConnection20
java.lang.Object
org.apache.derby.impl.jdbc.EmbedConnection
org.apache.derby.impl.jdbc.EmbedConnection20
- All Implemented Interfaces:
- java.sql.Connection
- Direct Known Subclasses:
- EmbedConnection30
- public class EmbedConnection20
- extends EmbedConnection
This class extends the EmbedConnection class in order to support new
methods and classes that come with JDBC 2.0.
- See Also:
EmbedConnection
Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Method Summary |
private java.sql.Savepoint |
commonSetSavepointCode(java.lang.String name,
boolean userSuppliedSavepointName)
Creates a savepoint with the given name(if it is a named savepoint else we will generate a name
becuase Cloudscape only supports named savepoints internally) in the current transaction and
returns the new Savepoint object that represents it. |
void |
dropAllDeclaredGlobalTempTables()
Drop all the declared global temporary tables associated with this connection. |
java.util.Map |
getTypeMap()
Get the type-map object associated with this connection.
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
|
void |
rollback(java.sql.Savepoint savepoint)
|
java.sql.Savepoint |
setSavepoint()
|
java.sql.Savepoint |
setSavepoint(java.lang.String name)
|
void |
setTypeMap(java.util.Map map)
Install a type-map object as the default type-map for
this connection.
|
private void |
verifySavepointArg(java.sql.Savepoint savepoint)
|
private void |
verifySavepointCommandIsAllowed()
|
void |
xa_commit(boolean onePhase)
|
int |
xa_prepare()
|
void |
xa_rollback()
|
Methods inherited from class org.apache.derby.impl.jdbc.EmbedConnection |
addWarning, clearWarnings, close, commit, commitIfAutoCommit, commitIfNeeded, createStatement, createStatement, createStatement, finalize, getApplicationConnection, getAutoCommit, getCatalog, getConnectionSynchronization, getContextManager, getDatabase, getDBName, getEngineType, getHoldability, getLanguageConnection, getLocalDriver, getMetaData, getPrepareIsolation, getResultSetOrderId, getTR, getTransactionIsolation, getWarnings, handleException, handleException, isClosed, isReadOnly, nativeSQL, needCommit, newSQLException, newSQLException, newSQLException, prepareCall, prepareCall, prepareCall, prepareMetaDataStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, restoreContextStack, rollback, setApplicationConnection, setAutoCommit, setCatalog, setDrdaID, setHoldability, setInactive, setPrepareIsolation, setReadOnly, setTransactionIsolation, setupContextStack, toString, transactionIsIdle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EmbedConnection20
public EmbedConnection20(Driver169 driver,
java.lang.String url,
java.util.Properties info)
throws java.sql.SQLException
EmbedConnection20
public EmbedConnection20(EmbedConnection inputConnection)
setSavepoint
public java.sql.Savepoint setSavepoint()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
setSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
rollback
public void rollback(java.sql.Savepoint savepoint)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
releaseSavepoint
public void releaseSavepoint(java.sql.Savepoint savepoint)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
dropAllDeclaredGlobalTempTables
public void dropAllDeclaredGlobalTempTables()
throws java.sql.SQLException
- Drop all the declared global temporary tables associated with this connection. This gets called
when a getConnection() is done on a PooledConnection. This will ensure all the temporary tables
declared on earlier connection handle associated with this physical database connection are dropped
before a new connection handle is issued on that same physical database connection.
- Throws:
java.sql.SQLException
getTypeMap
public java.util.Map getTypeMap()
- Get the type-map object associated with this connection.
By default, the map returned is empty.
JDBC 2.0 - java.util.Map requires JDK 1
setTypeMap
public void setTypeMap(java.util.Map map)
throws java.sql.SQLException
- Install a type-map object as the default type-map for
this connection.
JDBC 2.0 - java.util.Map requires JDK 1
- Throws:
java.sql.SQLException
- Feature not implemented for now.
xa_prepare
public final int xa_prepare()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
xa_commit
public final void xa_commit(boolean onePhase)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
xa_rollback
public final void xa_rollback()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
commonSetSavepointCode
private java.sql.Savepoint commonSetSavepointCode(java.lang.String name,
boolean userSuppliedSavepointName)
throws java.sql.SQLException
- Creates a savepoint with the given name(if it is a named savepoint else we will generate a name
becuase Cloudscape only supports named savepoints internally) in the current transaction and
returns the new Savepoint object that represents it.
- Parameters:
name
- A String containing the name of the savepoint. Will be null if this is an unnamed savepointuserSuppliedSavepointName
- If true means it's a named user defined savepoint.
- Returns:
- The new Savepoint object
- Throws:
java.sql.SQLException
verifySavepointCommandIsAllowed
private void verifySavepointCommandIsAllowed()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
verifySavepointArg
private void verifySavepointArg(java.sql.Savepoint savepoint)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.