Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.access.jdbc
Class ProcedureAction

    java.lang.Object
      org.apache.cayenne.access.jdbc.BaseSQLAction
          org.apache.cayenne.access.jdbc.ProcedureAction

All Implemented Interfaces:
  SQLAction

Direct Known Subclasses:
  SQLServerProcedureAction

    public class ProcedureAction

extends BaseSQLAction

A SQLAction that runs a stored procedure. Note that ProcedureAction has internal state and is not thread-safe.

Since:
  1.2
Author:
  Andrus Adamchik

Field Summary
`protected int` | `processedResultSets` Holds a number of ResultSets processed by the action.
`protected ProcedureQuery` | `query`

Fields inherited from class org.apache.cayenne.access.jdbc.BaseSQLAction
`adapter, entityResolver`

Constructor Summary
`ProcedureAction(ProcedureQuery query, DbAdapter adapter, EntityResolver entityResolver)`

Method Summary
`protected ProcedureTranslator` | `createTranslator(java.sql.Connection connection)` Returns the ProcedureTranslator to use for this ProcedureAction.
`protected RowDescriptor` | `describeResultSet(java.sql.ResultSet resultSet, int setIndex)` Creates a RowDescriptor for result set.
`protected Procedure` | `getProcedure()` Returns stored procedure for an internal query.
`void` | `performAction(java.sql.Connection connection, OperationObserver observer)` Executes a query using a strategy defined by the implementation.
`protected void` | `readProcedureOutParameters(java.sql.CallableStatement statement, OperationObserver delegate)` Helper method that reads OUT parameters of a CallableStatement.

Methods inherited from class org.apache.cayenne.access.jdbc.BaseSQLAction
`getAdapter, getEntityResolver, readResultSet`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### query

    protected ProcedureQuery query

### processedResultSets

    protected int processedResultSets

  Holds a number of ResultSets processed by the action. This value is reset to zero on every "performAction" call.

Constructor Detail

### ProcedureAction

    public ProcedureAction(ProcedureQuery query,
                           DbAdapter adapter,
                           EntityResolver entityResolver)

Method Detail

### performAction

    public void performAction(java.sql.Connection connection,
                              OperationObserver observer)
                       throws java.sql.SQLException,
                              java.lang.Exception

  Description copied from interface: `SQLAction`
  Executes a query using a strategy defined by the implementation.

  Throws:
    `java.sql.SQLException`
    `java.lang.Exception`

### createTranslator

    protected ProcedureTranslator createTranslator(java.sql.Connection connection)

  Returns the ProcedureTranslator to use for this ProcedureAction.

  Parameters:
    `connection` - JDBC connection

### describeResultSet

    protected RowDescriptor describeResultSet(java.sql.ResultSet resultSet,
                                              int setIndex)

  Creates a RowDescriptor for result set.

  Parameters:
    `resultSet` - JDBC ResultSet
    `setIndex` - a zero-based index of the ResultSet in the query results.

### getProcedure

    protected Procedure getProcedure()

  Returns stored procedure for an internal query.

### readProcedureOutParameters

    protected void readProcedureOutParameters(java.sql.CallableStatement statement,
                                              OperationObserver delegate)
                                       throws java.sql.SQLException,
                                              java.lang.Exception

  Helper method that reads OUT parameters of a CallableStatement.

  Throws:
    `java.sql.SQLException`
    `java.lang.Exception`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.