org.objectweb.cjdbc.sql
Class UnknownRequest

java.lang.Object
  extended byorg.objectweb.cjdbc.sql.AbstractRequest
      extended byorg.objectweb.cjdbc.sql.UnknownRequest
All Implemented Interfaces:
java.io.Serializable

public class UnknownRequest
extends AbstractRequest
implements java.io.Serializable

An UnknownRequest is an SQL request that does not match any SQL query known by this software.

Version:
1.0
Author:
Emmanuel Cecchet, Mathieu Peltier
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.cjdbc.sql.AbstractRequest
cacheable, escapeProcessing, id, isAutoCommit, isParsed, isReadOnly, login, maxRows, sqlQuery, sqlSkeleton, timeout, transactionId
 
Constructor Summary
UnknownRequest(java.lang.String sqlQuery, boolean escapeProcessing, int timeout)
          Creates a new UnknownRequest instance.
 
Method Summary
 void cloneParsing(AbstractRequest request)
          Throws always an SQLException: it is not possible to parse an unknown request because we don't know its syntax or semantic.
 boolean isReadRequest()
          Returns true if this request is a read request (SELECT requests for example perform a read).
 boolean isUnknownRequest()
          Returns true if the resulting operation on this request is unknown (some non-standard command or stored procedure for example).
 boolean isWriteRequest()
          Returns true if this request is a write request (INSERT or UPDATE for example perform writes).
 void parse(DatabaseSchema schema, int granularity, boolean isCaseSensitive)
          Throws always an SQLException: it is not possible to parse an unknown request because we don't know its syntax or semantic.
 
Methods inherited from class org.objectweb.cjdbc.sql.AbstractRequest
debug, equals, getCacheAbility, getEscapeProcessing, getId, getLogin, getMaxRows, getSQL, getSqlSkeleton, getTimeout, getTransactionId, isAutoCommit, isParsed, isReadOnly, setCacheAbility, setId, setIsAutoCommit, setIsReadOnly, setLogin, setMaxRows, setSQL, setSqlSkeleton, setTimeout, setTransactionId, trimCarriageReturn
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnknownRequest

public UnknownRequest(java.lang.String sqlQuery,
                      boolean escapeProcessing,
                      int timeout)
Creates a new UnknownRequest instance.

Parameters:
sqlQuery - the SQL query
escapeProcessing - should the driver to escape processing before sending to the database?
timeout - an int value
Method Detail

isReadRequest

public boolean isReadRequest()
Description copied from class: AbstractRequest
Returns true if this request is a read request (SELECT requests for example perform a read).

Specified by:
isReadRequest in class AbstractRequest
Returns:
false
See Also:
AbstractRequest.isReadRequest()

isWriteRequest

public boolean isWriteRequest()
Description copied from class: AbstractRequest
Returns true if this request is a write request (INSERT or UPDATE for example perform writes).

Specified by:
isWriteRequest in class AbstractRequest
Returns:
false
See Also:
AbstractRequest.isWriteRequest()

isUnknownRequest

public boolean isUnknownRequest()
Description copied from class: AbstractRequest
Returns true if the resulting operation on this request is unknown (some non-standard command or stored procedure for example).

Specified by:
isUnknownRequest in class AbstractRequest
Returns:
true
See Also:
AbstractRequest.isUnknownRequest()

parse

public void parse(DatabaseSchema schema,
                  int granularity,
                  boolean isCaseSensitive)
           throws java.sql.SQLException
Throws always an SQLException: it is not possible to parse an unknown request because we don't know its syntax or semantic.

Specified by:
parse in class AbstractRequest
Parameters:
schema - a DatabaseSchema value
granularity - parsing granularity as defined in ParsingGranularities
isCaseSensitive - true if parsing must be case sensitive
Throws:
java.sql.SQLException - if the parsing fails
See Also:
AbstractRequest.parse(org.objectweb.cjdbc.sql.schema.DatabaseSchema, int, boolean)

cloneParsing

public void cloneParsing(AbstractRequest request)
Throws always an SQLException: it is not possible to parse an unknown request because we don't know its syntax or semantic.

Specified by:
cloneParsing in class AbstractRequest
Parameters:
request - the parsed request to clone
See Also:
AbstractRequest.cloneParsing(AbstractRequest)


Copyright © 2002, 2003 - ObjectWeb Consortium - All Rights Reserved.