org.apache.cayenne.access.jdbc

## Class SQLStatement

- java.lang.Object
- - org.apache.cayenne.access.jdbc.SQLStatement

-     public class SQLStatement
      extends Object

  A PreparedStatement descriptor containing a String of SQL and an array of parameters. SQLStatement is essentially a "compiled" version of any single query.
  Since:
    1.1

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ParameterBinding[]` | `bindings`
    `protected ColumnDescriptor[]` | `resultColumns`
    `protected String` | `sql`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SQLStatement()`
    `SQLStatement(String sql, ColumnDescriptor[] resultColumns, ParameterBinding[] bindings)`
    `SQLStatement(String sql, ParameterBinding[] bindings)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ParameterBinding[]` | `getBindings()`
    `ColumnDescriptor[]` | `getResultColumns()`
    `String` | `getSql()`
    `void` | `setBindings(ParameterBinding[] bindings)`
    `void` | `setResultColumns(ColumnDescriptor[] descriptors)`
    `void` | `setSql(String string)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### sql

          protected String sql

    - #### bindings

          protected ParameterBinding[] bindings

    - #### resultColumns

          protected ColumnDescriptor[] resultColumns

  - ### Constructor Detail

    - #### SQLStatement

          public SQLStatement()

    - #### SQLStatement

          public SQLStatement(String sql,
                      ParameterBinding[] bindings)

    - #### SQLStatement

          public SQLStatement(String sql,
                      ColumnDescriptor[] resultColumns,
                      ParameterBinding[] bindings)

      Since:
        1.2

  - ### Method Detail

    - #### getResultColumns

          public ColumnDescriptor[] getResultColumns()

      Since:
        1.2

    - #### setResultColumns

          public void setResultColumns(ColumnDescriptor[] descriptors)

      Since:
        1.2

    - #### getBindings

          public ParameterBinding[] getBindings()

    - #### getSql

          public String getSql()

    - #### setBindings

          public void setBindings(ParameterBinding[] bindings)

    - #### setSql

          public void setSql(String string)

Copyright © 2001–2014 Apache Cayenne. All rights reserved.