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.torque.criteria
Class PreparedStatementPart

    java.lang.Object
      org.apache.torque.criteria.PreparedStatementPart

All Implemented Interfaces:
  Serializable

    public class PreparedStatementPart

extends Object
implements Serializable

The rendered SQL for a part of a prepared statement.

Version:
  $Id: PreparedStatementPart.java 1448414 2013-02-20 21:06:35Z tfischer $
See Also:
  Serialized Form

Constructor Summary
`PreparedStatementPart()` Default constructor, creates an empty PreparedStatementPart.
`PreparedStatementPart(String sql, Object... preparedStatementReplacements)` Constructor, creates a pre-filled PreparedStatementPart.

Method Summary
`PreparedStatementPart` | `append(PreparedStatementPart toAppend)` Appends another PreparedStatementPart to this part.
`PreparedStatementPart` | `append(SqlEnum toAppend)` Appends a SqlEnum to this part.
`boolean` | `equals(Object obj)`
`List<Object>` | `getPreparedStatementReplacements()` Returns the list of prepared statement replacements.
`StringBuilder` | `getSql()` Returns the SQL of the part.
`String` | `getSqlAsString()` Returns the SQL of the part as String.
`int` | `hashCode()`
`String` | `toString()`

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

Constructor Detail

### PreparedStatementPart

    public PreparedStatementPart()

  Default constructor, creates an empty PreparedStatementPart.

### PreparedStatementPart

    public PreparedStatementPart(String sql,
                                 Object... preparedStatementReplacements)

  Constructor, creates a pre-filled PreparedStatementPart.

  Parameters:
    `sql` - The sql to fill into the sql buffer initially, or null.
    `preparedStatementReplacements` - the prepared statement replacements to start with, or null.

Method Detail

### getSql

    public StringBuilder getSql()

  Returns the SQL of the part.

  Returns:
    the SQL as mutable StringBuilder, not null.

### getSqlAsString

    public String getSqlAsString()

  Returns the SQL of the part as String.

  Returns:
    the SQL, not null.

### getPreparedStatementReplacements

    public List<Object> getPreparedStatementReplacements()

  Returns the list of prepared statement replacements.

  Returns:
    the modifiable list of prepared statement replacements, not null.

### append

    public PreparedStatementPart append(PreparedStatementPart toAppend)

  Appends another PreparedStatementPart to this part.

  Parameters:
    `toAppend` - the part to append, not null.
  Returns:
    this PreparedStatementPart (with toAppend appended).

### append

    public PreparedStatementPart append(SqlEnum toAppend)

  Appends a SqlEnum to this part.

  Parameters:
    `toAppend` - the part to append, not null.
  Returns:
    this PreparedStatementPart (with toAppend appended).

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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 © 2000-2013 The Apache Software Foundation. All Rights Reserved.