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


org.apache.derby.iapi.store.access.ScanController

ScanController
public interface ScanController extends GenericScanController(Code)
A scan is the mechanism for iterating over the rows in a conglomerate, the scan controller is the interface through which access clients control the underlying scan. An instance of a scan controller can be thought of as an open scan.

Scans are opened from a TransactionController.

A ScanController can handle partial rows. Partial rows are described in RowUtil.
A scan controller is opened with a FormatableBitSet that describes the columns that need to be returned on a fetch call. This FormatableBitSet need not include any columns referenced in the qualifers, start and/or stop keys.
See Also:   TransactionController.openScan
See Also:   GenericScanController
See Also:   RowCountable
See Also:   RowUtil



Field Summary
final public static  intGE
     GE is used to position a scan at values greater than or or equal to the given key in the scan.
final public static  intGT
     GT is used to position a scan at values greater than the given key. This positioning argument refers to the order within the scan (not necessarily actual compare calls on the datatypes).
final public static  intNA
     NA - argument is unused in call.


Method Summary
 booleandelete()
     Delete the row at the current position of the scan. true if the delete was successful,false if the current position is no longer valid (ie.
 voiddidNotQualify()
     A call to allow client to indicate that current row does not qualify.

Indicates to the ScanController that the current row does not qualify for the scan.

 booleandoesCurrentPositionQualify()
     Returns true if the current position of the scan still qualifies under the set of qualifiers passed to the openScan().
 voidfetch(DataValueDescriptor[] destRow)
     Fetch the (partial) row at the current position of the Scan. The value in the destRow storable row is replaced with the value of the row at the current scan position.
 voidfetchLocation(RowLocation destRowLocation)
     Fetch the location of the current position in the scan.
 booleanfetchNext(DataValueDescriptor[] destRow)
     Fetch the (partial) row at the next position of the Scan. If there is a valid next position in the scan then the value in the destRow storable row is replaced with the value of the row at the current scan position.
 voidfetchWithoutQualify(DataValueDescriptor[] destRow)
     The same as fetch, except that the qualifiers passed to the openScan() will not be applied.
 booleanisCurrentPositionDeleted()
     Returns true if the current position of the scan is at a deleted row.
 booleannext()
     Move to the next position in the scan.
 booleanpositionAtRowLocation(RowLocation rl)
     Positions the scan at row location and locks the row.
 booleanreplace(DataValueDescriptor[] row, FormatableBitSet validColumns)
     Replace the (partial) row at the current position of the scan. true if the replace was successful,false if the current position is no longer valid (ie.

Field Detail
GE
final public static int GE(Code)
GE is used to position a scan at values greater than or or equal to the given key in the scan. This positioning argument refers to the order within the scan (not necessarily actual compare calls on the datatypes). "greater" than is interpreted in terms of the current conglomerate and scan. For instance, a btree may be ordered ascending on an int, in that case a 2 is "greater" than 1 in a forward scan on that index, and 1 is "greater" than 2 in a backward scan. If the btree was ordered descending on an int then 1 is "greater" than 2 in a forward scan on that index, and 2 is "greater" than 1 in a backward scan.
See Also:   TransactionController.openScan



GT
final public static int GT(Code)
GT is used to position a scan at values greater than the given key. This positioning argument refers to the order within the scan (not necessarily actual compare calls on the datatypes). "greater" than is interpreted in terms of the current conglomerate and scan. For instance, a btree may be ordered ascending on an int, in that case a 2 is "greater" than 1 in a forward scan on that index, and 1 is "greater" than 2 in a backward scan. If the btree was ordered descending on an int then 1 is "greater" than 2 in a forward scan on that index, and 2 is "greater" than 1 in a backward scan.
See Also:   TransactionController.openScan



NA
final public static int NA(Code)
NA - argument is unused in call. For some scans the key is set to null to indicate no start or stop position, in those cases the position operator is ignored.
See Also:   TransactionController.openScan





Method Detail
delete
boolean delete() throws StandardException(Code)
Delete the row at the current position of the scan. true if the delete was successful,false if the current position is no longer valid (ie. if it was alreadydeleted).
exception:
  StandardException - Standard exception policy.



didNotQualify
void didNotQualify() throws StandardException(Code)
A call to allow client to indicate that current row does not qualify.

Indicates to the ScanController that the current row does not qualify for the scan. If the isolation level of the scan allows, this may result in the scan releasing the lock on this row.

Note that some scan implimentations may not support releasing locks on non-qualifying rows, or may delay releasing the lock until sometime later in the scan (ie. it may be necessary to keep the lock until either the scan is repositioned on the next row or page).

This call should only be made while the scan is positioned on a current valid row.
exception:
  StandardException - Standard exception policy.




doesCurrentPositionQualify
boolean doesCurrentPositionQualify() throws StandardException(Code)
Returns true if the current position of the scan still qualifies under the set of qualifiers passed to the openScan(). When called this routine will reapply all qualifiers against the row currently positioned and return true if the row still qualifies. If the row has been deleted or no longer passes the qualifiers then this routine will return false. This case can come about if the current scan or another scan on the same table in the same transaction deleted the row or changed columns referenced by the qualifier after the next() call which positioned the scan at this row. Note that for comglomerates which don't support update, like btree's, there is no need to recheck the qualifiers. The results of a fetch() performed on a scan positioned on a deleted row are undefined, note that this can happen even if next() has returned true (for instance the client can delete the row, or if using read uncommitted another thread can delete the row after the next() call but before the fetch).
exception:
  StandardException - Standard exception policy.



fetch
void fetch(DataValueDescriptor[] destRow) throws StandardException(Code)
Fetch the (partial) row at the current position of the Scan. The value in the destRow storable row is replaced with the value of the row at the current scan position. The columns of the destRow row must be of the same type as the actual columns in the underlying conglomerate. The number of elements in fetch must be compatible with the number of scan columns requested at the openScan call time.
A fetch can return a sub-set of the scan columns reqested at scan open time by supplying a destRow will less elements than the number of requested columns. In this case the N leftmost of the requested columns are fetched, where N = destRow.length. In the case where all columns are rested and N = 2 then columns 0 and 1 are returned. In the case where the openScan FormatableBitSet requested columns 1, 4 and 7, then columns 1 and 4 would be fetched when N = 2.
The results of a fetch() performed on a scan after next() has returned false are undefined. A fetch() performed on a scan positioned on a deleted row will throw a StandardException with state = SQLState.AM_RECORD_NOT_FOUND. Note that this can happen even if next() has returned true (for instance the client can delete the row, or if using read uncommitted another thread can delete the row after the next() call but before the fetch).
Parameters:
  destRow - The row into which the value of the current position in the scan is to be stored.
exception:
  StandardException - Standard exception policy.
See Also:   RowUtil



fetchLocation
void fetchLocation(RowLocation destRowLocation) throws StandardException(Code)
Fetch the location of the current position in the scan. The destination location is replaced with the location corresponding to the current position in the scan. The destination location must be of the correct actual type to accept a location from the underlying conglomerate location. The results of a fetchLocation() performed on a scan after next() has returned false are undefined. The results of a fetchLocation() performed on a scan positioned on a deleted row are undefined, note that this can happen even if next() has returned true (for instance the client can delete the row, or if using read uncommitted another thread can delete the row after the next() call but before the fetchLocation).
exception:
  StandardException - Standard exception policy.



fetchNext
boolean fetchNext(DataValueDescriptor[] destRow) throws StandardException(Code)
Fetch the (partial) row at the next position of the Scan. If there is a valid next position in the scan then the value in the destRow storable row is replaced with the value of the row at the current scan position. The columns of the destRow row must be of the same type as the actual columns in the underlying conglomerate. The resulting contents of destRow after a fetchNext() which returns false is undefined. The result of calling fetchNext(row) is exactly logically equivalent to making a next() call followed by a fetch(row) call. This interface allows implementations to optimize the 2 calls if possible.
Parameters:
  destRow - The destRow row into which the valueof the next position in the scan is to be stored. True if there is a next position in the scan,false if there isn't.
exception:
  StandardException - Standard exception policy.
See Also:   ScanController.fetch
See Also:   RowUtil



fetchWithoutQualify
void fetchWithoutQualify(DataValueDescriptor[] destRow) throws StandardException(Code)
The same as fetch, except that the qualifiers passed to the openScan() will not be applied. destRow will contain the current row even if it has been changed and no longer qualifies.
Parameters:
  destRow - The row into which the value of the current position in the scan is to be stored.
exception:
  StandardException - Standard exception policy.



isCurrentPositionDeleted
boolean isCurrentPositionDeleted() throws StandardException(Code)
Returns true if the current position of the scan is at a deleted row. This case can come about if the current scan or another scan on the same table in the same transaction deleted the row after the next() call which positioned the scan at this row. The results of a fetch() performed on a scan positioned on a deleted row are undefined.
exception:
  StandardException - Standard exception policy.



next
boolean next() throws StandardException(Code)
Move to the next position in the scan. If this is the first call to next(), the position is set to the first row. Returns false if there is not a next row to move to. It is possible, but not guaranteed, that this method could return true again, after returning false, if some other operation in the same transaction appended a row to the underlying conglomerate. True if there is a next position in the scan,false if there isn't.
exception:
  StandardException - Standard exception policy.



positionAtRowLocation
boolean positionAtRowLocation(RowLocation rl) throws StandardException(Code)
Positions the scan at row location and locks the row. If the scan is not opened, it will be reopened if this is a holdable scan and there has not been any operations which causes RowLocations to be invalidated.
Parameters:
  rl - RowLocation for the new position for the scan. The RowLocation submitted should be a RowLocation which has previously been returned by this ScanController. true if the scan has been positioned at the RowLocation.false if the scan could not be positioned.
exception:
  StandardException - Standard exception policy.



replace
boolean replace(DataValueDescriptor[] row, FormatableBitSet validColumns) throws StandardException(Code)
Replace the (partial) row at the current position of the scan. true if the replace was successful,false if the current position is no longer valid (ie. if it was deleted).
exception:
  StandardException - Standard exception policy.
See Also:   RowUtil



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