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.trans.ProcedureTranslator

Direct Known Subclasses:
  HSQLDBProcedureTranslator

    public class ProcedureTranslator

extends java.lang.Object

Stored procedure query translator.

Field Summary
`protected DbAdapter` | `adapter`
`protected java.util.List<ProcedureParameter>` | `callParams`
`protected java.sql.Connection` | `connection`
`protected EntityResolver` | `entityResolver`
`protected JdbcEventLogger` | `logger`
`protected ProcedureQuery` | `query`
`protected java.util.List<java.lang.Object>` | `values`

Constructor Summary
`ProcedureTranslator()`

Method Summary
`protected java.lang.String` | `createSqlString()` Creates an SQL String for the stored procedure call.
`java.sql.PreparedStatement` | `createStatement()` Creates and binds a PreparedStatement to execute query SQL via JDBC.
`JdbcEventLogger` | `getJdbcEventLogger()`
`Procedure` | `getProcedure()`
`ProcedureQuery` | `getProcedureQuery()`
`protected void` | `initStatement(java.sql.CallableStatement stmt)` Set IN and OUT parameters.
`protected void` | `initValues()`
`void` | `setAdapter(DbAdapter adapter)`
`void` | `setConnection(java.sql.Connection connection)`
`void` | `setEntityResolver(EntityResolver entityResolver)`
`protected void` | `setInParam(java.sql.CallableStatement stmt, ProcedureParameter param, java.lang.Object val, int pos)` Sets a single IN parameter of the CallableStatement.
`void` | `setJdbcEventLogger(JdbcEventLogger logger)`
`protected void` | `setOutParam(java.sql.CallableStatement stmt, ProcedureParameter param, int pos)` Sets a single OUT parameter of the CallableStatement.
`void` | `setQuery(ProcedureQuery query)`

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

Field Detail

### query

    protected ProcedureQuery query

### connection

    protected java.sql.Connection connection

### adapter

    protected DbAdapter adapter

### entityResolver

    protected EntityResolver entityResolver

### callParams

    protected java.util.List<ProcedureParameter> callParams

### values

    protected java.util.List<java.lang.Object> values

### logger

    protected JdbcEventLogger logger

Constructor Detail

### ProcedureTranslator

    public ProcedureTranslator()

Method Detail

### setQuery

    public void setQuery(ProcedureQuery query)

### setConnection

    public void setConnection(java.sql.Connection connection)

### setAdapter

    public void setAdapter(DbAdapter adapter)

### setJdbcEventLogger

    public void setJdbcEventLogger(JdbcEventLogger logger)

  Since:
    3.1

### getJdbcEventLogger

    public JdbcEventLogger getJdbcEventLogger()

  Since:
    3.1

### setEntityResolver

    public void setEntityResolver(EntityResolver entityResolver)

  Since:
    1.2

### 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

  Creates and binds a PreparedStatement to execute query SQL via JDBC.

  Throws:
    `java.lang.Exception`

### getProcedure

    public Procedure getProcedure()

### getProcedureQuery

    public ProcedureQuery getProcedureQuery()

### 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 | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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