org.apache.derby.jdbc
Class XAStatementControl

java.lang.Object
  extended byorg.apache.derby.jdbc.XAStatementControl
All Implemented Interfaces:
BrokeredStatementControl

final class XAStatementControl
extends java.lang.Object
implements BrokeredStatementControl

The Statement returned by an Connection returned by a XAConnection needs to float across the underlying real connections. We do this by implementing a wrapper statement.


Field Summary
private  BrokeredConnection applicationConnection
           
(package private)  BrokeredStatement applicationStatement
           
private  java.sql.CallableStatement realCallableStatement
           
private  EmbedConnection realConnection
           
private  java.sql.PreparedStatement realPreparedStatement
           
private  java.sql.Statement realStatement
           
private  EmbedXAConnection xaConnection
           
 
Constructor Summary
private XAStatementControl(EmbedXAConnection xaConnection)
           
(package private) XAStatementControl(EmbedXAConnection xaConnection, java.sql.CallableStatement realCallableStatement, java.lang.String sql)
           
(package private) XAStatementControl(EmbedXAConnection xaConnection, java.sql.PreparedStatement realPreparedStatement, java.lang.String sql, java.lang.Object generatedKeys)
           
(package private) XAStatementControl(EmbedXAConnection xaConnection, java.sql.Statement realStatement)
           
 
Method Summary
 void checkHoldCursors(int holdability)
          Can cursors be held across commits.
 java.sql.CallableStatement getRealCallableStatement()
          Return the real JDBC CallableStatement for the brokered statement when this is controlling a CallableStatement.
 java.sql.PreparedStatement getRealPreparedStatement()
          Return the real JDBC PreparedStatement for the brokered statement when this is controlling a PreparedStatement.
 java.sql.Statement getRealStatement()
          Return the real JDBC statement for the brokered statement when this is controlling a Statement.
 java.sql.ResultSet wrapResultSet(java.sql.ResultSet rs)
          Optionally wrap a returned ResultSet in another ResultSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

xaConnection

private final EmbedXAConnection xaConnection

applicationConnection

private final BrokeredConnection applicationConnection

applicationStatement

BrokeredStatement applicationStatement

realConnection

private EmbedConnection realConnection

realStatement

private java.sql.Statement realStatement

realPreparedStatement

private java.sql.PreparedStatement realPreparedStatement

realCallableStatement

private java.sql.CallableStatement realCallableStatement
Constructor Detail

XAStatementControl

private XAStatementControl(EmbedXAConnection xaConnection)

XAStatementControl

XAStatementControl(EmbedXAConnection xaConnection,
                   java.sql.Statement realStatement)
             throws java.sql.SQLException

XAStatementControl

XAStatementControl(EmbedXAConnection xaConnection,
                   java.sql.PreparedStatement realPreparedStatement,
                   java.lang.String sql,
                   java.lang.Object generatedKeys)
             throws java.sql.SQLException

XAStatementControl

XAStatementControl(EmbedXAConnection xaConnection,
                   java.sql.CallableStatement realCallableStatement,
                   java.lang.String sql)
             throws java.sql.SQLException
Method Detail

getRealStatement

public java.sql.Statement getRealStatement()
                                    throws java.sql.SQLException
Description copied from interface: BrokeredStatementControl
Return the real JDBC statement for the brokered statement when this is controlling a Statement.

Specified by:
getRealStatement in interface BrokeredStatementControl
Throws:
java.sql.SQLException

getRealPreparedStatement

public java.sql.PreparedStatement getRealPreparedStatement()
                                                    throws java.sql.SQLException
Description copied from interface: BrokeredStatementControl
Return the real JDBC PreparedStatement for the brokered statement when this is controlling a PreparedStatement.

Specified by:
getRealPreparedStatement in interface BrokeredStatementControl
Throws:
java.sql.SQLException

getRealCallableStatement

public java.sql.CallableStatement getRealCallableStatement()
                                                    throws java.sql.SQLException
Description copied from interface: BrokeredStatementControl
Return the real JDBC CallableStatement for the brokered statement when this is controlling a CallableStatement.

Specified by:
getRealCallableStatement in interface BrokeredStatementControl
Throws:
java.sql.SQLException

wrapResultSet

public java.sql.ResultSet wrapResultSet(java.sql.ResultSet rs)
Description copied from interface: BrokeredStatementControl
Optionally wrap a returned ResultSet in another ResultSet.

Specified by:
wrapResultSet in interface BrokeredStatementControl

checkHoldCursors

public void checkHoldCursors(int holdability)
                      throws java.sql.SQLException
Can cursors be held across commits.

Specified by:
checkHoldCursors in interface BrokeredStatementControl
Throws:
java.sql.SQLException

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.