Class PreparedStatementPartImpl

java.lang.Object
org.apache.torque.criteria.PreparedStatementPartImpl
All Implemented Interfaces:
Serializable, PreparedStatementPart

public class PreparedStatementPartImpl extends Object implements PreparedStatementPart, Serializable
Modifiable implementation of the PreparedStatementPart interface.
Version:
$Id: PreparedStatementPart.java 1701510 2015-09-06 18:45:05Z tfischer $
See Also:
  • Constructor Details

    • PreparedStatementPartImpl

      public PreparedStatementPartImpl()
      Default constructor, creates an empty PreparedStatementPart.
    • PreparedStatementPartImpl

      public PreparedStatementPartImpl(String sql, Object... preparedStatementReplacements)
      Constructor, creates a pre-filled PreparedStatementPartImpl.
      Parameters:
      sql - The sql to fill into the sql buffer initially, or null.
      preparedStatementReplacements - the prepared statement replacements to start with, or null.
    • PreparedStatementPartImpl

      public PreparedStatementPartImpl(PreparedStatementPart toCopy)
      Copy-Constructor.
      Parameters:
      toCopy - the PreparedStatementPart to copy, not null.
  • Method Details

    • 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.
      Specified by:
      getSqlAsString in interface PreparedStatementPart
      Returns:
      the SQL, not null.
    • getPreparedStatementReplacements

      public List<Object> getPreparedStatementReplacements()
      Returns the list of prepared statement replacements.
      Specified by:
      getPreparedStatementReplacements in interface PreparedStatementPart
      Returns:
      the modifiable list of prepared statement replacements, not null.
    • append

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

      public PreparedStatementPartImpl 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