Package org.apache.torque.sql.whereclausebuilder

## Class CombinedPreparedStatementPart

- java.lang.Object
- - org.apache.torque.sql.whereclausebuilder.CombinedPreparedStatementPart

- All Implemented Interfaces:
    `PreparedStatementPart`

      public class CombinedPreparedStatementPart
      extends Object
      implements PreparedStatementPart

  A PreparedStatementPart which consists of a list of other PreparedStatementParts.
  Version:
    $Id: $

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CombinedPreparedStatementPart()` | Constructor.
    `CombinedPreparedStatementPart​(PreparedStatementPart toAdd)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addPreparedStatementReplacement​(Object toAdd)` | Adds a PreparedStatementPart to the list of contained PreparedStatementParts, which contains only the given replacement.
    `void` | `append​(PreparedStatementPart toAdd)` | Adds a PreparedStatementPart to the list of contained PreparedStatementParts.
    `void` | `appendSql​(String sql)` | Adds a PreparedStatementPart to the list of contained PreparedStatementParts, which contains only the given sql.
    `List<Object>` | `getPreparedStatementReplacements()` | Returns the list of prepared statement replacements.
    `String` | `getSqlAsString()` | Returns the SQL of the part as String.

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

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

- - ### Constructor Detail

    - #### CombinedPreparedStatementPart

          public CombinedPreparedStatementPart()

      Constructor. Constructs an empty CombinedPreparedStatementPart.

    - #### CombinedPreparedStatementPart

          public CombinedPreparedStatementPart​(PreparedStatementPart toAdd)

      Constructor. Creates a CombinedPreparedStatementPart which contains the passed PreparedStatementPart as first part.
      Parameters:
        `toAdd` - the PreparedStatementPart to add, not null.

  - ### Method Detail

    - #### append

          public void append​(PreparedStatementPart toAdd)

      Adds a PreparedStatementPart to the list of contained PreparedStatementParts.
      Parameters:
        `toAdd` - the PreparedStatementPart to add, not null.

    - #### appendSql

          public void appendSql​(String sql)

      Adds a PreparedStatementPart to the list of contained PreparedStatementParts, which contains only the given sql.
      Parameters:
        `sql` - the sql to add, not null.

    - #### addPreparedStatementReplacement

          public void addPreparedStatementReplacement​(Object toAdd)

      Adds a PreparedStatementPart to the list of contained PreparedStatementParts, which contains only the given replacement.
      Parameters:
        `toAdd` - the replacement to add, not null.

    - #### getSqlAsString

          public String getSqlAsString()

      Returns the SQL of the part as String.
      Specified by:
        `getSqlAsString` in interface `PreparedStatementPart`
      Returns:
        the SQL, not null.

    - #### getPreparedStatementReplacements

          public List<Object> getPreparedStatementReplacements()

      Returns the list of prepared statement replacements. The returned list is unmodifiable.
      Specified by:
        `getPreparedStatementReplacements` in interface `PreparedStatementPart`
      Returns:
        the list of prepared statement replacements, not null.