com.solarmetric.kodo.impl.jdbc.sql
Class SQLLiteral
java.lang.Object
|
+--com.solarmetric.kodo.impl.jdbc.sql.SQLLiteral
- All Implemented Interfaces:
- Serializable, SQLElement
- public class SQLLiteral
- extends Object
- implements SQLElement
This class represents a literal String that will be sent as
part of a SQLBuffer. It's value is not translatable
into a bound parameter.
- Since:
- 2.4
- See Also:
- Serialized Form
SQLLiteral
public SQLLiteral(String value)
getBoundParameter
public String getBoundParameter()
- Description copied from interface:
SQLElement
- Returns the bound parameter for inclusion on a PreparedStatement.
E.g., for a replaceable value, this would be "?", but for a literal
it would be the raw String.
- Specified by:
getBoundParameter in interface SQLElement
getUnboundParameter
public String getUnboundParameter()
- Description copied from interface:
SQLElement
- Returns the parameter as a String suitable for embedding in a
SQL Statement. This will do any disctionary-specific translation
in order to return a String suitable for sending the data
to the data store.
- Specified by:
getUnboundParameter in interface SQLElement
applyParameter
public int applyParameter(PreparedStatement ps,
int index)
throws SQLException
- We do not bind any parameters with a literal: always return 0.
- Specified by:
applyParameter in interface SQLElement
- Following copied from interface:
com.solarmetric.kodo.impl.jdbc.sql.SQLElement
- Returns:
- the number of parameters bound (typically one or 0)
toString
public String toString()
- Overrides:
toString in class Object
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.