|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.client.am.Connection
org.apache.derby.client.net.NetConnection
org.apache.derby.client.net.NetConnection40
public class NetConnection40
Field Summary | |
---|---|
private java.sql.PreparedStatement |
isValidStmt
Prepared statement that is used each time isValid() is called on this connection. |
Fields inherited from class org.apache.derby.client.net.NetConnection |
---|
cnntkn_, crrtkn_, currXACallInfoOffset_, extnam_, indoubtTransactions_, msgutil, netAgent_, pendingEndXACallinfoOffset_, prddta_, publicKey_, readOnlyTransaction_, securityMechanism_, sourceSeed_, targetAgent_, targetCmnappc_, targetCmntcpip_, targetExtnam_, targetPublicKey_, targetRdb_, targetRsyncmgr_, targetSecmec_, targetSecmgr_, targetSeed_, targetSrvclsnm_, targetSrvnam_, targetSrvrlslv_, targetSyncptmgr_, targetXamgr_, xares_ |
Fields inherited from class org.apache.derby.client.am.Connection |
---|
agent_, autoCommit_, clientSSLMode_, commBufferSize_, databaseMetaData_, databaseName_, dataSource_, dncGeneratedSavepointId_, dncGeneratedSavepointNamePrefix__, encryptionManager_, inUnitOfWork_, isXAConnection_, jdbcReadOnly_, loginTimeout_, open_, portNumber_, productID_, resetConnectionAtFirstSql_, retrieveMessageText_, serverNameIP_, user_, XA_T0_NOT_ASSOCIATED, XA_T1_ASSOCIATED, xaHostVersion_ |
Fields inherited from interface java.sql.Connection |
---|
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
Constructor Summary | |
---|---|
NetConnection40(NetLogWriter netLogWriter,
ClientBaseDataSource dataSource,
java.lang.String user,
java.lang.String password)
|
|
NetConnection40(NetLogWriter netLogWriter,
int driverManagerLoginTimeout,
java.lang.String serverName,
int portNumber,
java.lang.String databaseName,
java.util.Properties properties)
|
|
NetConnection40(NetLogWriter netLogWriter,
java.lang.String ipaddr,
int portNumber,
ClientBaseDataSource dataSource,
boolean isXAConn)
|
|
NetConnection40(NetLogWriter netLogWriter,
java.lang.String databaseName,
java.util.Properties properties)
|
|
NetConnection40(NetLogWriter netLogWriter,
java.lang.String user,
java.lang.String password,
ClientBaseDataSource dataSource,
int rmId,
boolean isXAConn)
|
|
NetConnection40(NetLogWriter netLogWriter,
java.lang.String user,
java.lang.String password,
ClientBaseDataSource dataSource,
int rmId,
boolean isXAConn,
ClientPooledConnection cpc)
The constructor for the NetConnection40 class which contains implementations of JDBC 4.0 specific methods in the java.sql.Connection interface. |
Method Summary | ||
---|---|---|
void |
close()
Close the connection and release its resources. |
|
java.sql.Array |
createArrayOf(java.lang.String typeName,
java.lang.Object[] elements)
|
|
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 always returns an empty
Properties object since Derby doesn't support
ClientInfoProperties. |
|
java.lang.String |
getClientInfo(java.lang.String name)
getClientInfo always returns a
null String since Derby doesn't support
ClientInfoProperties. |
|
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 |
|
void |
setClientInfo(java.util.Properties properties)
setClientInfo will throw a
SQLClientInfoException uless the properties
paramenter is empty, since Derby does not support any
properties. |
|
void |
setClientInfo(java.lang.String name,
java.lang.String value)
setClientInfo will always throw a
SQLClientInfoException since Derby does not support
any properties. |
|
|
unwrap(java.lang.Class<T> interfaces)
Returns this if this class implements the interface |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.sql.PreparedStatement isValidStmt
Constructor Detail |
---|
public NetConnection40(NetLogWriter netLogWriter, java.lang.String databaseName, java.util.Properties properties) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, ClientBaseDataSource dataSource, java.lang.String user, java.lang.String password) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, int driverManagerLoginTimeout, java.lang.String serverName, int portNumber, java.lang.String databaseName, java.util.Properties properties) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, java.lang.String ipaddr, int portNumber, ClientBaseDataSource dataSource, boolean isXAConn) throws SqlException
SqlException
public NetConnection40(NetLogWriter netLogWriter, java.lang.String user, java.lang.String password, ClientBaseDataSource dataSource, int rmId, boolean isXAConn, ClientPooledConnection cpc) throws SqlException
this
on to the associated
prepared statement object thus enabling the prepared statement object
to inturn raise the statement events to the ClientPooledConnection object.
netLogWriter
- NetLogWriter object associated with this connection.user
- user id for this connection.password
- password for this connection.dataSource
- The DataSource object passed from the PooledConnection
object from which this constructor was called.rmId
- The Resource manager ID for XA ConnectionsisXAConn
- true if this is a XA connection.cpc
- The ClientPooledConnection object from which this
NetConnection constructor was called. This is used
to pass StatementEvents back to the pooledConnection
object.
SqlException
Method Detail |
---|
public java.sql.Array createArrayOf(java.lang.String typeName, java.lang.Object[] elements) throws java.sql.SQLException
java.sql.SQLException
public java.sql.NClob createNClob() throws java.sql.SQLException
java.sql.SQLException
public java.sql.SQLXML createSQLXML() throws java.sql.SQLException
java.sql.SQLException
public java.sql.Struct createStruct(java.lang.String typeName, java.lang.Object[] attributes) throws java.sql.SQLException
java.sql.SQLException
public boolean isValid(int timeout) throws java.sql.SQLException
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.
java.sql.SQLException
- if the parameter value is illegal or if a
database error has occuredpublic void close() throws java.sql.SQLException
close
in interface java.sql.Connection
close
in class NetConnection
java.sql.SQLException
- if a database-access error occurs.public void setClientInfo(java.lang.String name, java.lang.String value) throws java.sql.SQLClientInfoException
setClientInfo
will always throw a
SQLClientInfoException
since Derby does not support
any properties.
name
- a property key String
value
- a property value String
java.sql.SQLException
- always.
java.sql.SQLClientInfoException
public void setClientInfo(java.util.Properties properties) throws java.sql.SQLClientInfoException
setClientInfo
will throw a
SQLClientInfoException
uless the properties
paramenter is empty, since Derby does not support any
properties. All the property keys in the
properties
parameter are added to failedProperties
of the exception thrown, with REASON_UNKNOWN_PROPERTY as the
value.
properties
- a Properties
object with the
properties to set.
java.sql.SQLClientInfoException
- unless the properties
parameter is null or empty.public java.lang.String getClientInfo(java.lang.String name) throws java.sql.SQLException
getClientInfo
always returns a
null String
since Derby doesn't support
ClientInfoProperties.
name
- a String
value
null String
value
java.sql.SQLException
- if the connection is closed.public java.util.Properties getClientInfo() throws java.sql.SQLException
getClientInfo
always returns an empty
Properties
object since Derby doesn't support
ClientInfoProperties.
Properties
object.
java.sql.SQLException
- if the connection is closed.public final java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap() throws java.sql.SQLException
getTypeMap
in interface java.sql.Connection
getTypeMap
in class Connection
java.sql.SQLException
- if a database access error occurspublic boolean isWrapperFor(java.lang.Class<?> interfaces) throws java.sql.SQLException
interfaces
is implemented
interfaces
- a Class defining an interface.
java.sql.SQLException
- if an error occurs while determining
whether this is a wrapper for an object
with the given interface.public <T> T unwrap(java.lang.Class<T> interfaces) throws java.sql.SQLException
this
if this class implements the interface
interfaces
- a Class defining an interface
java.sql.SQLException
- if no object if found that implements the
interface
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |