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

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

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

Direct Known Subclasses:
  HSQLDBProcedureTranslator

    public class ProcedureTranslator

extends QueryTranslator

Stored procedure query translator.

Author:
  Andrus Adamchik

Field Summary
`protected List<ProcedureParameter>` | `callParams`
`protected List` | `values`

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

Constructor Summary
`ProcedureTranslator()`

Method Summary
`protected String` | `createSqlString()` Creates an SQL String for the stored procedure call.
`PreparedStatement` | `createStatement()` Creates PreparedStatement.
`Procedure` | `getProcedure()`
`ProcedureQuery` | `getProcedureQuery()`
`protected void` | `initStatement(CallableStatement stmt)` Set IN and OUT parameters.
`protected void` | `initValues()`
`protected void` | `setInParam(CallableStatement stmt, ProcedureParameter param, Object val, int pos)` Sets a single IN parameter of the CallableStatement.
`protected void` | `setOutParam(CallableStatement stmt, ProcedureParameter param, int pos)` Sets a single OUT parameter of the CallableStatement.

Methods inherited from class org.apache.cayenne.access.QueryTranslator
`getAdapter, getConnection, getEntityResolver, getQuery, getRootDbEntity, getRootEntity, getRootInheritanceTree, setAdapter, setConnection, setEntityResolver, setQuery`

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

Field Detail

### callParams

    protected List<ProcedureParameter> callParams

### values

    protected List values

Constructor Detail

### ProcedureTranslator

    public ProcedureTranslator()

Method Detail

### createSqlString

    protected String createSqlString()

  Creates an SQL String for the stored procedure call.

### createStatement

    public PreparedStatement createStatement()
                                      throws 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:
    `Exception`

### getProcedure

    public Procedure getProcedure()

### getProcedureQuery

    public ProcedureQuery getProcedureQuery()

### initStatement

    protected void initStatement(CallableStatement stmt)
                          throws Exception

  Set IN and OUT parameters.

  Throws:
    `Exception`

### initValues

    protected void initValues()

### setInParam

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

  Sets a single IN parameter of the CallableStatement.

  Throws:
    `Exception`

### setOutParam

    protected void setOutParam(CallableStatement stmt,
                               ProcedureParameter param,
                               int pos)
                        throws Exception

  Sets a single OUT parameter of the CallableStatement.

  Throws:
    `Exception`

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

Copyright © 2001-2008 Apache Cayenne. All Rights Reserved.