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

## org.objectstyle.cayenne.access.trans
Class ProcedureTranslator

    java.lang.Object
      org.objectstyle.cayenne.access.QueryTranslator
          org.objectstyle.cayenne.access.trans.ProcedureTranslator

Direct Known Subclasses:
  HSQLDBProcedureTranslator

    public class ProcedureTranslator

extends QueryTranslator

Stored procedure query translator.

Author:
  Andrei Adamchik

Field Summary
`protected java.util.List` | `callParams`
`protected java.util.List` | `values`

Fields inherited from class org.objectstyle.cayenne.access.QueryTranslator
`adapter, connection, engine, entityResolver, query`

Constructor Summary
`ProcedureTranslator()`

Method Summary
`protected java.lang.String` | `createSqlString()` Creates an SQL String for the stored procedure call.
`java.sql.PreparedStatement` | `createStatement()` Creates PreparedStatement.
`Procedure` | `getProcedure()`
`ProcedureQuery` | `getProcedureQuery()`
`ResultDescriptor` | `getProcedureResultDescriptor()` Deprecated. Since 1.2 is unused. Instead OUTParametersReader is created inside a SQLAction.
`protected void` | `initStatement(java.sql.CallableStatement stmt)` Set IN and OUT parameters.
`protected void` | `initValues()`
`protected void` | `setInParam(java.sql.CallableStatement stmt, ProcedureParameter param, java.lang.Object val, int pos)` Sets a single IN parameter of the CallableStatement.
`protected void` | `setOutParam(java.sql.CallableStatement stmt, ProcedureParameter param, int pos)` Sets a single OUT parameter of the CallableStatement.

Methods inherited from class org.objectstyle.cayenne.access.QueryTranslator
`createStatement, getAdapter, getCon, getConnection, getEngine, getEntityResolver, getQuery, getRootDbEntity, getRootEntity, getRootInheritanceTree, setAdapter, setCon, setConnection, setEngine, setEntityResolver, setQuery`

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

Field Detail

### callParams

    protected java.util.List callParams

### values

    protected java.util.List values

Constructor Detail

### ProcedureTranslator

    public ProcedureTranslator()

Method Detail

### createSqlString

    protected java.lang.String createSqlString()

  Creates an SQL String for the stored procedure call.

### createStatement

    public java.sql.PreparedStatement createStatement()
                                               throws java.lang.Exception

  Description copied from class: `QueryTranslator`
  Creates PreparedStatement. `logLevel` parameter is supplied to allow control of logging of produced SQL.

  Specified by:
    `createStatement` in class `QueryTranslator`
  Throws:
    `java.lang.Exception`

### getProcedure

    public Procedure getProcedure()

### getProcedureQuery

    public ProcedureQuery getProcedureQuery()

### getProcedureResultDescriptor

    public ResultDescriptor getProcedureResultDescriptor()

  Deprecated. Since 1.2 is unused. Instead OUTParametersReader is created inside a SQLAction.

  Returns a result descriptor for the stored procedure OUT parameters.

### initStatement

    protected void initStatement(java.sql.CallableStatement stmt)
                          throws java.lang.Exception

  Set IN and OUT parameters.

  Throws:
    `java.lang.Exception`

### initValues

    protected void initValues()

### setInParam

    protected void setInParam(java.sql.CallableStatement stmt,
                              ProcedureParameter param,
                              java.lang.Object val,
                              int pos)
                       throws java.lang.Exception

  Sets a single IN parameter of the CallableStatement.

  Throws:
    `java.lang.Exception`

### setOutParam

    protected void setOutParam(java.sql.CallableStatement stmt,
                               ProcedureParameter param,
                               int pos)
                        throws java.lang.Exception

  Sets a single OUT parameter of the CallableStatement.

  Throws:
    `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 ObjectStyle.org All Rights Reserved.