This class defines a Request object. This basically carries the SQL statement
and the SQL template if this is a PreparedStatement.
author: Emmanuel Cecchet version: 1.0
Constructor Summary
public
Request(String sqlTemplate, String parameters, boolean escapeProcessing, int timeoutInSeconds)
getSqlShortForm(int nbOfCharacters) Get a short form of this request if the SQL statement exceeds
nbOfCharacters.
Parameters: nbOfCharacters - number of characters to include in the short form.
sendToStream(DriverBufferedOutputStream out) Serialize the request on the output stream by sending only the needed
parameters to reconstruct it on the controller.
final public void
setEscapeProcessing(boolean escapeProcessing) Sets the escapeProcessing value.
public Request(String sqlTemplate, String parameters, boolean escapeProcessing, int timeoutInSeconds)(Code)
Creates a new Request object
Parameters: sqlTemplate - the SQL template (using ? as parameter placeholders) ornull Parameters: parameters - the prepared statement parameters Parameters: escapeProcessing - Should the backend driver do escape processingbefore sending to the database? Parameters: timeoutInSeconds - Timeout for this request in seconds, value 0 meansno timeout
Creates a new Request object, deserializing it from an input
stream. Has to mirror the serialization method below.
Parameters: in - the input stream to read from throws: IOException - if a network error occurs
Get a short form of this request if the SQL statement exceeds
nbOfCharacters.
Parameters: nbOfCharacters - number of characters to include in the short form. the nbOfCharacters first characters of the SQL statement
Serialize the request on the output stream by sending only the needed
parameters to reconstruct it on the controller. Has to mirror the
deserialization method above.
Parameters: out - destination DriverBufferedOutputStream throws: IOException - if fails
setEscapeProcessing
final public void setEscapeProcessing(boolean escapeProcessing)(Code)
Sets the escapeProcessing value.
Parameters: escapeProcessing - The escapeProcessing to set.