Java Doc for ResultSet.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.ResultSet

All known Subclasses:   org.apache.derby.impl.sql.execute.NoRowsResultSetImpl,
ResultSet
public interface ResultSet (Code)
The ResultSet interface provides a method to tell whether a statement returns rows, and if so, a method to get the rows. It also provides a method to get metadata about the contents of the rows. It also provide a method to accept rows as input.

There is no single implementation of the ResultSet interface. Instead, the various support operations involved in executing statements implement this interface.

Although ExecRow is used on the interface, it is not available to users of the API. They should use Row, the exposed super-interface of ExecRow. <>

Valid transitions:

  • open->close
  • close->open
  • close->finished
  • finished->open

author:
   Jeff Lichtman


Field Summary
final public static  intCURRENT_RESULTSET_ONLY
    
final public static  intENTIRE_RESULTSET_TREE
    
final public static  intISAFTERLAST
    
final public static  intISBEFOREFIRST
    
final public static  intISFIRST
    
final public static  intISLAST
    


Method Summary
public  booleancheckRowPosition(int isType)
     Determine if the result set is at one of the positions according to the constants above (ISBEFOREFIRST etc).
 voidcleanUp()
     Tells the system to clean up on an error.
 voidclearCurrentRow()
     Clear the current row.
 voidclose()
     Tells the system that there will be no more calls to getNextRow() (until the next open() call), so it can free up the resources associated with the ResultSet.
 voidfinish()
     Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open().
 ExecRowgetAbsoluteRow(int row)
     Returns the row at the absolute position from the query, and returns NULL when there is no such position.
 ActivationgetActivation()
    
public  ResultSetgetAutoGeneratedKeysResultset()
    
public  TimestampgetBeginExecutionTimestamp()
     Get the Timestamp for the beginning of execution.
public  StringgetCursorName()
     Returns the name of the cursor, if this is cursor statement of some type (declare, open, fetch, positioned update, positioned delete, close). A String with the name of the cursor, if any.
public  TimestampgetEndExecutionTimestamp()
     Get the Timestamp for the end of execution.
public  longgetExecuteTime()
     Get the execution time in milliseconds.
 ExecRowgetFirstRow()
     Returns the first row from the query, and returns NULL when there are no rows.
 ExecRowgetLastRow()
     Returns the last row from the query, and returns NULL when there are no rows.
 ExecRowgetNextRow()
     Returns the next row from the query, and returns NULL when there are no more rows.
 ExecRowgetPreviousRow()
     Returns the previous row from the query, and returns NULL when there are no more previous rows.
 ExecRowgetRelativeRow(int row)
     Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position.
 ResultDescriptiongetResultDescription()
     Returns a ResultDescription object, which describes the results of the statement this ResultSet is in.
 intgetRowNumber()
     Returns the row number of the current row.
public  NoPutResultSet[]getSubqueryTrackingArray(int numSubqueries)
     Get the subquery ResultSet tracking array from the top ResultSet.
public  longgetTimeSpent(int type)
     Return the total amount of time spent in this ResultSet
Parameters:
  type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSetENTIRE_RESULTSET_TREE - time spent in this ResultSet and below.
public  SQLWarninggetWarnings()
     Return the set of warnings generated during the execution of this result set.
 booleanisClosed()
     Find out if the ResultSet is closed or not.
 intmodifiedRowCount()
     Returns the number of rows affected by the statement. Only valid of returnsRows() returns false. For other DML statements, it returns the number of rows modified by the statement.
 voidopen()
     Needs to be called before the result set will do anything.
 booleanreturnsRows()
     Returns TRUE if the statement returns rows (i.e.
 ExecRowsetAfterLastRow()
     Sets the current position to after the last row and returns NULL because there is no current row.
 ExecRowsetBeforeFirstRow()
     Sets the current position to before the first row and returns NULL because there is no current row.

Field Detail
CURRENT_RESULTSET_ONLY
final public static int CURRENT_RESULTSET_ONLY(Code)



ENTIRE_RESULTSET_TREE
final public static int ENTIRE_RESULTSET_TREE(Code)



ISAFTERLAST
final public static int ISAFTERLAST(Code)



ISBEFOREFIRST
final public static int ISBEFOREFIRST(Code)



ISFIRST
final public static int ISFIRST(Code)



ISLAST
final public static int ISLAST(Code)





Method Detail
checkRowPosition
public boolean checkRowPosition(int isType) throws StandardException(Code)
Determine if the result set is at one of the positions according to the constants above (ISBEFOREFIRST etc). Only valid and called for scrollable cursors. true if at the requested position.
exception:
  StandardException - Thrown on error.



cleanUp
void cleanUp() throws StandardException(Code)
Tells the system to clean up on an error.
exception:
  StandardException - Thrown on error.



clearCurrentRow
void clearCurrentRow()(Code)
Clear the current row. The cursor keeps it current position, however it cannot be used for positioned updates or deletes until a fetch is done. This is done after a commit on holdable result sets. A fetch is achieved by calling one of the positioning methods: getLastRow(), getNextRow(), getPreviousRow(), getFirstRow(), getRelativeRow(..) or getAbsoluteRow(..).



close
void close() throws StandardException(Code)
Tells the system that there will be no more calls to getNextRow() (until the next open() call), so it can free up the resources associated with the ResultSet.
exception:
  StandardException - Thrown on error.



finish
void finish() throws StandardException(Code)
Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open(). Will close the result set if it is not already closed.
exception:
  StandardException - on error



getAbsoluteRow
ExecRow getAbsoluteRow(int row) throws StandardException(Code)
Returns the row at the absolute position from the query, and returns NULL when there is no such position. (Negative position means from the end of the result set.) Moving the cursor to an invalid position leaves the cursor positioned either before the first row (negative position) or after the last row (positive position). NOTE: An exception will be thrown on 0.
Parameters:
  row - The position. The row at the absolute position, or NULL if no such position.
exception:
  StandardException - Thrown on failure
See Also:   Row



getActivation
Activation getActivation()(Code)



getAutoGeneratedKeysResultset
public ResultSet getAutoGeneratedKeysResultset()(Code)
ResultSet for rows inserted into the table (contains auto-generated keys columns only) NoPutResultSet NoPutResultSets for rows inserted into the table.



getBeginExecutionTimestamp
public Timestamp getBeginExecutionTimestamp()(Code)
Get the Timestamp for the beginning of execution. Timestamp The Timestamp for the beginning of execution.



getCursorName
public String getCursorName()(Code)
Returns the name of the cursor, if this is cursor statement of some type (declare, open, fetch, positioned update, positioned delete, close). A String with the name of the cursor, if any. ReturnsNULL if this is not a cursor statement.



getEndExecutionTimestamp
public Timestamp getEndExecutionTimestamp()(Code)
Get the Timestamp for the end of execution. Timestamp The Timestamp for the end of execution.



getExecuteTime
public long getExecuteTime()(Code)
Get the execution time in milliseconds. long The execution time in milliseconds.



getFirstRow
ExecRow getFirstRow() throws StandardException(Code)
Returns the first row from the query, and returns NULL when there are no rows. The first row, or NULL if no rows.
exception:
  StandardException - Thrown on failure
See Also:   Row



getLastRow
ExecRow getLastRow() throws StandardException(Code)
Returns the last row from the query, and returns NULL when there are no rows. The last row, or NULL if no rows.
exception:
  StandardException - Thrown on failure
See Also:   Row



getNextRow
ExecRow getNextRow() throws StandardException(Code)
Returns the next row from the query, and returns NULL when there are no more rows. The next row, or NULL if no more rows.
exception:
  StandardException - Thrown on failure
See Also:   Row



getPreviousRow
ExecRow getPreviousRow() throws StandardException(Code)
Returns the previous row from the query, and returns NULL when there are no more previous rows. The previous row, or NULL if no more previous rows.
exception:
  StandardException - Thrown on failure
See Also:   Row



getRelativeRow
ExecRow getRelativeRow(int row) throws StandardException(Code)
Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position. (Negative position means toward the beginning of the result set.) Moving the cursor to an invalid position leaves the cursor positioned either before the first row (negative position) or after the last row (positive position). NOTE: 0 is valid. NOTE: An exception is thrown if the cursor is not currently positioned on a row.
Parameters:
  row - The position. The row at the relative position, or NULL if no such position.
exception:
  StandardException - Thrown on failure
See Also:   Row



getResultDescription
ResultDescription getResultDescription()(Code)
Returns a ResultDescription object, which describes the results of the statement this ResultSet is in. This will *not* be a description of this particular ResultSet, if this is not the outermost ResultSet. A ResultDescription describing the results of thestatement.



getRowNumber
int getRowNumber()(Code)
Returns the row number of the current row. Row numbers start from 1 and go to 'n'. Corresponds to row numbering used to position current row in the result set (as per JDBC). Only valid and called for scrollable cursors. the row number, or 0 if not on a row



getSubqueryTrackingArray
public NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)(Code)
Get the subquery ResultSet tracking array from the top ResultSet. (Used for tracking open subqueries when closing down on an error.)
Parameters:
  numSubqueries - The size of the array (For allocation on demand.) NoPutResultSet[] Array of NoPutResultSets for subqueries.



getTimeSpent
public long getTimeSpent(int type)(Code)
Return the total amount of time spent in this ResultSet
Parameters:
  type - CURRENT_RESULTSET_ONLY - time spent only in this ResultSetENTIRE_RESULTSET_TREE - time spent in this ResultSet and below. long The total amount of time spent (in milliseconds).



getWarnings
public SQLWarning getWarnings()(Code)
Return the set of warnings generated during the execution of this result set. The warnings are cleared once this call returns.



isClosed
boolean isClosed()(Code)
Find out if the ResultSet is closed or not. Will report true for result sets that do not return rows. true if the ResultSet has been closed.



modifiedRowCount
int modifiedRowCount()(Code)
Returns the number of rows affected by the statement. Only valid of returnsRows() returns false. For other DML statements, it returns the number of rows modified by the statement. For statements that do not affect rows (like DDL statements), it returns zero. The number of rows affect by the statement, so far.



open
void open() throws StandardException(Code)
Needs to be called before the result set will do anything. Need to call before getNextRow(), or for a result set that doesn't return rows, this is the call that will cause all the work to be done.
exception:
  StandardException - Thrown on failure



returnsRows
boolean returnsRows()(Code)
Returns TRUE if the statement returns rows (i.e. is a SELECT or FETCH statement), FALSE if it returns no rows. TRUE if the statement returns rows, FALSE if not.



setAfterLastRow
ExecRow setAfterLastRow() throws StandardException(Code)
Sets the current position to after the last row and returns NULL because there is no current row. NULL.
exception:
  StandardException - Thrown on failure
See Also:   Row



setBeforeFirstRow
ExecRow setBeforeFirstRow() throws StandardException(Code)
Sets the current position to before the first row and returns NULL because there is no current row. NULL.
exception:
  StandardException - Thrown on failure
See Also:   Row



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