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


java.lang.Object
   org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl

All known Subclasses:   org.apache.derby.impl.sql.execute.NoPutResultSetImpl,
BasicNoPutResultSetImpl
abstract class BasicNoPutResultSetImpl implements NoPutResultSet(Code)
Abstract ResultSet for for operations that return rows but do not allow the caller to put data on output pipes. This basic implementation does not include support for an Activiation. See NoPutResultSetImpl.java for an implementaion with support for an activiation.

This abstract class does not define the entire ResultSet interface, but leaves the 'get' half of the interface for subtypes to implement. It is package-visible only, with its methods being public for exposure by its subtypes.



Field Summary
protected  Activationactivation
    
public  longbeginTime
    
public  longcloseTime
    
 ExecRowcompactRow
    
public  longconstructorTime
    
protected  ExecRowcurrentRow
    
protected  longendExecutionTime
    
protected  booleanfinished
    
protected  booleanisOpen
    
protected  booleanisTopResultSet
    
protected  LanguageConnectionContextlcc
    
public  longnextTime
    
public  intnumOpens
    
public  longopenTime
    
public  doubleoptimizerEstimatedCost
    
public  doubleoptimizerEstimatedRowCount
    
 ResultDescriptionresultDescription
    
public  introwsFiltered
    
public  introwsSeen
    
protected  longstartExecutionTime
    
public  NoPutResultSet[]subqueryTrackingArray
    

Constructor Summary
 BasicNoPutResultSetImpl(ResultDescription resultDescription, Activation activation, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
     Constructor.
Sets beginTime for all children to use to measue constructor time.
Parameters:
  resultDescription - the result description.

Method Summary
final protected  voidaddWarning(SQLWarning w)
    
protected  voidattachStatementContext()
     Attach this result set to the top statement context on the stack. Result sets can be directly read from the JDBC layer.
public  voidcheckCancellationFlag()
     Checks whether the currently executing statement has been cancelled.
public  booleancheckRowPosition(int isType)
     Determine if the cursor is before the first row in the result set.
public  voidcleanUp()
    
final protected  StringdumpTimeStats(String indent, String subIndent)
     Dump out the time information for run time stats.
public  voidfinish()
    
final protected  voidfinishAndRTS()
    
public  ExecRowgetAbsoluteRow(int row)
     Returns the row at the absolute position from the query, and returns NULL when there is no such position.
final public  ActivationgetActivation()
    
public  ResultSetgetAutoGeneratedKeysResultset()
    
public  TimestampgetBeginExecutionTimestamp()
     Get the Timestamp for the beginning of execution.
protected  ExecRowgetCompactRow(ExecRow candidate, FormatableBitSet accessedCols, FormatableBitSet otherCols, boolean isKeyed)
     Get a compacted version of the candidate row according to the columns specified in the bit map.
final protected  longgetCurrentTimeMillis()
     Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0.
final protected  longgetElapsedMillis(long beginTime)
     Return the elapsed time in milliseconds, between now and the beginTime, if DEBUG and RunTimeStats is on, else return 0.
public  TimestampgetEndExecutionTimestamp()
     Get the Timestamp for the end of execution.
public  doublegetEstimatedRowCount()
    
public  longgetExecuteTime()
     Get the execution time in milliseconds.
final  ExecutionFactorygetExecutionFactory()
    
public  ExecRowgetFirstRow()
     Returns the first row from the query, and returns NULL when there are no rows.
final protected  LanguageConnectionContextgetLanguageConnectionContext()
     Cache the language connection context.
public  ExecRowgetLastRow()
     Returns the last row from the query, and returns NULL when there are no rows.
final public  ExecRowgetNextRow()
     Return the requested values computed from the next row (if any) for which the restriction evaluates to true.

restriction and projection parameters are evaluated for each row. NOTE: This method should only be called on the top ResultSet of a ResultSet tree to ensure that the entire ResultSet tree gets closed down on an error.

abstract public  ExecRowgetNextRowCore()
    
public  intgetPointOfAttachment()
    
public  ExecRowgetPreviousRow()
     Returns the previous row from the query, and returns NULL when there are no more previous rows.
public  ExecRowgetRelativeRow(int row)
     Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position.
public  ResultDescriptiongetResultDescription()
    
public  intgetRowNumber()
     Returns the row number of the current row.
public  intgetScanIsolationLevel()
    
final public  NoPutResultSet[]getSubqueryTrackingArray(int numSubqueries)
    
final  TransactionControllergetTransactionController()
     Get the current transaction controller.
final public  SQLWarninggetWarnings()
    
public  booleanisClosed()
     Report if closed.
public  booleanisForUpdate()
    
public  voidmarkAsTopResultSet()
     Mark the ResultSet as the topmost one in the ResultSet tree.
final public  intmodifiedRowCount()
    
final public  voidopen()
     open a scan on the table.
abstract public  voidopenCore()
    
public  voidreopenCore()
     This is the default implementation of reopenCore(). It simply does a close() followed by an open().
public  booleanrequiresRelocking()
    
public  intresultSetNumber()
    
public  booleanreturnsRows()
     Returns true.
public  ExecRowsetAfterLastRow()
     Sets the current position to after the last row and returns NULL because there is no current row.
public  ExecRowsetBeforeFirstRow()
     Sets the current position to before the first row and returns NULL because there is no current row.
protected  ExecRowsetCompactRow(ExecRow candidateRow, ExecRow compactRow)
     Copy columns from the candidate row from the store to the given compact row.
final protected  voidsetCompatRow(ExecRow compactRow, Object[] sourceRow)
    

Field Detail
activation
protected Activation activation(Code)



beginTime
public long beginTime(Code)



closeTime
public long closeTime(Code)



compactRow
ExecRow compactRow(Code)



constructorTime
public long constructorTime(Code)



currentRow
protected ExecRow currentRow(Code)



endExecutionTime
protected long endExecutionTime(Code)



finished
protected boolean finished(Code)



isOpen
protected boolean isOpen(Code)



isTopResultSet
protected boolean isTopResultSet(Code)



lcc
protected LanguageConnectionContext lcc(Code)



nextTime
public long nextTime(Code)



numOpens
public int numOpens(Code)



openTime
public long openTime(Code)



optimizerEstimatedCost
public double optimizerEstimatedCost(Code)



optimizerEstimatedRowCount
public double optimizerEstimatedRowCount(Code)



resultDescription
ResultDescription resultDescription(Code)



rowsFiltered
public int rowsFiltered(Code)



rowsSeen
public int rowsSeen(Code)



startExecutionTime
protected long startExecutionTime(Code)



subqueryTrackingArray
public NoPutResultSet[] subqueryTrackingArray(Code)




Constructor Detail
BasicNoPutResultSetImpl
BasicNoPutResultSetImpl(ResultDescription resultDescription, Activation activation, double optimizerEstimatedRowCount, double optimizerEstimatedCost)(Code)
Constructor.
Sets beginTime for all children to use to measue constructor time.
Parameters:
  resultDescription - the result description. May be null.
Parameters:
  activation - The activation
Parameters:
  optimizerEstimatedRowCount - The optimizer's estimate of thetotal number of rows for thisresult set
Parameters:
  optimizerEstimatedCost - The optimizer's estimated cost forthis result set




Method Detail
addWarning
final protected void addWarning(SQLWarning w)(Code)



attachStatementContext
protected void attachStatementContext() throws StandardException(Code)
Attach this result set to the top statement context on the stack. Result sets can be directly read from the JDBC layer. The JDBC layer will push and pop a statement context around each ResultSet.getNext(). There's no guarantee that the statement context used for the last getNext() will be the context used for the current getNext(). The last statement context may have been popped off the stack and so will not be available for cleanup if an error occurs. To make sure that we will be cleaned up, we always attach ourselves to the top context. The fun and games occur in nested contexts: using JDBC result sets inside user code that is itself invoked from queries or CALL statements.
exception:
  StandardException - thrown if cursor finished.



checkCancellationFlag
public void checkCancellationFlag() throws StandardException(Code)
Checks whether the currently executing statement has been cancelled. This is done by checking the statement's allocated StatementContext object.
See Also:   StatementContext



checkRowPosition
public boolean checkRowPosition(int isType) throws StandardException(Code)
Determine if the cursor is before the first row in the result set. true if before the first row, false otherwise. Returnsfalse when the result set contains no rows.



cleanUp
public void cleanUp() throws StandardException(Code)
Clean up on error
exception:
  StandardException - Thrown on failure



dumpTimeStats
final protected String dumpTimeStats(String indent, String subIndent)(Code)
Dump out the time information for run time stats. Nothing.



finish
public void finish() throws StandardException(Code)



finishAndRTS
final protected void finishAndRTS() throws StandardException(Code)

exception:
  StandardException - on error



getAbsoluteRow
public 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
final public Activation getActivation()(Code)



getAutoGeneratedKeysResultset
public ResultSet getAutoGeneratedKeysResultset()(Code)

See Also:   ResultSet.getAutoGeneratedKeysResultset



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



getCompactRow
protected ExecRow getCompactRow(ExecRow candidate, FormatableBitSet accessedCols, FormatableBitSet otherCols, boolean isKeyed) throws StandardException(Code)
Get a compacted version of the candidate row according to the columns specified in the bit map. Share the holders between rows. If there is no bit map, use the candidate row as the compact row. Also, create an array of ints mapping base column positions to compact column positions, to make it cheaper to copy columns to the compact row, if we ever have to do it again.
Parameters:
  candidate - The row to get the columns from
Parameters:
  accessedCols - A bit map of the columns that are accessed inthe candidate row
Parameters:
  otherCols - An bit map of other column ids - this is usedin case columns from an index row will becopied into a heap row - in this case, weneed to be sure there are enough columns inthe compact row. This parameter is null ifcolumns will not be copied from an index rowto a compact heap row. The column numbers inthe bit map are zero-based.
Parameters:
  isKeyed - Tells whether to return a ValueRow or an IndexRow A compact row.



getCurrentTimeMillis
final protected long getCurrentTimeMillis()(Code)
Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0. (Only pay price of system call if need to.) long Current time in milliseconds.



getElapsedMillis
final protected long getElapsedMillis(long beginTime)(Code)
Return the elapsed time in milliseconds, between now and the beginTime, if DEBUG and RunTimeStats is on, else return 0. (Only pay price of system call if need to.) long Elapsed time in milliseconds.



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



getEstimatedRowCount
public double getEstimatedRowCount()(Code)

See Also:   NoPutResultSet.getEstimatedRowCount
See Also:   



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



getExecutionFactory
final ExecutionFactory getExecutionFactory()(Code)
Get a execution factory the execution factory



getFirstRow
public 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



getLanguageConnectionContext
final protected LanguageConnectionContext getLanguageConnectionContext()(Code)
Cache the language connection context. Return it. the language connection context



getLastRow
public 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
final public ExecRow getNextRow() throws StandardException(Code)
Return the requested values computed from the next row (if any) for which the restriction evaluates to true.

restriction and projection parameters are evaluated for each row. NOTE: This method should only be called on the top ResultSet of a ResultSet tree to ensure that the entire ResultSet tree gets closed down on an error. the getNextRowCore() method will be called for all other ResultSets in the tree.
exception:
  StandardException - thrown on failure.
exception:
  StandardException - ResultSetNotOpen thrown if not yet open. the next row in the result




getNextRowCore
abstract public ExecRow getNextRowCore() throws StandardException(Code)

See Also:   NoPutResultSet.getNextRowCore
exception:
  StandardException - thrown if cursor finished.



getPointOfAttachment
public int getPointOfAttachment()(Code)

See Also:   NoPutResultSet.getPointOfAttachment



getPreviousRow
public 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
public 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
public ResultDescription getResultDescription()(Code)
Returns the description of the table's rows



getRowNumber
public 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). the row number, or 0 if not on a row



getScanIsolationLevel
public int getScanIsolationLevel()(Code)

See Also:   NoPutResultSet.getScanIsolationLevel



getSubqueryTrackingArray
final public NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)(Code)

See Also:   ResultSet.getSubqueryTrackingArray



getTransactionController
final TransactionController getTransactionController()(Code)
Get the current transaction controller.



getWarnings
final public SQLWarning getWarnings()(Code)



isClosed
public boolean isClosed()(Code)
Report if closed.



isForUpdate
public boolean isForUpdate()(Code)
Is this ResultSet or it's source result set for update This method will be overriden in the inherited Classes if it is true Whether or not the result set is for update.



markAsTopResultSet
public void markAsTopResultSet()(Code)
Mark the ResultSet as the topmost one in the ResultSet tree. Useful for closing down the ResultSet on an error.



modifiedRowCount
final public int modifiedRowCount()(Code)



open
final public void open() throws StandardException(Code)
open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values... NOTE: This method should only be called on the top ResultSet of a ResultSet tree to ensure that the entire ResultSet tree gets closed down on an error. the openCore() method will be called for all other ResultSets in the tree.
exception:
  StandardException - thrown if cursor finished.



openCore
abstract public void openCore() throws StandardException(Code)

See Also:   NoPutResultSet.openCore
exception:
  StandardException - thrown if cursor finished.



reopenCore
public void reopenCore() throws StandardException(Code)
This is the default implementation of reopenCore(). It simply does a close() followed by an open(). If there are optimizations to be made (caching, etc), this is a good place to do it -- this will be overridden by a number of resultSet imlementations. and SHOULD be overridden by any node that can get between a base table and a join.
See Also:   NoPutResultSet.openCore
exception:
  StandardException - thrown if cursor finished.



requiresRelocking
public boolean requiresRelocking()(Code)

See Also:   NoPutResultSet.requiresRelocking



resultSetNumber
public int resultSetNumber()(Code)

See Also:   NoPutResultSet.resultSetNumber
See Also:   



returnsRows
public boolean returnsRows()(Code)
Returns true.



setAfterLastRow
public 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
public 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



setCompactRow
protected ExecRow setCompactRow(ExecRow candidateRow, ExecRow compactRow)(Code)
Copy columns from the candidate row from the store to the given compact row. If there is no column map, just use the candidate row. This method assumes the above method (getCompactRow()) was called first. getCompactRow() sets up the baseColumnMap.
Parameters:
  candidateRow - The candidate row from the store
Parameters:
  compactRow - The compact row to fill in The compact row to use



setCompatRow
final protected void setCompatRow(ExecRow compactRow, Object[] sourceRow)(Code)



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.