Java Doc for TableScanResultSet.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
      org.apache.derby.impl.sql.execute.NoPutResultSetImpl
         org.apache.derby.impl.sql.execute.TableScanResultSet

All known Subclasses:   org.apache.derby.impl.sql.execute.BulkTableScanResultSet,
TableScanResultSet
class TableScanResultSet extends NoPutResultSetImpl implements CursorResultSet,Cloneable(Code)
Takes a table and a table filter and returns the table's rows satisfying the filter as a result set. There are several things we could do during object construction that are done in the open & next calls, to improve performance.
author:
   ames


Field Summary
protected  FormatableBitSetaccessedCols
    
protected  ExecRowcandidate
    
public  booleancoarserLock
    
protected  booleancompareToLastKey
    
protected  longconglomId
    
protected  booleancurrentRowPrescanned
    
protected  DynamicCompiledOpenConglomInfodcoci
    
protected  booleanfirstScan
    
public  booleanforUpdate
    
protected  TemporaryRowHolderfutureForUpdateRows
    
protected  TemporaryRowHolderResultSetfutureRowResultSet
    
protected  int[]indexCols
    
public  StringindexName
    
public  booleanisConstraint
    
protected  booleanisKeyed
    
public  intisolationLevel
    
protected  ExecRowlastCursorKey
    
public  intlockMode
    
public  booleanoneRowScan
    
protected  Hashtablepast2FutureTbl
    
public  Qualifier[][]qualifiers
    
protected  GeneratedMethodresultRowAllocator
    
public  introwsPerRead
    
protected  longrowsThisScan
    
protected  booleanrunTimeStatisticsOn
    
protected  ScanControllerscanController
    
protected  booleanscanControllerOpened
    
protected  StaticCompiledOpenConglomInfoscoci
    
protected  booleanskipFutureRowHolder
    
protected  booleansourceDrained
    
protected  GeneratedMethodstartKeyGetter
    
protected  ExecIndexRowstartPosition
    
public  StringstartPositionString
    
protected  intstartSearchOperator
    
protected  GeneratedMethodstopKeyGetter
    
protected  ExecIndexRowstopPosition
    
public  StringstopPositionString
    
protected  intstopSearchOperator
    
public  StringtableName
    
public  StringuserSuppliedOptimizerOverrides
    

Constructor Summary
 TableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
    

Method Summary
protected  booleancanGetInstantaneousLocks()
     Can we get instantaneous locks when getting share row locks at READ COMMITTED.
public  Objectclone()
     Shallow clone this result set.
public  voidclose()
     If the result set has been opened, close the open scan.
public  ExecRowgetCurrentRow()
     This result set has its row from the last fetch done.
public  ExecRowgetNextRowCore()
     Return the next row (if any) from the scan (if open).
public  RowLocationgetRowLocation()
     This result set has its row location from the last fetch done.
public  intgetScanIsolationLevel()
    
public  PropertiesgetScanProperties()
    
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  booleanisForUpdate()
    
public  voidopenCore()
     open a scan on the table.
protected  voidopenScanController(TransactionController tc)
    
public  voidpositionScanAtRowLocation(RowLocation rl)
    
See Also:   NoPutResultSet.positionScanAtRowLocation
See Also:   Also sets qualify to false so that later calls to getCurrentRow
See Also:   will not attempt to re-qualify the current row.
public  StringprintStartPosition()
     Print an array of Qualifiers to the trace stream.
public  StringprintStopPosition()
    
public  voidreopenCore()
     Reopen a table scan.
public  booleanrequiresRelocking()
    
final protected  voidsetRowCountIfPossible(long rowsThisScan)
     Update the number of rows in the scan controller.

Field Detail
accessedCols
protected FormatableBitSet accessedCols(Code)



candidate
protected ExecRow candidate(Code)



coarserLock
public boolean coarserLock(Code)



compareToLastKey
protected boolean compareToLastKey(Code)



conglomId
protected long conglomId(Code)



currentRowPrescanned
protected boolean currentRowPrescanned(Code)



dcoci
protected DynamicCompiledOpenConglomInfo dcoci(Code)



firstScan
protected boolean firstScan(Code)



forUpdate
public boolean forUpdate(Code)



futureForUpdateRows
protected TemporaryRowHolder futureForUpdateRows(Code)



futureRowResultSet
protected TemporaryRowHolderResultSet futureRowResultSet(Code)



indexCols
protected int[] indexCols(Code)



indexName
public String indexName(Code)



isConstraint
public boolean isConstraint(Code)



isKeyed
protected boolean isKeyed(Code)



isolationLevel
public int isolationLevel(Code)



lastCursorKey
protected ExecRow lastCursorKey(Code)



lockMode
public int lockMode(Code)



oneRowScan
public boolean oneRowScan(Code)



past2FutureTbl
protected Hashtable past2FutureTbl(Code)



qualifiers
public Qualifier[][] qualifiers(Code)



resultRowAllocator
protected GeneratedMethod resultRowAllocator(Code)



rowsPerRead
public int rowsPerRead(Code)



rowsThisScan
protected long rowsThisScan(Code)



runTimeStatisticsOn
protected boolean runTimeStatisticsOn(Code)



scanController
protected ScanController scanController(Code)



scanControllerOpened
protected boolean scanControllerOpened(Code)



scoci
protected StaticCompiledOpenConglomInfo scoci(Code)



skipFutureRowHolder
protected boolean skipFutureRowHolder(Code)



sourceDrained
protected boolean sourceDrained(Code)



startKeyGetter
protected GeneratedMethod startKeyGetter(Code)



startPosition
protected ExecIndexRow startPosition(Code)



startPositionString
public String startPositionString(Code)



startSearchOperator
protected int startSearchOperator(Code)



stopKeyGetter
protected GeneratedMethod stopKeyGetter(Code)



stopPosition
protected ExecIndexRow stopPosition(Code)



stopPositionString
public String stopPositionString(Code)



stopSearchOperator
protected int stopSearchOperator(Code)



tableName
public String tableName(Code)



userSuppliedOptimizerOverrides
public String userSuppliedOptimizerOverrides(Code)




Constructor Detail
TableScanResultSet
TableScanResultSet(long conglomId, StaticCompiledOpenConglomInfo scoci, Activation activation, GeneratedMethod resultRowAllocator, int resultSetNumber, GeneratedMethod startKeyGetter, int startSearchOperator, GeneratedMethod stopKeyGetter, int stopSearchOperator, boolean sameStartStopPosition, Qualifier[][] qualifiers, String tableName, String userSuppliedOptimizerOverrides, String indexName, boolean isConstraint, boolean forUpdate, int colRefItem, int indexColItem, int lockMode, boolean tableLocked, int isolationLevel, int rowsPerRead, boolean oneRowScan, double optimizerEstimatedRowCount, double optimizerEstimatedCost) throws StandardException(Code)




Method Detail
canGetInstantaneousLocks
protected boolean canGetInstantaneousLocks()(Code)
Can we get instantaneous locks when getting share row locks at READ COMMITTED.



clone
public Object clone()(Code)
Shallow clone this result set. Used in trigger reference. beetle 4373.



close
public void close() throws StandardException(Code)
If the result set has been opened, close the open scan.
exception:
  StandardException - on error



getCurrentRow
public ExecRow getCurrentRow() throws StandardException(Code)
This result set has its row from the last fetch done. If the cursor is closed, the row has been deleted, or no longer qualifies (for forward only result sets) a null is returned.
See Also:   CursorResultSet the last row returned;
exception:
  StandardException - thrown on failure.



getNextRowCore
public ExecRow getNextRowCore() throws StandardException(Code)
Return the next row (if any) from the scan (if open).
exception:
  StandardException - thrown on failure to get next row



getRowLocation
public RowLocation getRowLocation() throws StandardException(Code)
This result set has its row location from the last fetch done. If the cursor is closed, or the row has been deleted a null is returned.
See Also:   CursorResultSet the row location of the current cursor row.
exception:
  StandardException - thrown on failure to get row location



getScanIsolationLevel
public int getScanIsolationLevel()(Code)

See Also:   NoPutResultSet.getScanIsolationLevel



getScanProperties
public Properties getScanProperties()(Code)



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).



isForUpdate
public boolean isForUpdate()(Code)
Is this ResultSet or it's source result set for update Whether or not the result set is for update.



openCore
public void openCore() 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...
exception:
  StandardException - thrown on failure to open



openScanController
protected void openScanController(TransactionController tc) throws StandardException(Code)



positionScanAtRowLocation
public void positionScanAtRowLocation(RowLocation rl) throws StandardException(Code)

See Also:   NoPutResultSet.positionScanAtRowLocation
See Also:   Also sets qualify to false so that later calls to getCurrentRow
See Also:   will not attempt to re-qualify the current row.



printStartPosition
public String printStartPosition()(Code)
Print an array of Qualifiers to the trace stream.



printStopPosition
public String printStopPosition()(Code)



reopenCore
public void reopenCore() throws StandardException(Code)
Reopen a table scan. Here we take advantage of the reopenScan() interface on scanController for optimimal performance on joins where we are an inner table.
exception:
  StandardException - thrown on failure to open



requiresRelocking
public boolean requiresRelocking()(Code)

See Also:   NoPutResultSet.requiresRelocking



setRowCountIfPossible
final protected void setRowCountIfPossible(long rowsThisScan) throws StandardException(Code)
Update the number of rows in the scan controller. NOTE: It would be more efficient to only update the scan controller if the optimizer's estimated number of rows were wrong by more than some threshold (like 10%). This would require a little more work than I have the time for now, however, as the row estimate that is given to this result set is the total number of rows for all scans, not the number of rows per scan.
Parameters:
  rowsThisScan - The number of rows to update the scanController to
exception:
  StandardException - Thrown on error



Fields inherited from org.apache.derby.impl.sql.execute.NoPutResultSetImpl
GeneratedMethod checkGM(Code)(Java Doc)
protected int[] checkNullCols(Code)(Java Doc)
protected ExecRow clonedExecRow(Code)(Java Doc)
protected int cncLen(Code)(Java Doc)
long heapConglomerate(Code)(Java Doc)
protected String indent(Code)(Java Doc)
final public int resultSetNumber(Code)(Java Doc)
protected int sourceDepth(Code)(Java Doc)
protected String subIndent(Code)(Java Doc)
protected TargetResultSet targetResultSet(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.execute.NoPutResultSetImpl
final public void clearCurrentRow()(Code)(Java Doc)
protected void clearOrderableCache(Qualifier[][] qualifiers) throws StandardException(Code)(Java Doc)
public void close() throws StandardException(Code)(Java Doc)
public void closeRowSource()(Code)(Java Doc)
public String getCursorName()(Code)(Java Doc)
public DataValueDescriptor[] getNextRowFromRowSource() throws StandardException(Code)(Java Doc)
public ResultDescription getResultDescription()(Code)(Java Doc)
public FormatableBitSet getValidColumns()(Code)(Java Doc)
public boolean isForUpdate()(Code)(Java Doc)
public void markRowAsDeleted() throws StandardException(Code)(Java Doc)
public boolean needsRowLocation()(Code)(Java Doc)
public boolean needsToClone()(Code)(Java Doc)
public void positionScanAtRowLocation(RowLocation rl) throws StandardException(Code)(Java Doc)
public static String printQualifiers(Qualifier[][] qualifiers)(Code)(Java Doc)
public int resultSetNumber()(Code)(Java Doc)
public void rowLocation(RowLocation rl) throws StandardException(Code)(Java Doc)
protected void setCheckConstraints(GeneratedMethod checkGM)(Code)(Java Doc)
final public void setCurrentRow(ExecRow row)(Code)(Java Doc)
protected void setHeapConglomerate(long heapConglomerate)(Code)(Java Doc)
public void setNeedsRowLocation(boolean needsRowLocation)(Code)(Java Doc)
public void setTargetResultSet(TargetResultSet trs)(Code)(Java Doc)
protected boolean skipRow(ExecRow row) throws StandardException(Code)(Java Doc)
protected boolean skipScan(ExecIndexRow startPosition, ExecIndexRow stopPosition) throws StandardException(Code)(Java Doc)
public void updateRow(ExecRow row) throws StandardException(Code)(Java Doc)

Fields inherited from org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
protected Activation activation(Code)(Java Doc)
public long beginTime(Code)(Java Doc)
public long closeTime(Code)(Java Doc)
ExecRow compactRow(Code)(Java Doc)
public long constructorTime(Code)(Java Doc)
protected ExecRow currentRow(Code)(Java Doc)
protected long endExecutionTime(Code)(Java Doc)
protected boolean finished(Code)(Java Doc)
protected boolean isOpen(Code)(Java Doc)
protected boolean isTopResultSet(Code)(Java Doc)
protected LanguageConnectionContext lcc(Code)(Java Doc)
public long nextTime(Code)(Java Doc)
public int numOpens(Code)(Java Doc)
public long openTime(Code)(Java Doc)
public double optimizerEstimatedCost(Code)(Java Doc)
public double optimizerEstimatedRowCount(Code)(Java Doc)
ResultDescription resultDescription(Code)(Java Doc)
public int rowsFiltered(Code)(Java Doc)
public int rowsSeen(Code)(Java Doc)
protected long startExecutionTime(Code)(Java Doc)
public NoPutResultSet[] subqueryTrackingArray(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
final protected void addWarning(SQLWarning w)(Code)(Java Doc)
protected void attachStatementContext() throws StandardException(Code)(Java Doc)
public void checkCancellationFlag() throws StandardException(Code)(Java Doc)
public boolean checkRowPosition(int isType) throws StandardException(Code)(Java Doc)
public void cleanUp() throws StandardException(Code)(Java Doc)
final protected String dumpTimeStats(String indent, String subIndent)(Code)(Java Doc)
public void finish() throws StandardException(Code)(Java Doc)
final protected void finishAndRTS() throws StandardException(Code)(Java Doc)
public ExecRow getAbsoluteRow(int row) throws StandardException(Code)(Java Doc)
final public Activation getActivation()(Code)(Java Doc)
public ResultSet getAutoGeneratedKeysResultset()(Code)(Java Doc)
public Timestamp getBeginExecutionTimestamp()(Code)(Java Doc)
protected ExecRow getCompactRow(ExecRow candidate, FormatableBitSet accessedCols, FormatableBitSet otherCols, boolean isKeyed) throws StandardException(Code)(Java Doc)
final protected long getCurrentTimeMillis()(Code)(Java Doc)
final protected long getElapsedMillis(long beginTime)(Code)(Java Doc)
public Timestamp getEndExecutionTimestamp()(Code)(Java Doc)
public double getEstimatedRowCount()(Code)(Java Doc)
public long getExecuteTime()(Code)(Java Doc)
final ExecutionFactory getExecutionFactory()(Code)(Java Doc)
public ExecRow getFirstRow() throws StandardException(Code)(Java Doc)
final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc)
public ExecRow getLastRow() throws StandardException(Code)(Java Doc)
final public ExecRow getNextRow() throws StandardException(Code)(Java Doc)
abstract public ExecRow getNextRowCore() throws StandardException(Code)(Java Doc)
public int getPointOfAttachment()(Code)(Java Doc)
public ExecRow getPreviousRow() throws StandardException(Code)(Java Doc)
public ExecRow getRelativeRow(int row) throws StandardException(Code)(Java Doc)
public ResultDescription getResultDescription()(Code)(Java Doc)
public int getRowNumber()(Code)(Java Doc)
public int getScanIsolationLevel()(Code)(Java Doc)
final public NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)(Code)(Java Doc)
final TransactionController getTransactionController()(Code)(Java Doc)
final public SQLWarning getWarnings()(Code)(Java Doc)
public boolean isClosed()(Code)(Java Doc)
public boolean isForUpdate()(Code)(Java Doc)
public void markAsTopResultSet()(Code)(Java Doc)
final public int modifiedRowCount()(Code)(Java Doc)
final public void open() throws StandardException(Code)(Java Doc)
abstract public void openCore() throws StandardException(Code)(Java Doc)
public void reopenCore() throws StandardException(Code)(Java Doc)
public boolean requiresRelocking()(Code)(Java Doc)
public int resultSetNumber()(Code)(Java Doc)
public boolean returnsRows()(Code)(Java Doc)
public ExecRow setAfterLastRow() throws StandardException(Code)(Java Doc)
public ExecRow setBeforeFirstRow() throws StandardException(Code)(Java Doc)
protected ExecRow setCompactRow(ExecRow candidateRow, ExecRow compactRow)(Code)(Java Doc)
final protected void setCompatRow(ExecRow compactRow, Object[] sourceRow)(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.