org.apache.derby.iapi.jdbc
Class BrokeredConnection40

java.lang.Object
  extended by org.apache.derby.iapi.jdbc.BrokeredConnection
      extended by org.apache.derby.iapi.jdbc.BrokeredConnection30
          extended by org.apache.derby.iapi.jdbc.BrokeredConnection40
All Implemented Interfaces:
java.sql.Connection, java.sql.Wrapper, EngineConnection

public class BrokeredConnection40
extends BrokeredConnection30


Field Summary
 
Fields inherited from class org.apache.derby.iapi.jdbc.BrokeredConnection
control, stateHoldability
 
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
 
Constructor Summary
BrokeredConnection40(BrokeredConnectionControl control)
          Creates a new instance of BrokeredConnection40
 
Method Summary
 java.sql.Array createArrayOf(java.lang.String typeName, java.lang.Object[] elements)
           
 java.sql.Blob createBlob()
          Constructs an object that implements the Blob interface.
 java.sql.Clob createClob()
          Constructs an object that implements the Clob interface.
 java.sql.NClob createNClob()
           
 java.sql.SQLXML createSQLXML()
           
 java.sql.Struct createStruct(java.lang.String typeName, java.lang.Object[] attributes)
           
 java.util.Properties getClientInfo()
          getClientInfo forwards to the real connection.
 java.lang.String getClientInfo(java.lang.String name)
          getClientInfo forwards to the real connection.
 java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
          Returns the type map for this connection.
 boolean isValid(int timeout)
          Checks if the connection has not been closed and is still valid.
 boolean isWrapperFor(java.lang.Class<?> interfaces)
          Returns false unless interfaces is implemented
 BrokeredStatement newBrokeredStatement(BrokeredStatementControl statementControl)
          returns an instance of JDBC4.0 speccific class BrokeredStatement40
 BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl, java.lang.String sql)
           
 BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl, java.lang.String sql, java.lang.Object generatedKeys)
           
 void setClientInfo(java.util.Properties properties)
          setClientInfo forwards to the real connection.
 void setClientInfo(java.lang.String name, java.lang.String value)
          setClientInfo forwards to the real connection.
<T> T
unwrap(java.lang.Class<T> interfaces)
          Returns this if this class implements the interface
 
Methods inherited from class org.apache.derby.iapi.jdbc.BrokeredConnection30
createStatement, prepareCall, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, setHoldability, setSavepoint, setSavepoint
 
Methods inherited from class org.apache.derby.iapi.jdbc.BrokeredConnection
addWarning, checkIfClosed, clearLOBMapping, clearWarnings, close, commit, createStatement, createStatement, getAutoCommit, getCatalog, getCurrentSchemaName, getHoldability, getIsolationUptoDate, getLOBMapping, getMetaData, getPrepareIsolation, getRealConnection, getTransactionIsolation, getWarnings, isClosed, isInGlobalTransaction, isReadOnly, nativeSQL, notifyException, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, resetFromPool, rollback, setAutoCommit, setCatalog, setDrdaID, setPrepareIsolation, setReadOnly, setState, setTransactionIsolation, setTypeMap, statementHoldabilityCheck, syncState, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BrokeredConnection40

public BrokeredConnection40(BrokeredConnectionControl control)
Creates a new instance of BrokeredConnection40

Method Detail

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
Constructs an object that implements the Blob interface. The object returned initially contains no data. The setBinaryStream and setBytes methods of the Blob interface may be used to add data to the Blob.

Returns:
An object that implements the Blob interface
Throws:
java.sql.SQLException - if an object that implements the Blob interface can not be constructed, this method is called on a closed connection or a database access error occurs.

createClob

public java.sql.Clob createClob()
                         throws java.sql.SQLException
Constructs an object that implements the Clob interface. The object returned initially contains no data. The setAsciiStream, setCharacterStream and setString methods of the Clob interface may be used to add data to the Clob.

Returns:
An object that implements the Clob interface
Throws:
java.sql.SQLException - if an object that implements the Clob interface can not be constructed, this method is called on a closed connection or a database access error occurs.

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

isValid

public final 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.

setClientInfo

public void setClientInfo(java.lang.String name,
                          java.lang.String value)
                   throws java.sql.SQLClientInfoException
setClientInfo forwards to the real connection.

Parameters:
name - the property key String
value - the property value String
Throws:
java.sql.SQLClientInfoException - if the property is not supported or the real connection could not be obtained.

setClientInfo

public void setClientInfo(java.util.Properties properties)
                   throws java.sql.SQLClientInfoException
setClientInfo forwards to the real connection. If the call to getRealConnection fails the resulting SQLException is wrapped in a SQLClientInfoException to satisfy the specified signature.

Parameters:
properties - a Properties object with the properties to set.
Throws:
java.sql.SQLClientInfoException - if the properties are not supported or the real connection could not be obtained.

getClientInfo

public java.lang.String getClientInfo(java.lang.String name)
                               throws java.sql.SQLException
getClientInfo forwards to the real connection.

Parameters:
name - a String that is the property key to get.
Returns:
a String that is returned from the real connection.
Throws:
java.sql.SQLException - if a database access error occurs.

getClientInfo

public java.util.Properties getClientInfo()
                                   throws java.sql.SQLException
getClientInfo forwards to the real connection.

Returns:
a Properties object from the real connection.
Throws:
java.sql.SQLException - if a database access error occurs.

newBrokeredStatement

public final BrokeredStatement newBrokeredStatement(BrokeredStatementControl statementControl)
                                             throws java.sql.SQLException
returns an instance of JDBC4.0 speccific class BrokeredStatement40

Overrides:
newBrokeredStatement in class BrokeredConnection
Parameters:
statementControl - BrokeredStatementControl
Returns:
an instance of BrokeredStatement40 throws java.sql.SQLException
Throws:
java.sql.SQLException

newBrokeredStatement

public final BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl,
                                                            java.lang.String sql,
                                                            java.lang.Object generatedKeys)
                                                     throws java.sql.SQLException
Overrides:
newBrokeredStatement in class BrokeredConnection30
Throws:
java.sql.SQLException

newBrokeredStatement

public final BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl,
                                                            java.lang.String sql)
                                                     throws java.sql.SQLException
Overrides:
newBrokeredStatement in class BrokeredConnection30
Throws:
java.sql.SQLException

getTypeMap

public final java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap()
                                                                    throws java.sql.SQLException
Returns the type map for this connection.

Specified by:
getTypeMap in interface java.sql.Connection
Overrides:
getTypeMap in class BrokeredConnection
Returns:
type map for this connection
Throws:
java.sql.SQLException - if a database access error occurs

isWrapperFor

public final boolean isWrapperFor(java.lang.Class<?> interfaces)
                           throws java.sql.SQLException
Returns false unless interfaces is implemented

Parameters:
interfaces - a Class defining an interface.
Returns:
true if this implements the interface or directly or indirectly wraps an object that does.
Throws:
java.sql.SQLException - if an error occurs while determining whether this is a wrapper for an object with the given interface.

unwrap

public final <T> T unwrap(java.lang.Class<T> interfaces)
               throws java.sql.SQLException
Returns this if this class implements the interface

Parameters:
interfaces - a Class defining an interface
Returns:
an object that implements the interface
Throws:
java.sql.SQLExption - if no object if found that implements the interface
java.sql.SQLException

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

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