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


org.apache.derby.iapi.sql.PreparedStatement

PreparedStatement
public interface PreparedStatement extends Dependent,Provider(Code)
The PreparedStatement interface provides methods to execute prepared statements, store them, and get metadata about them.
author:
   Jeff Lichtman




Method Summary
 ResultSetexecute(Activation activation, boolean rollbackParentContext, long timeoutMillis)
     Execute the PreparedStatement and return results.

There is no executeQuery() or executeUpdate(); a method is provided in ResultSet to tell whether to expect rows to be returned.
Parameters:
  activation - The activation containing all the local stateto execute the plan.
Parameters:
  rollbackParentContext - True if 1) the statement context isNOT a top-level context, AND 2) in the event of a statement-levelexception, the parent context needs to be rolled back, too.
Parameters:
  timeoutMillis - timeout value in milliseconds. A ResultSet for a statement.

 ResultSetexecute(LanguageConnectionContext lcc, boolean rollbackParentContext, long timeoutMillis)
     Simple form of execute().
 ActivationgetActivation(LanguageConnectionContext lcc, boolean scrollable)
     PreparedStatements are re-entrant - that is, more than one execution can be active at a time for a single prepared statement. An Activation contains all the local state information to execute a prepared statement (as opposed to the constant information, such as literal values and code).
public  TimestampgetBeginCompileTimestamp()
    
public  longgetBindTimeInMillis()
     Get the bind time for the associated query in milliseconds.
public  longgetCompileTimeInMillis()
     Get the total compile time for the associated query in milliseconds.
public  SQLWarninggetCompileTimeWarnings()
     Return any compile time warnings.
public  TimestampgetEndCompileTimestamp()
    
public  longgetGenerateTimeInMillis()
     Get the generate time for the associated query in milliseconds.
public  longgetOptimizeTimeInMillis()
     Get the optimize time for the associated query in milliseconds.
 DataTypeDescriptor[]getParameterTypes()
     Get an array of DataTypeDescriptors describing the types of the parameters of this PreparedStatement.
public  longgetParseTimeInMillis()
     Get the parse time for the associated query in milliseconds.
 ResultDescriptiongetResultDescription()
     Get the ResultDescription for the statement.
 StringgetSPSName()
     Return the SPS Name for this statement.
 StringgetSource()
     Return the SQL string that this statement is for.
 booleanisAtomic()
     Returns whether or not this Statement requires should behave atomically -- i.e.
 voidrePrepare(LanguageConnectionContext lcc)
     Re-prepare the statement if it is not up to date or, if requested, simply not optimal.
 booleanreferencesSessionSchema()
     Return true if the query node for this statement references SESSION schema tables.
 booleanupToDate()
     Checks whether this PreparedStatement is up to date.



Method Detail
execute
ResultSet execute(Activation activation, boolean rollbackParentContext, long timeoutMillis) throws StandardException(Code)
Execute the PreparedStatement and return results.

There is no executeQuery() or executeUpdate(); a method is provided in ResultSet to tell whether to expect rows to be returned.
Parameters:
  activation - The activation containing all the local stateto execute the plan.
Parameters:
  rollbackParentContext - True if 1) the statement context isNOT a top-level context, AND 2) in the event of a statement-levelexception, the parent context needs to be rolled back, too.
Parameters:
  timeoutMillis - timeout value in milliseconds. A ResultSet for a statement. A ResultSet representsthe results returned from the statement, if any.Will return NULL if the plan for the PreparedStatementhas aged out of cache, or the plan is out of date.
exception:
  StandardException - Thrown on failure




execute
ResultSet execute(LanguageConnectionContext lcc, boolean rollbackParentContext, long timeoutMillis) throws StandardException(Code)
Simple form of execute(). Creates a new single use activation and executes it, but also passes rollbackParentContext parameter (see above).



getActivation
Activation getActivation(LanguageConnectionContext lcc, boolean scrollable) throws StandardException(Code)
PreparedStatements are re-entrant - that is, more than one execution can be active at a time for a single prepared statement. An Activation contains all the local state information to execute a prepared statement (as opposed to the constant information, such as literal values and code). Each Activation class contains the code specific to the prepared statement represented by an instance of this class (PreparedStatement).
Parameters:
  lcc - The LanguageConnectionContext. The new activation.
exception:
  StandardException - Thrown on failure



getBeginCompileTimestamp
public Timestamp getBeginCompileTimestamp()(Code)
Get the timestamp for the beginning of compilation Timestamp The timestamp for the beginning of compilation.



getBindTimeInMillis
public long getBindTimeInMillis()(Code)
Get the bind time for the associated query in milliseconds. long The bind time for the associated query in milliseconds.



getCompileTimeInMillis
public long getCompileTimeInMillis()(Code)
Get the total compile time for the associated query in milliseconds. Compile time can be divided into parse, bind, optimize and generate times. long The total compile time for the associated query in milliseconds.



getCompileTimeWarnings
public SQLWarning getCompileTimeWarnings()(Code)
Return any compile time warnings. Null if no warnings exist.



getEndCompileTimestamp
public Timestamp getEndCompileTimestamp()(Code)
Get the timestamp for the end of compilation Timestamp The timestamp for the end of compilation.



getGenerateTimeInMillis
public long getGenerateTimeInMillis()(Code)
Get the generate time for the associated query in milliseconds. long The generate time for the associated query in milliseconds.



getOptimizeTimeInMillis
public long getOptimizeTimeInMillis()(Code)
Get the optimize time for the associated query in milliseconds. long The optimize time for the associated query in milliseconds.



getParameterTypes
DataTypeDescriptor[] getParameterTypes()(Code)
Get an array of DataTypeDescriptors describing the types of the parameters of this PreparedStatement. The Nth element of the array describes the Nth parameter. An array of DataTypeDescriptors telling thetype, length, precision, scale, etc. of eachparameter of this PreparedStatement.



getParseTimeInMillis
public long getParseTimeInMillis()(Code)
Get the parse time for the associated query in milliseconds. long The parse time for the associated query in milliseconds.



getResultDescription
ResultDescription getResultDescription()(Code)
Get the ResultDescription for the statement. The ResultDescription describes what the results look like: what are the rows and columns?

This is available here and on the ResultSet so that users can see the shape of the result before they execute. A ResultDescription describing the results.




getSPSName
String getSPSName()(Code)
Return the SPS Name for this statement. the SPS Name for this statement



getSource
String getSource()(Code)
Return the SQL string that this statement is for. the SQL string this statement is for.



isAtomic
boolean isAtomic()(Code)
Returns whether or not this Statement requires should behave atomically -- i.e. whether a user is permitted to do a commit/rollback during the execution of this statement. boolean Whether or not this Statement is atomic



rePrepare
void rePrepare(LanguageConnectionContext lcc) throws StandardException(Code)
Re-prepare the statement if it is not up to date or, if requested, simply not optimal. If there are open cursors using this prepared statement, then we will not be able to recompile the statement.
Parameters:
  lcc - The LanguageConnectionContext.
exception:
  StandardException - thrown if unable to perform



referencesSessionSchema
boolean referencesSessionSchema()(Code)
Return true if the query node for this statement references SESSION schema tables. true if references SESSION schema tables, else false



upToDate
boolean upToDate() throws StandardException(Code)
Checks whether this PreparedStatement is up to date. A PreparedStatement can become out of date if any of several things happen: A schema used by the statement is dropped A table used by the statement is dropped A table used by the statement, or a column in such a table, is altered in one of several ways: a column is dropped, a privilege is dropped, a constraint is added or dropped, an index is dropped. A view used by the statement is dropped. In general, anything that happened since the plan was generated that might cause the plan to fail, or to generate incorrect results, will cause this method to return FALSE. TRUE if the PreparedStatement is up to date,FALSE if it is not up to date



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