|
|||||||||
| Home >> All >> org >> apache >> derby >> client >> [ am overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.derby.client.am
Class LogicalConnection

java.lang.Objectorg.apache.derby.client.am.LogicalConnection
- All Implemented Interfaces:
- java.sql.Connection
- public class LogicalConnection
- extends java.lang.Object
- implements java.sql.Connection
- extends java.lang.Object
| Field Summary | |
private Connection |
physicalConnection_
|
private org.apache.derby.client.ClientPooledConnection |
pooledConnection_
|
| Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Constructor Summary | |
LogicalConnection(Connection physicalConnection,
org.apache.derby.client.ClientPooledConnection pooledConnection)
|
|
| Method Summary | |
private void |
checkForNullPhysicalConnection()
|
void |
clearWarnings()
This method clears all warnings that have occurred on this connection. |
void |
close()
This method immediately closes this database connection. |
void |
closeWithoutRecyclingToPool()
|
void |
commit()
This method commits any SQL statements executed on this connection since the last commit or rollback. |
java.sql.Statement |
createStatement()
This method creates a new SQL statement. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
This method creates a new SQL statement with the specified type and concurrency. |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
This method creates a new SQL statement with the specified type, concurrency and holdability, instead of using the defaults. |
protected void |
finalize()
Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed. |
boolean |
getAutoCommit()
This method tests whether or not auto commit mode is currently enabled. |
java.lang.String |
getCatalog()
This method returns the name of the catalog in use by this connection, if any. |
int |
getHoldability()
Gets the default holdability of ResultSetS that are created
from StatementS using this Connection. |
java.sql.DatabaseMetaData |
getMetaData()
This method returns the meta data for this database connection. |
int |
getServerVersion()
|
int |
getTransactionIsolation()
This method returns the current transaction isolation mode. |
java.util.Map |
getTypeMap()
This method returns the mapping of SQL types to Java classes currently in use by this connection. |
java.sql.SQLWarning |
getWarnings()
This method returns the first warning that occurred on this connection, if any. |
boolean |
isClosed()
This method tests whether or not this connection has been closed. |
boolean |
isReadOnly()
This method tests whether or not this connection is in read only mode. |
java.lang.String |
nativeSQL(java.lang.String sql)
This method converts the specified generic SQL statement into the native grammer of the database this object is connected to. |
void |
nullPhysicalConnection()
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
This method creates a new CallableStatement for the
specified SQL string. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
This method creates a new CallableStatement for the
specified SQL string. |
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
This method creates a new CallableStatement for the
specified SQL string. |
PreparedStatement |
preparePositionedUpdateStatement(java.lang.String sql,
Section querySection)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
This method creates a new PreparedStatement for the specified
SQL string. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
This method creates a new PreparedStatement for the specified
SQL string. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
This method creates a new PreparedStatement for the specified
SQL string. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
|
void |
releaseSavepoint(java.sql.Savepoint savepoint)
Removes the specified savepoint from this Connection. |
void |
rollback()
This method rolls back any SQL statements executed on this connection since the last commit or rollback. |
void |
rollback(java.sql.Savepoint savepoint)
Undoes all changes made after the specified savepoint was set. |
void |
setAutoCommit(boolean autoCommit)
This method turns auto commit mode on or off. |
void |
setCatalog(java.lang.String catalog)
This method sets the name of the catalog in use by this connection. |
void |
setHoldability(int holdability)
Sets the default holdability of ResultSetS that are created
from StatementS using this Connection. |
void |
setReadOnly(boolean readOnly)
This method turns read only mode on or off. |
java.sql.Savepoint |
setSavepoint()
Creates a new unnamed savepoint for this Connection |
java.sql.Savepoint |
setSavepoint(java.lang.String name)
Creates a new savepoint with the specifiend name for this Connection. |
void |
setTransactionIsolation(int level)
This method sets the current transaction isolation mode. |
void |
setTypeMap(java.util.Map map)
This method sets the mapping table for SQL types to Java classes. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
physicalConnection_
private Connection physicalConnection_
pooledConnection_
private org.apache.derby.client.ClientPooledConnection pooledConnection_
| Constructor Detail |
LogicalConnection
public LogicalConnection(Connection physicalConnection, org.apache.derby.client.ClientPooledConnection pooledConnection) throws SqlException
| Method Detail |
finalize
protected void finalize()
throws java.lang.Throwable
- Description copied from class:
java.lang.Object - Called on an object by the Virtual Machine at most once,
at some point after the Object is determined unreachable
but before it is destroyed. You would think that this
means it eventually is called on every Object, but this is
not necessarily the case. If execution terminates
abnormally, garbage collection does not always happen.
Thus you cannot rely on this method to always work.
For finer control over garbage collection, use references
from the
java.lang.refpackage.Virtual Machines are free to not call this method if they can determine that it does nothing important; for example, if your class extends Object and overrides finalize to do simply
super.finalize().finalize() will be called by a java.lang.Thread that has no locks on any Objects, and may be called concurrently. There are no guarantees on the order in which multiple objects are finalized. This means that finalize() is usually unsuited for performing actions that must be thread-safe, and that your implementation must be use defensive programming if it is to always work.
If an Exception is thrown from finalize() during garbage collection, it will be patently ignored and the Object will still be destroyed.
It is allowed, although not typical, for user code to call finalize() directly. User invocation does not affect whether automatic invocation will occur. It is also permitted, although not recommended, for a finalize() method to "revive" an object by making it reachable from normal code again.
Unlike constructors, finalize() does not get called for an object's superclass unless the implementation specifically calls
super.finalize().The default implementation does nothing.
nullPhysicalConnection
public void nullPhysicalConnection()
close
public void close()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method immediately closes this database connection.
- Specified by:
closein interfacejava.sql.Connection
closeWithoutRecyclingToPool
public void closeWithoutRecyclingToPool()
throws SqlException
isClosed
public boolean isClosed()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method tests whether or not this connection has been closed.
- Specified by:
isClosedin interfacejava.sql.Connection
checkForNullPhysicalConnection
private void checkForNullPhysicalConnection()
throws SqlException
createStatement
public java.sql.Statement createStatement() throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new SQL statement. The default result set type
and concurrency will be used.
- Specified by:
createStatementin interfacejava.sql.Connection
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new
PreparedStatementfor the specified SQL string. This method is designed for use with parameterized statements. The default result set type and concurrency will be used.- Specified by:
prepareStatementin interfacejava.sql.Connection
preparePositionedUpdateStatement
public PreparedStatement preparePositionedUpdateStatement(java.lang.String sql, Section querySection) throws SqlException
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new
CallableStatementfor the specified SQL string. Thie method is designed to be used with stored procedures. The default result set type and concurrency will be used.- Specified by:
prepareCallin interfacejava.sql.Connection
nativeSQL
public java.lang.String nativeSQL(java.lang.String sql) throws SqlException
- Description copied from interface:
java.sql.Connection - This method converts the specified generic SQL statement into the
native grammer of the database this object is connected to.
- Specified by:
nativeSQLin interfacejava.sql.Connection
setAutoCommit
public void setAutoCommit(boolean autoCommit)
throws SqlException
- Description copied from interface:
java.sql.Connection - This method turns auto commit mode on or off. In auto commit mode,
every SQL statement is committed its own transaction. Otherwise a
transaction must be explicitly committed or rolled back.
- Specified by:
setAutoCommitin interfacejava.sql.Connection
getAutoCommit
public boolean getAutoCommit()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method tests whether or not auto commit mode is currently enabled.
In auto commit mode, every SQL statement is committed its own transaction.
Otherwise a transaction must be explicitly committed or rolled back.
- Specified by:
getAutoCommitin interfacejava.sql.Connection
commit
public void commit()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method commits any SQL statements executed on this connection since
the last commit or rollback.
- Specified by:
commitin interfacejava.sql.Connection
rollback
public void rollback()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method rolls back any SQL statements executed on this connection
since the last commit or rollback.
- Specified by:
rollbackin interfacejava.sql.Connection
setTransactionIsolation
public void setTransactionIsolation(int level)
throws SqlException
- Description copied from interface:
java.sql.Connection - This method sets the current transaction isolation mode. This must
be one of the constants defined in this interface.
- Specified by:
setTransactionIsolationin interfacejava.sql.Connection
getTransactionIsolation
public int getTransactionIsolation()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method returns the current transaction isolation mode. This will
be one of the constants defined in this interface.
- Specified by:
getTransactionIsolationin interfacejava.sql.Connection
getWarnings
public java.sql.SQLWarning getWarnings() throws SqlException
- Description copied from interface:
java.sql.Connection - This method returns the first warning that occurred on this connection,
if any. If there were any subsequence warnings, they will be chained
to the first one.
- Specified by:
getWarningsin interfacejava.sql.Connection
clearWarnings
public void clearWarnings()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method clears all warnings that have occurred on this connection.
- Specified by:
clearWarningsin interfacejava.sql.Connection
getMetaData
public java.sql.DatabaseMetaData getMetaData() throws SqlException
- Description copied from interface:
java.sql.Connection - This method returns the meta data for this database connection.
- Specified by:
getMetaDatain interfacejava.sql.Connection
setReadOnly
public void setReadOnly(boolean readOnly)
throws SqlException
- Description copied from interface:
java.sql.Connection - This method turns read only mode on or off. It may not be called while
a transaction is in progress.
- Specified by:
setReadOnlyin interfacejava.sql.Connection
isReadOnly
public boolean isReadOnly()
throws SqlException
- Description copied from interface:
java.sql.Connection - This method tests whether or not this connection is in read only mode.
- Specified by:
isReadOnlyin interfacejava.sql.Connection
setCatalog
public void setCatalog(java.lang.String catalog) throws SqlException
- Description copied from interface:
java.sql.Connection - This method sets the name of the catalog in use by this connection.
Note that this method does nothing if catalogs are not supported by
this database.
- Specified by:
setCatalogin interfacejava.sql.Connection
getCatalog
public java.lang.String getCatalog() throws SqlException
- Description copied from interface:
java.sql.Connection - This method returns the name of the catalog in use by this connection,
if any.
- Specified by:
getCatalogin interfacejava.sql.Connection
createStatement
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new SQL statement with the specified type and
concurrency. Valid values for these parameters are specified in the
ResultSetclass.- Specified by:
createStatementin interfacejava.sql.Connection
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new
PreparedStatementfor the specified SQL string. This method is designed for use with parameterized statements. The specified result set type and concurrency will be used. Valid values for these parameters are specified in theResultSetclass.- Specified by:
prepareStatementin interfacejava.sql.Connection
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new
CallableStatementfor the specified SQL string. Thie method is designed to be used with stored procedures. The specified result set type and concurrency will be used. Valid values for these parameters are specified in theResultSetclass.- Specified by:
prepareCallin interfacejava.sql.Connection
getTypeMap
public java.util.Map getTypeMap() throws SqlException
- Description copied from interface:
java.sql.Connection - This method returns the mapping of SQL types to Java classes
currently in use by this connection. This mapping will have no
entries unless they have been manually added.
- Specified by:
getTypeMapin interfacejava.sql.Connection
setTypeMap
public void setTypeMap(java.util.Map map) throws SqlException
- Description copied from interface:
java.sql.Connection - This method sets the mapping table for SQL types to Java classes.
Any entries in this map override the defaults.
- Specified by:
setTypeMapin interfacejava.sql.Connection
createStatement
public java.sql.Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new SQL statement with the specified type,
concurrency and holdability, instead of using the defaults. Valid values
for these parameters are specified in the
ResultSetclass.- Specified by:
createStatementin interfacejava.sql.Connection
prepareCall
public java.sql.CallableStatement prepareCall(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new
CallableStatementfor the specified SQL string. Thie method is designed to be used with stored procedures. The specified result set type, concurrency and holdability will be used. Valid values for these parameters are specified in theResultSetclass.- Specified by:
prepareCallin interfacejava.sql.Connection
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SqlException
- Description copied from interface:
java.sql.Connection - This method creates a new
PreparedStatementfor the specified SQL string. This method is designed for use with parameterized statements. The specified result set type, concurrency and holdability will be used. Valid values for these parameters are specified in theResultSetclass.- Specified by:
prepareStatementin interfacejava.sql.Connection
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int autoGeneratedKeys) throws SqlException
- Specified by:
prepareStatementin interfacejava.sql.Connection
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, int[] columnIndexes) throws SqlException
- Specified by:
prepareStatementin interfacejava.sql.Connection
prepareStatement
public java.sql.PreparedStatement prepareStatement(java.lang.String sql, java.lang.String[] columnNames) throws SqlException
- Specified by:
prepareStatementin interfacejava.sql.Connection
setHoldability
public void setHoldability(int holdability)
throws SqlException
- Description copied from interface:
java.sql.Connection - Sets the default holdability of
ResultSetS that are created fromStatementS using thisConnection.- Specified by:
setHoldabilityin interfacejava.sql.Connection
getHoldability
public int getHoldability()
throws SqlException
- Description copied from interface:
java.sql.Connection - Gets the default holdability of
ResultSetS that are created fromStatementS using thisConnection.- Specified by:
getHoldabilityin interfacejava.sql.Connection
setSavepoint
public java.sql.Savepoint setSavepoint() throws SqlException
- Description copied from interface:
java.sql.Connection - Creates a new unnamed savepoint for this
Connection- Specified by:
setSavepointin interfacejava.sql.Connection
setSavepoint
public java.sql.Savepoint setSavepoint(java.lang.String name) throws SqlException
- Description copied from interface:
java.sql.Connection - Creates a new savepoint with the specifiend name for this
Connection.- Specified by:
setSavepointin interfacejava.sql.Connection
rollback
public void rollback(java.sql.Savepoint savepoint) throws SqlException
- Description copied from interface:
java.sql.Connection - Undoes all changes made after the specified savepoint was set.
- Specified by:
rollbackin interfacejava.sql.Connection
releaseSavepoint
public void releaseSavepoint(java.sql.Savepoint savepoint) throws SqlException
- Description copied from interface:
java.sql.Connection - Removes the specified savepoint from this
Connection. Refering to a savepoint after it was removed is an error and will throw an SQLException.- Specified by:
releaseSavepointin interfacejava.sql.Connection
getServerVersion
public int getServerVersion()
|
|||||||||
| Home >> All >> org >> apache >> derby >> client >> [ am overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.derby.client.am.LogicalConnection