Package org.apache.torque.criteria
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 Summary
ConstructorsConstructorDescriptionDefault constructor, creates an empty PreparedStatementPart.PreparedStatementPartImpl(String sql, Object... preparedStatementReplacements) Constructor, creates a pre-filled PreparedStatementPartImpl.Copy-Constructor. -
Method Summary
Modifier and TypeMethodDescriptionappend(PreparedStatementPart toAppend) Appends another PreparedStatementPart to this part.Appends a SqlEnum to this part.booleanReturns the list of prepared statement replacements.getSql()Returns the SQL of the part.Returns the SQL of the part as String.inthashCode()toString()
-
Constructor Details
-
PreparedStatementPartImpl
public PreparedStatementPartImpl()Default constructor, creates an empty PreparedStatementPart. -
PreparedStatementPartImpl
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
Copy-Constructor.- Parameters:
toCopy- the PreparedStatementPart to copy, not null.
-
-
Method Details
-
getSql
Returns the SQL of the part.- Returns:
- the SQL as mutable StringBuilder, not null.
-
getSqlAsString
Returns the SQL of the part as String.- Specified by:
getSqlAsStringin interfacePreparedStatementPart- Returns:
- the SQL, not null.
-
getPreparedStatementReplacements
Returns the list of prepared statement replacements.- Specified by:
getPreparedStatementReplacementsin interfacePreparedStatementPart- 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
Appends a SqlEnum to this part.- Parameters:
toAppend- the part to append, not null.- Returns:
- this PreparedStatementPart (with toAppend appended).
-
hashCode
public int hashCode() -
equals
-
toString
-