org.apache.derby.client.am
Class LogicalConnection40
java.lang.Object
org.apache.derby.client.am.LogicalConnection
org.apache.derby.client.am.LogicalConnection40
- All Implemented Interfaces:
- java.sql.Connection, java.sql.Wrapper
- Direct Known Subclasses:
- CachingLogicalConnection40
public class LogicalConnection40
- extends LogicalConnection
A simple delegation wrapper handle for a physical connection.
This class only contains JDBC 4.0 specific methods.
NOTE: All non-implemented JDBC 4.0 methods are located here, but when they
are implemented, they should be moved to the superclass if possible.
| Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Methods inherited from class org.apache.derby.client.am.LogicalConnection |
checkForNullPhysicalConnection, clearWarnings, close, closeWithoutRecyclingToPool, commit, createStatement, createStatement, createStatement, finalize, getAutoCommit, getCatalog, getHoldability, getMetaData, getRealMetaDataObject, getSchema, getServerVersion, getTransactionID, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, notifyException, nullPhysicalConnection, prepareCall, prepareCall, prepareCall, preparePositionedUpdateStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogicalConnection40
public LogicalConnection40(Connection physicalConnection,
ClientPooledConnection pooledConnection)
throws SqlException
- Throws:
SqlException
createArrayOf
public java.sql.Array createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createBlob
public java.sql.Blob createBlob()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createClob
public java.sql.Clob createClob()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createNClob
public java.sql.NClob createNClob()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createSQLXML
public java.sql.SQLXML createSQLXML()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
createStruct
public java.sql.Struct createStruct(java.lang.String typeName,
java.lang.Object[] attributes)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getClientInfo
public java.util.Properties getClientInfo()
throws java.sql.SQLException
getClientInfo forwards to
physicalConnection_.
getClientInfo always returns an empty
Properties object since Derby doesn't support
ClientInfoProperties.
- Returns:
- an empty
Properties object
- Throws:
java.sql.SQLException - if an error occurs
getClientInfo
public java.lang.String getClientInfo(java.lang.String name)
throws java.sql.SQLException
getClientInfo forwards to
physicalConnection_. Always returns a null
String since Derby does not support
ClientInfoProperties.
- Parameters:
name - a property key to get String
- Returns:
- a property value
String
- Throws:
java.sql.SQLException - if an error occurs
newLogicalDatabaseMetaData
protected LogicalDatabaseMetaData newLogicalDatabaseMetaData()
throws java.sql.SQLException
- Returns a newly created logical database metadata object.
- Overrides:
newLogicalDatabaseMetaData in class LogicalConnection
- Returns:
- A logical database metadata object for JDBC 4 environments.
- Throws:
java.sql.SQLException
isValid
public boolean isValid(int timeout)
throws java.sql.SQLException
- Checks if the connection has not been closed and is still valid.
The validity is checked by running a simple query against the
database.
- Parameters:
timeout - The time in seconds to wait for the database
operation used to validate the connection to complete. If the
timeout period expires before the operation completes, this
method returns false. A value of 0 indicates a timeout is not
applied to the database operation.
- Returns:
- true if the connection is valid, false otherwise
- Throws:
java.sql.SQLException - if the call on the physical connection throws an
exception.
isWrapperFor
public boolean isWrapperFor(java.lang.Class<?> interfaces)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
setClientInfo
public void setClientInfo(java.util.Properties properties)
throws java.sql.SQLClientInfoException
setClientInfo forwards to
physicalConnection_.
- Parameters:
properties - a Properties object with the
properties to set
- Throws:
java.sql.SQLClientInfoException - if an error occurs
setClientInfo
public void setClientInfo(java.lang.String name,
java.lang.String value)
throws java.sql.SQLClientInfoException
setClientInfo forwards to
physicalConnection_.
- Parameters:
name - a property key Stringvalue - a property value String
- Throws:
java.sql.SQLException - if an error occurs
java.sql.SQLClientInfoException
unwrap
public <T> T unwrap(java.lang.Class<T> interfaces)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
abort
public void abort(java.util.concurrent.Executor executor)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getNetworkTimeout
public int getNetworkTimeout()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
setNetworkTimeout
public void setNetworkTimeout(java.util.concurrent.Executor executor,
int milliseconds)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.