org.apache.derby.impl.jdbc
Class EmbedConnection30

java.lang.Object
  extended by org.apache.derby.impl.jdbc.EmbedConnection
      extended by org.apache.derby.impl.jdbc.EmbedConnection30
All Implemented Interfaces:
java.sql.Connection, java.sql.Wrapper, EngineConnection
Direct Known Subclasses:
EmbedConnection40

public class EmbedConnection30
extends EmbedConnection

This class extends the EmbedConnection20 class in order to support new methods and classes that come with JDBC 3.0.

Supports

See Also:
EmbedConnection

Field Summary
 
Fields inherited from class org.apache.derby.impl.jdbc.EmbedConnection
autoCommit, dbMetadata, memoryState, needCommit, NO_MEM, rootConnection, tr
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
EmbedConnection30(EmbedConnection inputConnection)
           
EmbedConnection30(InternalDriver driver, java.lang.String url, java.util.Properties info)
           
 
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 because Derby only supports named savepoints internally) in the current transaction and returns the new Savepoint object that represents it.
 void releaseSavepoint(java.sql.Savepoint savepoint)
          Removes the given Savepoint object from the current transaction.
 void rollback(java.sql.Savepoint savepoint)
          Undoes all changes made after the given Savepoint object was set.
 java.sql.Savepoint setSavepoint()
          Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.
 java.sql.Savepoint setSavepoint(java.lang.String name)
          Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.
private  void verifySavepointArg(java.sql.Savepoint savepoint)
           
private  void verifySavepointCommandIsAllowed()
           
 
Methods inherited from class org.apache.derby.impl.jdbc.EmbedConnection
addLobFile, addLOBMapping, addLOBReference, addWarning, cancelRunningStatement, checkForTransactionInProgress, checkIfClosed, clearLOBMapping, clearWarnings, close, commit, commitIfAutoCommit, commitIfNeeded, createBlob, createClob, createStatement, createStatement, createStatement, finalize, getApplicationConnection, getAutoCommit, getCatalog, getConnectionSynchronization, getContextManager, getCurrentSchemaName, getDatabase, getDBName, getEngineType, getHoldability, getLanguageConnection, getlobHMObj, getLOBMapping, getLocalDriver, getMetaData, getPrepareIsolation, getResultSetOrderId, getTR, getTransactionIsolation, getTypeMap, getWarnings, handleException, handleException, isClosed, isInGlobalTransaction, isReadOnly, nativeSQL, needCommit, newSQLException, newSQLException, newSQLException, prepareCall, prepareCall, prepareCall, prepareMetaDataStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, removeLobFile, removeLOBMapping, resetFromPool, restoreContextStack, rollback, setApplicationConnection, setAutoCommit, setCatalog, setDrdaID, setHoldability, setInactive, setPrepareIsolation, setReadOnly, setTransactionIsolation, setTypeMap, setupContextStack, stripSubSubProtocolPrefix, toString, transactionIsIdle, xa_commit, xa_prepare, xa_rollback
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.sql.Connection
createArrayOf, createNClob, createSQLXML, createStruct, getClientInfo, getClientInfo, isValid, setClientInfo, setClientInfo
 
Methods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
 

Constructor Detail

EmbedConnection30

public EmbedConnection30(InternalDriver driver,
                         java.lang.String url,
                         java.util.Properties info)
                  throws java.sql.SQLException
Throws:
java.sql.SQLException

EmbedConnection30

public EmbedConnection30(EmbedConnection inputConnection)
Method Detail

setSavepoint

public java.sql.Savepoint setSavepoint()
                                throws java.sql.SQLException
Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.

Returns:
The new Savepoint object
Throws:
java.sql.SQLException - if a database access error occurs or this Connection object is currently in auto-commit mode

setSavepoint

public java.sql.Savepoint setSavepoint(java.lang.String name)
                                throws java.sql.SQLException
Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.

Parameters:
name - A String containing the name of the savepoint
Returns:
The new Savepoint object
Throws:
java.sql.SQLException - if a database access error occurs or this Connection object is currently in auto-commit mode

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 because Derby 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 savepoint
userSuppliedSavepointName - If true means it's a named user defined savepoint.
Returns:
The new Savepoint object
Throws:
java.sql.SQLException

rollback

public void rollback(java.sql.Savepoint savepoint)
              throws java.sql.SQLException
Undoes all changes made after the given Savepoint object was set. This method should be used only when auto-commit has been disabled.

Parameters:
savepoint - The Savepoint object to rollback to
Throws:
java.sql.SQLException - if a database access error occurs, the Savepoint object is no longer valid, or this Connection object is currently in auto-commit mode

releaseSavepoint

public void releaseSavepoint(java.sql.Savepoint savepoint)
                      throws java.sql.SQLException
Removes the given Savepoint object from the current transaction. Any reference to the savepoint after it has been removed will cause an SQLException to be thrown

Parameters:
savepoint - The Savepoint object to be removed
Throws:
java.sql.SQLException - if a database access error occurs or the given Savepoint object is not a valid savepoint in the current transaction

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

Built on Thu 2012-03-29 21:53:33+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.