Java Doc for GenericStatementContext.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » sql » conn » 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 DBMS » db derby 10.2 » org.apache.derby.impl.sql.conn 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.iapi.services.context.ContextImpl
      org.apache.derby.impl.sql.conn.GenericStatementContext

GenericStatementContext
final class GenericStatementContext extends ContextImpl implements StatementContext(Code)
GenericStatementContext is pushed/popped around a statement prepare and execute so that any statement specific clean up can be performed.
author:
   jerry



Constructor Summary
 GenericStatementContext(LanguageConnectionContext lcc, TransactionController tc)
    

Method Summary
public  voidaddDependency(Dependency dy)
     Track a Dependency within this StatementContext.
public  StringBufferappendErrorInfo()
    
public  voidcancel()
     Cancels the statement which has allocated this StatementContext object. This is done by setting a flag in the StatementContext object.
public  voidcleanupOnError(Throwable error)
     Close down the top ResultSet, if relevant, and rollback to the internal savepoint, if one was set.
exception:
  StandardException - thrown on error.
public  voidclearInUse()
    
public  voidclearSavePoint()
    
public  shortgetSQLAllowed()
    
public  StringgetStatementText()
     Return the text of the current statement. Note that this may be null.
public  NoPutResultSet[]getSubqueryTrackingArray()
     Get the subquery tracking array for this query.
public  booleangetSystemCode()
     Return true if this statement is system code.
public  booleaninTrigger()
     Returns whether we started from within the context of a trigger or not.
public  booleaninUse()
    
public  booleanisAtomic()
     Indicates whether the statement needs to be executed atomically or not, i.e., whether a commit/rollback is permitted by a connection nested in this statement.
public  booleanisCancelled()
     Tests whether the statement which has allocated this StatementContext object has been cancelled.
public  booleanisForReadOnly()
    
public  booleanisLastHandler(int severity)
    
public  booleanonStack()
     Reports whether this StatementContext is on the context stack. true if this StatementContext is on the context stack.
public  voidresetSavePoint()
     Resets the savepoint to the current spot if it is set, otherwise, noop.
public  voidsetInUse(boolean parentInTrigger, boolean isAtomic, boolean isForReadOnly, String stmtText, ParameterValueSet pvs, long timeoutMillis)
    
public  voidsetParentRollback()
     Indicate that, in the event of a statement-level exception, this context is NOT the last one that needs to be rolled back--rather, it is nested within some other statement context, and that other context needs to be rolled back, too.
public  voidsetSQLAllowed(short allow, boolean force)
    
public  voidsetSavePoint()
    
public  voidsetSubqueryResultSet(int subqueryNumber, NoPutResultSet subqueryResultSet, int numSubqueries)
     Set the appropriate entry in the subquery tracking array for the specified subquery.
public  voidsetSystemCode()
     Set to indicate statement is system code.
public  voidsetTopResultSet(ResultSet topResultSet, NoPutResultSet[] subqueryTrackingArray)
     Set the top ResultSet in the ResultSet tree for close down on an error.


Constructor Detail
GenericStatementContext
GenericStatementContext(LanguageConnectionContext lcc, TransactionController tc)(Code)




Method Detail
addDependency
public void addDependency(Dependency dy) throws StandardException(Code)
Track a Dependency within this StatementContext. (We need to clear any dependencies added within this context on an error.
Parameters:
  dy - The dependency to track.
exception:
  StandardException - thrown on error.



appendErrorInfo
public StringBuffer appendErrorInfo()(Code)



cancel
public void cancel()(Code)
Cancels the statement which has allocated this StatementContext object. This is done by setting a flag in the StatementContext object. For this to have any effect, it is the responsibility of the executing statement to check this flag regularly.



cleanupOnError
public void cleanupOnError(Throwable error) throws StandardException(Code)
Close down the top ResultSet, if relevant, and rollback to the internal savepoint, if one was set.
exception:
  StandardException - thrown on error. REVISIT: don't wantcleanupOnError's to throw exceptions.



clearInUse
public void clearInUse()(Code)



clearSavePoint
public void clearSavePoint() throws StandardException(Code)

See Also:   StatementContext.clearSavePoint
exception:
  StandardException - Thrown on error



getSQLAllowed
public short getSQLAllowed()(Code)



getStatementText
public String getStatementText()(Code)
Return the text of the current statement. Note that this may be null. It is currently not set up correctly for ResultSets that aren't single row result sets (e.g SELECT), replication, and setXXXX/getXXXX jdbc methods. the statement text



getSubqueryTrackingArray
public NoPutResultSet[] getSubqueryTrackingArray() throws StandardException(Code)
Get the subquery tracking array for this query. (Useful for runtime statistics.) NoPutResultSet[] The (sparse) array of tops of subquery ResultSet trees
exception:
  StandardException - thrown on error.



getSystemCode
public boolean getSystemCode()(Code)
Return true if this statement is system code.



inTrigger
public boolean inTrigger()(Code)
Returns whether we started from within the context of a trigger or not. true if we are in a trigger context



inUse
public boolean inUse()(Code)



isAtomic
public boolean isAtomic()(Code)
Indicates whether the statement needs to be executed atomically or not, i.e., whether a commit/rollback is permitted by a connection nested in this statement. true if needs to be atomic



isCancelled
public boolean isCancelled()(Code)
Tests whether the statement which has allocated this StatementContext object has been cancelled. This method is typically called from the thread which is executing the statement, to test whether execution should continue or stop. whether the statement which has allocated this StatementContextobject has been cancelled.



isForReadOnly
public boolean isForReadOnly()(Code)



isLastHandler
public boolean isLastHandler(int severity)(Code)

See Also:   Context.isLastHandler



onStack
public boolean onStack()(Code)
Reports whether this StatementContext is on the context stack. true if this StatementContext is on the context stack. false otherwise.



resetSavePoint
public void resetSavePoint() throws StandardException(Code)
Resets the savepoint to the current spot if it is set, otherwise, noop. Used when a commit is done on a nested connection.
See Also:   StatementContext.resetSavePoint
exception:
  StandardException - Thrown on error



setInUse
public void setInUse(boolean parentInTrigger, boolean isAtomic, boolean isForReadOnly, String stmtText, ParameterValueSet pvs, long timeoutMillis)(Code)



setParentRollback
public void setParentRollback()(Code)
Indicate that, in the event of a statement-level exception, this context is NOT the last one that needs to be rolled back--rather, it is nested within some other statement context, and that other context needs to be rolled back, too.



setSQLAllowed
public void setSQLAllowed(short allow, boolean force)(Code)



setSavePoint
public void setSavePoint() throws StandardException(Code)

See Also:   StatementContext.setSavePoint
exception:
  StandardException - Thrown on error



setSubqueryResultSet
public void setSubqueryResultSet(int subqueryNumber, NoPutResultSet subqueryResultSet, int numSubqueries) throws StandardException(Code)
Set the appropriate entry in the subquery tracking array for the specified subquery. Useful for closing down open subqueries on an exception.
Parameters:
  subqueryNumber - The subquery # for this subquery
Parameters:
  subqueryResultSet - The ResultSet at the top of the subquery
Parameters:
  numSubqueries - The total # of subqueries in the entire query
exception:
  StandardException - thrown on error.



setSystemCode
public void setSystemCode()(Code)
Set to indicate statement is system code. For example a system procedure, view, function etc.



setTopResultSet
public void setTopResultSet(ResultSet topResultSet, NoPutResultSet[] subqueryTrackingArray) throws StandardException(Code)
Set the top ResultSet in the ResultSet tree for close down on an error.
exception:
  StandardException - thrown on error.



Methods inherited from org.apache.derby.iapi.services.context.ContextImpl
public StringBuffer appendErrorInfo()(Code)(Java Doc)
final public ContextManager getContextManager()(Code)(Java Doc)
final public String getIdName()(Code)(Java Doc)
public boolean isLastHandler(int severity)(Code)(Java Doc)
final public void popMe()(Code)(Java Doc)
final public void pushMe()(Code)(Java Doc)

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.