Java Doc for AbstractRequest.java in  » Database-JDBC-Connection-Pool » sequoia-2.10.9 » org » continuent » sequoia » controller » requests » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » sequoia 2.10.9 » org.continuent.sequoia.controller.requests 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.continuent.sequoia.controller.requests.AbstractRequest

All known Subclasses:   org.continuent.sequoia.controller.requests.StoredProcedure,  org.continuent.sequoia.controller.requests.SelectRequest,  org.continuent.sequoia.controller.requests.AbstractWriteRequest,
AbstractRequest
abstract public class AbstractRequest implements Serializable(Code)
An AbstractRequest defines the skeleton of an SQL request. Requests have to be serializable (at least) for inter-controller communications.
author:
   Emmanuel Cecchet
author:
   Julie Marguerite
author:
   Mathieu Peltier
author:
   Marc Herbert
version:
   1.0


Field Summary
protected transient  intcacheable
     Whether this request is cacheable or not.
protected  StringcursorName
    
protected  booleandisabledTableExistenceCheck
     True if the request will not check when running that the table exists in the database schema.
protected transient  longendTime
    
protected  booleanescapeProcessing
     Should the backend driver do escape processing before sending to the database? Simply forwarded to backend driver.
protected  intfetchSize
    
protected  longid
     Request unique id (set by the controller).
protected  booleanisAutoCommit
     Whether this request has been sent in autocommit mode or not.
protected transient  booleanisParsed
     Whether the SQL content has been parsed or not.
protected  booleanisReadOnly
    
protected transient  longlogId
    
protected  Stringlogin
     Login used to issue this request (must be set by the VirtualDatabaseWorkerThread).
protected  intmaxRows
    
protected  StringpreparedStatementParameters
    
 intrequestType
     Rationale is to avoid the performance cost of .instanceof(), at serialization time and elsewhere.
protected  booleanrequiresConnectionFlush
     True if the request requires current connection to be closed instead of beeing given back to the pool.
protected  booleanrequiresConnectionPoolFlush
     True if the request requires all connections to be closed to take effect.
protected  StringsqlQueryOrTemplate
     SQL query (should be set in constructor) or query template if this is a PreparedStatement.
protected transient  longstartTime
    
protected  inttimeoutInSeconds
     Timeout for this request in seconds, value 0 means no timeout (should be set in constructor).
protected  longtransactionId
     Transaction identifier if this request belongs to a transaction.
protected  inttransactionIsolation
     Transaction isolation level to use when executing the query inside a transaction.
protected transient  StringuniqueKey
     Unique key identifying the query.
protected  SortedSetwriteLockedTables
     Sorted list of table names that must be locked in write.

Constructor Summary
public  AbstractRequest(String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator, int requestType)
    

Method Summary
protected  voidaddDependingTables(DatabaseSchema schema, SortedSet lockedTables)
     Add depending tables to the list of tables already contained in the provided set.
abstract public  booleanaltersAggregateList()
     Returns true if this request invalidates somehow the Aggregate List.
abstract public  booleanaltersDatabaseCatalog()
     Returns true if this request invalidates somehow the Database Catalog.
abstract public  booleanaltersDatabaseSchema()
     Returns true if this request invalidates somehow the Database Schema.
abstract public  booleanaltersMetadataCache()
     Returns true if this request invalidates somehow the Metadata Cache.
abstract public  booleanaltersQueryResultCache()
     Returns true if this request invalidates somehow the Query Result Cache.
abstract public  booleanaltersSomething()
     Returns true if this request invalidates somehow any Sequoia internal structure or caches (true if any of the other abstract altersXXX methods returns true).
abstract public  booleanaltersStoredProcedureList()
     Returns true if this request invalidates somehow the Stored Procedure List.
abstract public  booleanaltersUserDefinedTypes()
     Returns true if this request invalidates somehow the User Defined Types.
abstract public  booleanaltersUsers()
     Returns true if this request invalidates somehow the Users definition or rights.
abstract public  voidcloneParsing(AbstractRequest request)
     Clones the parsing of a request.
public  voiddebug()
     Displays some debugging information about this request.
public  booleanequals(Object other)
     Two requests are equal if they have the same unique id.
public  intgetCacheAbility()
     Returns the cacheable status of this request.
public  StringgetClientIpAddress()
     Returns the clientIpAddress value.
public  StringgetCursorName()
     Returns the cursorName value.
public  longgetEndTime()
     Returns the endTime value.
public  booleangetEscapeProcessing()
    
public  longgetExecTimeInMs()
     Return the request execution time in milliseconds.
public  intgetFetchSize()
     Returns the fetchSize value.
public  longgetId()
     Returns the unique id of this request.
public  StringgetLineSeparator()
     Returns the lineSeparator used in the request string (required to parse it).
final public  longgetLogId()
     Returns the logId value.
public  StringgetLogin()
     Returns the login used to issue this request.
public  booleangetMacrosAreProcessed()
     Returns true if macros have already been processed in the request.
public  intgetMaxRows()
     Get the maximum number of rows the ResultSet can contain.
public  StringgetParsingResultsAsString()
    
final public  longgetPersistentConnectionId()
     Returns the persistentConnectionId value.
public  StringgetPreparedStatementParameters()
    
public  booleangetRetrieveSQLWarnings()
    
public  StringgetSqlOrTemplate()
     Gets the SQL code of this request if this is a statement or sql template (with ? as parameter placeholders) if this is a PreparedStatement.
public  StringgetSqlShortForm(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.
public  longgetStartTime()
     Returns the startTime value.
public  intgetTimeout()
     Gets the timeout for this request in seconds.
public  longgetTransactionId()
     Gets the identifier of the transaction if this request belongs to a transaction, or -1 if this request does not belong to a transaction.
public  intgetTransactionIsolation()
     Returns the transaction isolation level.
public  StringgetType()
     Get the type of the request as a String.
public  StringgetUniqueKey()
     Returns the unique key identifying this request.
public  SortedSetgetWriteLockedDatabaseTables()
     Returns the list of database table names that must be write locked by the execution of this request. SortedSet of String containing table names to be write locked bythis request.
public  inthashCode()
    
final public  booleanisAlter()
     Returns true if this request in a ALTER statement.
public  booleanisAutoCommit()
     Returns true if the request should be executed in autocommit mode.
final public  booleanisCreate()
     Returns true if this request in a CREATE statement.
final public  booleanisDelete()
     Returns true if this request in a DELETE statement.
final public  booleanisDrop()
     Returns true if this request in a DROP statement.
final public  booleanisInsert()
     Returns true if this request in an INSERT statement.
final public  booleanisLazyTransactionStart()
     Returns true if this request triggers a lazy transaction start that requires a 'begin' to be logged into the reocvery log.
public  booleanisParsed()
     Returns true if the request SQL content has been already parsed.
final public  booleanisPersistentConnection()
     Returns the persistentConnection value.
public  booleanisReadOnly()
    
final public  booleanisSelect()
     Returns true if this request in a SELECT statement.
final public  booleanisUpdate()
     Returns true if this request in an UPDATE statement.
abstract public  booleanneedsMacroProcessing()
     Returns true if this request requires macro (RAND(), NOW(), ...) processing.
abstract public  voidparse(DatabaseSchema schema, int granularity, boolean isCaseSensitive)
     Parses the SQL request and extract the selected columns and tables given the DatabaseSchema of the database targeted by this request.

An exception is thrown when the parsing fails.

public  booleanrequiresConnectionFlush()
     Returns the requiresConnectionFlush value.
public  booleanrequiresConnectionPoolFlush()
     Returns the requiresConnectionPoolFlush value.
public  voidsetCacheAbility(int cacheAbility)
     Set the cacheable status of this request.
public  voidsetClientIpAddress(String clientIpAddress)
     Sets the clientIpAddress value.
public  voidsetCursorName(String cursorName)
     Sets the cursorName value.
public  voidsetEndTime(long endTime)
     Sets the endTime value.
public  voidsetFetchSize(int fetchSize)
     Sets the fetchSize value.
public  voidsetId(long id)
     Sets the unique id of this request.
public  voidsetIsAutoCommit(boolean isAutoCommit)
     Sets the autocommit mode for this request.
public  voidsetIsLazyTransactionStart(boolean isLazyStart)
     Set a flag to tell whether this request triggers a lazy transaction start that requires a 'begin' to be logged into the reocvery log.
public  voidsetIsReadOnly(boolean isReadOnly)
     Sets the read-only mode for this request.
final public  voidsetLineSeparator(String lineSeparator)
     Sets the lineSeparator value.
final public  voidsetLogId(long logId)
     Sets the logId value.
public  voidsetLogin(String login)
     Sets the login to use to issue this request.
public  voidsetMacrosAreProcessed(boolean macrosAreProcessed)
     Sets the macrosAreProcessed value.
public  voidsetMaxRows(int rows)
     Set the maximum number of rows in the ResultSet.
final public  voidsetPersistentConnection(boolean persistentConnection)
     Sets the persistentConnection value.
final public  voidsetPersistentConnectionId(long persistentConnectionId)
     Sets the persistentConnectionId value.
public  voidsetPreparedStatementParameters(String params)
    
public  voidsetRetrieveSQLWarnings(boolean isRetrieveSQLWarnings)
    
public  voidsetSqlOrTemplate(String sql)
     Set the SQL statement or PreparedStatement template of this request. Warning! The request parsing validity is not checked.
public  voidsetStartTime(long startTime)
     Sets the startTime value.
public  voidsetTimeout(int timeout)
     Sets the new timeout in seconds for this request.
public  voidsetTransactionId(long id)
     Sets the transaction identifier this request belongs to.
public  voidsetTransactionIsolation(int isolationLevel)
    
public  booleantableExistenceCheckIsDisabled()
     Returns the disabledTableExistenceCheck value.
public  StringtoDebugString()
     Returns a String containing debug information about this request.
public  StringtoShortDebugString()
     Returns a one line String containing debug information about this request.
public  StringtoString()
    
public  StringtoStringShortForm(int nbOfCharacters)
     Same as toString but use a short form limited to the number of character provided.
public  StringtrimCarriageReturnAndTabs()
     If the query has a skeleton defined, return the skeleton with all carriage returns and tabs replaced with spaces.

Field Detail
cacheable
protected transient int cacheable(Code)
Whether this request is cacheable or not.



cursorName
protected String cursorName(Code)



disabledTableExistenceCheck
protected boolean disabledTableExistenceCheck(Code)
True if the request will not check when running that the table exists in the database schema. This is used to disable at the request level virtual database behavior when enforceTableExistenceIntoSchema=true. By default, disabledTableExistenceCheck = false implies that this request will be executed according to virtual database setting.



endTime
protected transient long endTime(Code)
Time in ms at which the request execution ended



escapeProcessing
protected boolean escapeProcessing(Code)
Should the backend driver do escape processing before sending to the database? Simply forwarded to backend driver. No setter for this member, should be set in constructor.
See Also:   java.sql.Statement.setEscapeProcessing(boolean)



fetchSize
protected int fetchSize(Code)



id
protected long id(Code)
Request unique id (set by the controller).



isAutoCommit
protected boolean isAutoCommit(Code)
Whether this request has been sent in autocommit mode or not.



isParsed
protected transient boolean isParsed(Code)
Whether the SQL content has been parsed or not.



isReadOnly
protected boolean isReadOnly(Code)
True if the connection has been set to read-only



logId
protected transient long logId(Code)
Recovery log id (local to the controller, set by the controller)



login
protected String login(Code)
Login used to issue this request (must be set by the VirtualDatabaseWorkerThread).



maxRows
protected int maxRows(Code)



preparedStatementParameters
protected String preparedStatementParameters(Code)
Encoded PreparedStatement paremeters (null if this is a statement)



requestType
int requestType(Code)
Rationale is to avoid the performance cost of .instanceof(), at serialization time and elsewhere.



requiresConnectionFlush
protected boolean requiresConnectionFlush(Code)
True if the request requires current connection to be closed instead of beeing given back to the pool.



requiresConnectionPoolFlush
protected boolean requiresConnectionPoolFlush(Code)
True if the request requires all connections to be closed to take effect.



sqlQueryOrTemplate
protected String sqlQueryOrTemplate(Code)
SQL query (should be set in constructor) or query template if this is a PreparedStatement.



startTime
protected transient long startTime(Code)
Time in ms at which the request execution started



timeoutInSeconds
protected int timeoutInSeconds(Code)
Timeout for this request in seconds, value 0 means no timeout (should be set in constructor). This timeout is in seconds, reflecting the jdbc-spec, and is passed as-is to the backends jdbc-driver. Internally converted to ms via getTimeoutMs().



transactionId
protected long transactionId(Code)
Transaction identifier if this request belongs to a transaction. The value is set by the VirtualDatabaseWorkerThread.



transactionIsolation
protected int transactionIsolation(Code)
Transaction isolation level to use when executing the query inside a transaction. The value is set by the VirtualDatabaseWorkerThread.



uniqueKey
protected transient String uniqueKey(Code)
Unique key identifying the query. If the request is executed in a statement, the unique key is the same as sqlQuery else is it is a combination of the sqlSkeleton and the parameters contained in sqlQuery.



writeLockedTables
protected SortedSet writeLockedTables(Code)
Sorted list of table names that must be locked in write. This list may be null or empty if no table needs to be locked.




Constructor Detail
AbstractRequest
public AbstractRequest(String sqlQuery, boolean escapeProcessing, int timeout, String lineSeparator, int requestType)(Code)
Default constructor Creates a new AbstractRequest object
Parameters:
  sqlQuery - the SQL query
Parameters:
  escapeProcessing - should the driver to escape processing beforesending to the database ?
Parameters:
  timeout - an int value
Parameters:
  lineSeparator - the line separator used in the query
Parameters:
  requestType - the request type as defined in RequestType class
See Also:   RequestType




Method Detail
addDependingTables
protected void addDependingTables(DatabaseSchema schema, SortedSet lockedTables)(Code)
Add depending tables to the list of tables already contained in the provided set. No recursivity here since this is primarily design for foreign keys which cannot have circular references.
Parameters:
  schema - the schema to use
Parameters:
  lockedTables - set of table names to add depending tables to



altersAggregateList
abstract public boolean altersAggregateList()(Code)
Returns true if this request invalidates somehow the Aggregate List. true if the aggregate list is altered.



altersDatabaseCatalog
abstract public boolean altersDatabaseCatalog()(Code)
Returns true if this request invalidates somehow the Database Catalog. true if the database catalog is altered.



altersDatabaseSchema
abstract public boolean altersDatabaseSchema()(Code)
Returns true if this request invalidates somehow the Database Schema. true if the database schema is altered.



altersMetadataCache
abstract public boolean altersMetadataCache()(Code)
Returns true if this request invalidates somehow the Metadata Cache. true if the metadata cache is altered.



altersQueryResultCache
abstract public boolean altersQueryResultCache()(Code)
Returns true if this request invalidates somehow the Query Result Cache. true if the query result cache is altered.



altersSomething
abstract public boolean altersSomething()(Code)
Returns true if this request invalidates somehow any Sequoia internal structure or caches (true if any of the other abstract altersXXX methods returns true). true if the request alters anything that triggers an invalidationin Sequoia.



altersStoredProcedureList
abstract public boolean altersStoredProcedureList()(Code)
Returns true if this request invalidates somehow the Stored Procedure List. true if the stored procedure list is altered.



altersUserDefinedTypes
abstract public boolean altersUserDefinedTypes()(Code)
Returns true if this request invalidates somehow the User Defined Types. true if the UDTs are altered.



altersUsers
abstract public boolean altersUsers()(Code)
Returns true if this request invalidates somehow the Users definition or rights. true if the users are altered.



cloneParsing
abstract public void cloneParsing(AbstractRequest request)(Code)
Clones the parsing of a request.
Parameters:
  request - the parsed request to clone



debug
public void debug()(Code)
Displays some debugging information about this request.



equals
public boolean equals(Object other)(Code)
Two requests are equal if they have the same unique id.
Parameters:
  other - an object a boolean value



getCacheAbility
public int getCacheAbility()(Code)
Returns the cacheable status of this request. It can be: org.continuent.sequoia.controller.requests.RequestType.CACHEABLE , org.continuent.sequoia.controller.requests.RequestType.UNCACHEABLE or org.continuent.sequoia.controller.requests.RequestType.UNIQUE_CACHEABLE a int value



getClientIpAddress
public String getClientIpAddress()(Code)
Returns the clientIpAddress value. Returns the clientIpAddress.



getCursorName
public String getCursorName()(Code)
Returns the cursorName value. Returns the cursorName.



getEndTime
public long getEndTime()(Code)
Returns the endTime value. Returns the endTime.



getEscapeProcessing
public boolean getEscapeProcessing()(Code)
Returns true if the driver should escape processing before sending to the database? a boolean value



getExecTimeInMs
public long getExecTimeInMs()(Code)
Return the request execution time in milliseconds. If start time was not set, 0 is returned. If endTime is not set, the diff between start time and current time is returned. If start and end time are set, that elapsed time between start and end is returned. execution time in ms.



getFetchSize
public int getFetchSize()(Code)
Returns the fetchSize value. Returns the fetchSize.



getId
public long getId()(Code)
Returns the unique id of this request. the request id



getLineSeparator
public String getLineSeparator()(Code)
Returns the lineSeparator used in the request string (required to parse it). For practical reasons this is just System.getProperty("line.separator") on the client. Used to be defined per-request, now only once per-connection. the lineSeparator.



getLogId
final public long getLogId()(Code)
Returns the logId value. Returns the logId.



getLogin
public String getLogin()(Code)
Returns the login used to issue this request. a String value



getMacrosAreProcessed
public boolean getMacrosAreProcessed()(Code)
Returns true if macros have already been processed in the request. Returns the macrosAreProcessed value.



getMaxRows
public int getMaxRows()(Code)
Get the maximum number of rows the ResultSet can contain. maximum number of rows
See Also:   java.sql.Statement.getMaxRows



getParsingResultsAsString
public String getParsingResultsAsString()(Code)
Displays useful information for parsing debugging a string containing info about parsing results



getPersistentConnectionId
final public long getPersistentConnectionId()(Code)
Returns the persistentConnectionId value. Returns the persistentConnectionId.



getPreparedStatementParameters
public String getPreparedStatementParameters()(Code)
Return the encoded parameters of the PreparedStatement (null if this is a Statement) encoded parameters



getRetrieveSQLWarnings
public boolean getRetrieveSQLWarnings()(Code)
Must the controller retrieve SQL warnings ? true if SQLWarnings have to be fetched



getSqlOrTemplate
public String getSqlOrTemplate()(Code)
Gets the SQL code of this request if this is a statement or sql template (with ? as parameter placeholders) if this is a PreparedStatement. the SQL query or the PreparedStatement template



getSqlShortForm
public String getSqlShortForm(int nbOfCharacters)(Code)
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



getStartTime
public long getStartTime()(Code)
Returns the startTime value. Returns the startTime.



getTimeout
public int getTimeout()(Code)
Gets the timeout for this request in seconds. timeout in seconds (0 means no timeout)



getTransactionId
public long getTransactionId()(Code)
Gets the identifier of the transaction if this request belongs to a transaction, or -1 if this request does not belong to a transaction. transaction identifier or -1



getTransactionIsolation
public int getTransactionIsolation()(Code)
Returns the transaction isolation level. Returns the transaction isolation.



getType
public String getType()(Code)
Get the type of the request as a String. This method is intended to be used for debug and log only. Do not use in other cases. the type of the request as a String.
See Also:   RequestType.getTypeAsString(AbstractRequest)



getUniqueKey
public String getUniqueKey()(Code)
Returns the unique key identifying this request. Returns the uniqueKey.



getWriteLockedDatabaseTables
public SortedSet getWriteLockedDatabaseTables()(Code)
Returns the list of database table names that must be write locked by the execution of this request. SortedSet of String containing table names to be write locked bythis request. This list may be null or empty if no table needs tobe locked.



hashCode
public int hashCode()(Code)

See Also:   java.lang.Object.hashCode



isAlter
final public boolean isAlter()(Code)
Returns true if this request in a ALTER statement. a boolean value



isAutoCommit
public boolean isAutoCommit()(Code)
Returns true if the request should be executed in autocommit mode. a boolean value



isCreate
final public boolean isCreate()(Code)
Returns true if this request in a CREATE statement. a boolean value



isDelete
final public boolean isDelete()(Code)
Returns true if this request in a DELETE statement. a boolean value



isDrop
final public boolean isDrop()(Code)
Returns true if this request in a DROP statement. a boolean value



isInsert
final public boolean isInsert()(Code)
Returns true if this request in an INSERT statement. a boolean value



isLazyTransactionStart
final public boolean isLazyTransactionStart()(Code)
Returns true if this request triggers a lazy transaction start that requires a 'begin' to be logged into the reocvery log. Returns the isLazyTransactionStart.



isParsed
public boolean isParsed()(Code)
Returns true if the request SQL content has been already parsed. a boolean value



isPersistentConnection
final public boolean isPersistentConnection()(Code)
Returns the persistentConnection value. Returns the persistentConnection.



isReadOnly
public boolean isReadOnly()(Code)
Returns true if the connection is set to read-only a boolean value



isSelect
final public boolean isSelect()(Code)
Returns true if this request in a SELECT statement. a boolean value



isUpdate
final public boolean isUpdate()(Code)
Returns true if this request in an UPDATE statement. a boolean value



needsMacroProcessing
abstract public boolean needsMacroProcessing()(Code)
Returns true if this request requires macro (RAND(), NOW(), ...) processing. true if macro processing is required
See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.handleMacros(AbstractRequest)



parse
abstract public void parse(DatabaseSchema schema, int granularity, boolean isCaseSensitive) throws SQLException(Code)
Parses the SQL request and extract the selected columns and tables given the DatabaseSchema of the database targeted by this request.

An exception is thrown when the parsing fails. Warning, this method does not check the validity of the request. In particular, invalid request could be parsed without throwing an exception. However, valid SQL request should never throw an exception.
Parameters:
  schema - a DatabaseSchema value
Parameters:
  granularity - parsing granularity as defined inParsingGranularities
Parameters:
  isCaseSensitive - true if parsing must be case sensitive
exception:
  SQLException - if the parsing fails




requiresConnectionFlush
public boolean requiresConnectionFlush()(Code)
Returns the requiresConnectionFlush value. Returns the requiresConnectionFlush.



requiresConnectionPoolFlush
public boolean requiresConnectionPoolFlush()(Code)
Returns the requiresConnectionPoolFlush value. Returns the requiresConnectionPoolFlush.



setCacheAbility
public void setCacheAbility(int cacheAbility)(Code)
Set the cacheable status of this request. It can be: org.continuent.sequoia.controller.requests.RequestType.CACHEABLE , org.continuent.sequoia.controller.requests.RequestType.UNCACHEABLE or org.continuent.sequoia.controller.requests.RequestType.UNIQUE_CACHEABLE
Parameters:
  cacheAbility - a int value



setClientIpAddress
public void setClientIpAddress(String clientIpAddress)(Code)
Sets the clientIpAddress value.
Parameters:
  clientIpAddress - The clientIpAddress to set.



setCursorName
public void setCursorName(String cursorName)(Code)
Sets the cursorName value.
Parameters:
  cursorName - The cursorName to set.



setEndTime
public void setEndTime(long endTime)(Code)
Sets the endTime value.
Parameters:
  endTime - The endTime to set.



setFetchSize
public void setFetchSize(int fetchSize)(Code)
Sets the fetchSize value.
Parameters:
  fetchSize - The fetchSize to set.
See Also:   org.continuent.sequoia.driver.Statement



setId
public void setId(long id)(Code)
Sets the unique id of this request.
Parameters:
  id - the id to set



setIsAutoCommit
public void setIsAutoCommit(boolean isAutoCommit)(Code)
Sets the autocommit mode for this request.
Parameters:
  isAutoCommit - true if autocommit shouldbe used



setIsLazyTransactionStart
public void setIsLazyTransactionStart(boolean isLazyStart)(Code)
Set a flag to tell whether this request triggers a lazy transaction start that requires a 'begin' to be logged into the reocvery log.
Parameters:
  isLazyStart - true if a begin must be logged before this request



setIsReadOnly
public void setIsReadOnly(boolean isReadOnly)(Code)
Sets the read-only mode for this request.
Parameters:
  isReadOnly - true if connection is read-only



setLineSeparator
final public void setLineSeparator(String lineSeparator)(Code)
Sets the lineSeparator value. Unfortunately needed at deserialization time. Could be removed (and field made final) if lineSeparator was _always_ passed as an argument to the factory (currently only half of the time).
Parameters:
  lineSeparator - The lineSeparator to set.



setLogId
final public void setLogId(long logId)(Code)
Sets the logId value.
Parameters:
  logId - The logId to set.



setLogin
public void setLogin(String login)(Code)
Sets the login to use to issue this request.
Parameters:
  login - a String value



setMacrosAreProcessed
public void setMacrosAreProcessed(boolean macrosAreProcessed)(Code)
Sets the macrosAreProcessed value.
Parameters:
  macrosAreProcessed - The macrosAreProcessed to set.



setMaxRows
public void setMaxRows(int rows)(Code)
Set the maximum number of rows in the ResultSet. Used only by Statement.
Parameters:
  rows - maximum number of rows
See Also:   java.sql.Statement.setMaxRows(int)



setPersistentConnection
final public void setPersistentConnection(boolean persistentConnection)(Code)
Sets the persistentConnection value.
Parameters:
  persistentConnection - The persistentConnection to set.



setPersistentConnectionId
final public void setPersistentConnectionId(long persistentConnectionId)(Code)
Sets the persistentConnectionId value.
Parameters:
  persistentConnectionId - The persistentConnectionId to set.



setPreparedStatementParameters
public void setPreparedStatementParameters(String params)(Code)
Set the parameters of the PreparedStatement
Parameters:
  params - parameters of the PreparedStatement.



setRetrieveSQLWarnings
public void setRetrieveSQLWarnings(boolean isRetrieveSQLWarnings)(Code)
Set the SQL Warnings retrieval property
Parameters:
  isRetrieveSQLWarnings - true if the controller should get SQL warnings



setSqlOrTemplate
public void setSqlOrTemplate(String sql)(Code)
Set the SQL statement or PreparedStatement template of this request. Warning! The request parsing validity is not checked. The caller has to recall AbstractRequest.parse(DatabaseSchema,int,boolean) if needed.
Parameters:
  sql - SQL statement or statment template if this is aPreparedStatement
See Also:   org.continuent.sequoia.controller.loadbalancer.AbstractLoadBalancer.handleMacros(AbstractRequest)



setStartTime
public void setStartTime(long startTime)(Code)
Sets the startTime value.
Parameters:
  startTime - The startTime to set.



setTimeout
public void setTimeout(int timeout)(Code)
Sets the new timeout in seconds for this request.
Parameters:
  timeout - an int value
See Also:   org.continuent.sequoia.controller.scheduler



setTransactionId
public void setTransactionId(long id)(Code)
Sets the transaction identifier this request belongs to.
Parameters:
  id - transaction id



setTransactionIsolation
public void setTransactionIsolation(int isolationLevel)(Code)
Sets the transaction isolation level that must be used to execute this request
Parameters:
  isolationLevel - the transaction isolation level



tableExistenceCheckIsDisabled
public boolean tableExistenceCheckIsDisabled()(Code)
Returns the disabledTableExistenceCheck value. Returns the disabledTableExistenceCheck.



toDebugString
public String toDebugString()(Code)
Returns a String containing debug information about this request.

Information displayed (one line per info): id, query, parameters (if any), login, autocommit, transaction id, cacheable status, isolation level, start time, end time, timeout in seconds, write locked tables, persistent connection id, client ip address. a string containing:




toShortDebugString
public String toShortDebugString()(Code)
Returns a one line String containing debug information about this request.

Information displayed: id, query, parameters (if any), transaction id, persistent connection id. a string containing:




toString
public String toString()(Code)

See Also:   java.lang.Object.toString



toStringShortForm
public String toStringShortForm(int nbOfCharacters)(Code)
Same as toString but use a short form limited to the number of character provided.
Parameters:
  nbOfCharacters - maximum number of characters to display (does notapply to the skeleton) a String representation of the request
See Also:   java.lang.Object.toString



trimCarriageReturnAndTabs
public String trimCarriageReturnAndTabs()(Code)
If the query has a skeleton defined, return the skeleton with all carriage returns and tabs replaced with spaces. If no SQL skeleton is defined, we perform the same processing on the instanciated SQL statement.

Note that if no modification has to be done, the original string is returned else a new string is constructed with the replaced elements. statement with CR replaced by spaces




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.