Java Doc for DataCursor.java in  » JMX » je » com » sleepycat » collections » 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 » JMX » je » com.sleepycat.collections 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sleepycat.collections.DataCursor

DataCursor
final class DataCursor implements Cloneable(Code)
Represents a Berkeley DB cursor and adds support for indices, bindings and key ranges.

This class operates on a view and takes care of reading and updating indices, calling bindings, constraining access to a key range, etc.


author:
   Mark Hayes


Field Summary
final static  intREPOS_EOF
     Repositioned failed, no records on or after the key/data pair given.
final static  intREPOS_EXACT
     Repositioned exactly to the key/data pair given.
final static  intREPOS_NEXT
     Repositioned on a record following the key/data pair given.

Constructor Summary
 DataCursor(DataView view, boolean writeAllowed)
     Creates a cursor for a given view.
 DataCursor(DataView view, boolean writeAllowed, CursorConfig config)
     Creates a cursor for a given view.
 DataCursor(DataView view, boolean writeAllowed, Object singleKey)
     Creates a cursor for a given view and single key range.
 DataCursor(DataView view, boolean writeAllowed, Object beginKey, boolean beginInclusive, Object endKey, boolean endInclusive)
     Creates a cursor for a given view and key range.
 DataCursor(DataView view, DataCursor[] indexCursors, JoinConfig joinConfig, boolean closeIndexCursors)
     Creates a join cursor.

Method Summary
 DataCursorcloneCursor()
     Clones a cursor preserving the current position.
 voidclose()
     Closes the associated cursor.
 intcount()
     Calls Cursor.count(), no join cursor allowed.
 OperationStatusdelete()
     Perform an arbitrary database 'delete' operation.
 OperationStatusfindBoth(Object key, Object value, boolean lockForWrite)
     Find the given key and value using getSearchBoth if possible or a sequential scan otherwise, no join cursor allowed.
 OperationStatusfindValue(Object value, boolean findFirst)
     Find the given value using getSearchBoth if possible or a sequential scan otherwise, no join cursor allowed.
 OperationStatusgetCurrent(boolean lockForWrite)
     Binding version of Cursor.getCurrent(), no join cursor allowed.
 ObjectgetCurrentKey()
     Returns the key object for the last record read.
 intgetCurrentRecordNumber()
     Returns the record number for the last record read.
 ObjectgetCurrentValue()
     Returns the value object for the last record read.
 RangeCursorgetCursor()
     Returns the internal range cursor.
 OperationStatusgetFirst(boolean lockForWrite)
     Binding version of Cursor.getFirst(), join cursor is allowed.
 DatabaseEntrygetKeyThang()
     Returns the internal key entry.
 OperationStatusgetLast(boolean lockForWrite)
     Binding version of Cursor.getLast(), no join cursor allowed.
 LockModegetLockMode(boolean lockForWrite)
     Returns the lock mode to use for a getXxx() operation.
 OperationStatusgetNext(boolean lockForWrite)
     Binding version of Cursor.getNext(), join cursor is allowed.
 OperationStatusgetNextDup(boolean lockForWrite)
     Binding version of Cursor.getNextDup(), no join cursor allowed.
 OperationStatusgetNextNoDup(boolean lockForWrite)
     Binding version of Cursor.getNext(), join cursor is allowed.
 OperationStatusgetPrev(boolean lockForWrite)
     Binding version of Cursor.getPrev(), no join cursor allowed.
 OperationStatusgetPrevDup(boolean lockForWrite)
     Binding version of Cursor.getPrevDup(), no join cursor allowed.
 OperationStatusgetPrevNoDup(boolean lockForWrite)
     Binding version of Cursor.getPrevNoDup(), no join cursor allowed.
 DatabaseEntrygetPrimaryKeyThang()
     Returns the internal primary key entry, which is the same object as the key entry if the cursor is not for a secondary database.
 KeyRangegetRange()
     Returns the range for this cursor.
 OperationStatusgetSearchKey(Object key, Object value, boolean lockForWrite)
     Binding version of Cursor.getSearchKey(), no join cursor allowed.
 OperationStatusgetSearchKeyRange(Object key, Object value, boolean lockForWrite)
     Binding version of Cursor.getSearchKeyRange(), no join cursor allowed.
 DatabaseEntrygetValueThang()
     Returns the internal value entry.
 DataViewgetView()
     Returns the view for this cursor.
 booleanhasRecNumAccess()
     Returns whether record number access is allowed.
 booleanisWriteAllowed()
     Returns whether write is allowed for this cursor, as specified to the constructor.
 OperationStatusput(Object key, Object value, Object[] oldValue, boolean useCurrentKey)
     Binding version of Cursor.put(), optionally returning the old value and optionally using the current key instead of the key parameter.
 OperationStatusputAfter(Object value)
     Binding version of Cursor.putAfter().
 OperationStatusputBefore(Object value)
     Binding version of Cursor.putBefore().
 OperationStatusputCurrent(Object value)
     Binding version of Cursor.putCurrent().
 OperationStatusputNoDupData(Object key, Object value, Object[] oldValue, boolean useCurrentKey)
     Binding version of Cursor.putNoDupData(), optionally returning the old value and optionally using the current key instead of the key parameter.
 OperationStatusputNoOverwrite(Object key, Object value, boolean useCurrentKey)
     Binding version of Cursor.putNoOverwrite(), optionally using the current key instead of the key parameter.
 booleanrepositionExact(byte[] keyBytes, byte[] priKeyBytes, byte[] valueBytes, boolean lockForWrite)
     Repositions to a given raw key/data pair.
throws:
  IllegalStateException - when the database has unordered keys orunordered duplicates.
 intrepositionRange(byte[] keyBytes, byte[] priKeyBytes, byte[] valueBytes, boolean lockForWrite)
     Repositions to a given raw key/data pair, or just past it if that record has been deleted.
 voiduseRangeKey()
     Sets the key entry to the begin key of a single key range, so the next time a putXxx() method is called that key will be used.

Field Detail
REPOS_EOF
final static int REPOS_EOF(Code)
Repositioned failed, no records on or after the key/data pair given.



REPOS_EXACT
final static int REPOS_EXACT(Code)
Repositioned exactly to the key/data pair given.



REPOS_NEXT
final static int REPOS_NEXT(Code)
Repositioned on a record following the key/data pair given.




Constructor Detail
DataCursor
DataCursor(DataView view, boolean writeAllowed) throws DatabaseException(Code)
Creates a cursor for a given view.



DataCursor
DataCursor(DataView view, boolean writeAllowed, CursorConfig config) throws DatabaseException(Code)
Creates a cursor for a given view.



DataCursor
DataCursor(DataView view, boolean writeAllowed, Object singleKey) throws DatabaseException(Code)
Creates a cursor for a given view and single key range. Used by unit tests.



DataCursor
DataCursor(DataView view, boolean writeAllowed, Object beginKey, boolean beginInclusive, Object endKey, boolean endInclusive) throws DatabaseException(Code)
Creates a cursor for a given view and key range. Used by unit tests.



DataCursor
DataCursor(DataView view, DataCursor[] indexCursors, JoinConfig joinConfig, boolean closeIndexCursors) throws DatabaseException(Code)
Creates a join cursor.




Method Detail
cloneCursor
DataCursor cloneCursor() throws DatabaseException(Code)
Clones a cursor preserving the current position.



close
void close() throws DatabaseException(Code)
Closes the associated cursor.



count
int count() throws DatabaseException(Code)
Calls Cursor.count(), no join cursor allowed.



delete
OperationStatus delete() throws DatabaseException(Code)
Perform an arbitrary database 'delete' operation.



findBoth
OperationStatus findBoth(Object key, Object value, boolean lockForWrite) throws DatabaseException(Code)
Find the given key and value using getSearchBoth if possible or a sequential scan otherwise, no join cursor allowed.



findValue
OperationStatus findValue(Object value, boolean findFirst) throws DatabaseException(Code)
Find the given value using getSearchBoth if possible or a sequential scan otherwise, no join cursor allowed.



getCurrent
OperationStatus getCurrent(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getCurrent(), no join cursor allowed.



getCurrentKey
Object getCurrentKey() throws DatabaseException(Code)
Returns the key object for the last record read.



getCurrentRecordNumber
int getCurrentRecordNumber() throws DatabaseException(Code)
Returns the record number for the last record read.



getCurrentValue
Object getCurrentValue() throws DatabaseException(Code)
Returns the value object for the last record read.



getCursor
RangeCursor getCursor()(Code)
Returns the internal range cursor.



getFirst
OperationStatus getFirst(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getFirst(), join cursor is allowed.



getKeyThang
DatabaseEntry getKeyThang()(Code)
Returns the internal key entry.



getLast
OperationStatus getLast(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getLast(), no join cursor allowed.



getLockMode
LockMode getLockMode(boolean lockForWrite)(Code)
Returns the lock mode to use for a getXxx() operation.



getNext
OperationStatus getNext(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getNext(), join cursor is allowed.



getNextDup
OperationStatus getNextDup(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getNextDup(), no join cursor allowed.



getNextNoDup
OperationStatus getNextNoDup(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getNext(), join cursor is allowed.



getPrev
OperationStatus getPrev(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getPrev(), no join cursor allowed.



getPrevDup
OperationStatus getPrevDup(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getPrevDup(), no join cursor allowed.



getPrevNoDup
OperationStatus getPrevNoDup(boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getPrevNoDup(), no join cursor allowed.



getPrimaryKeyThang
DatabaseEntry getPrimaryKeyThang()(Code)
Returns the internal primary key entry, which is the same object as the key entry if the cursor is not for a secondary database.



getRange
KeyRange getRange()(Code)
Returns the range for this cursor.



getSearchKey
OperationStatus getSearchKey(Object key, Object value, boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getSearchKey(), no join cursor allowed. Searches by record number in a BTREE-RECNO db with RECNO access.



getSearchKeyRange
OperationStatus getSearchKeyRange(Object key, Object value, boolean lockForWrite) throws DatabaseException(Code)
Binding version of Cursor.getSearchKeyRange(), no join cursor allowed.



getValueThang
DatabaseEntry getValueThang()(Code)
Returns the internal value entry.



getView
DataView getView()(Code)
Returns the view for this cursor.



hasRecNumAccess
boolean hasRecNumAccess()(Code)
Returns whether record number access is allowed.



isWriteAllowed
boolean isWriteAllowed()(Code)
Returns whether write is allowed for this cursor, as specified to the constructor.



put
OperationStatus put(Object key, Object value, Object[] oldValue, boolean useCurrentKey) throws DatabaseException(Code)
Binding version of Cursor.put(), optionally returning the old value and optionally using the current key instead of the key parameter.



putAfter
OperationStatus putAfter(Object value) throws DatabaseException(Code)
Binding version of Cursor.putAfter().



putBefore
OperationStatus putBefore(Object value) throws DatabaseException(Code)
Binding version of Cursor.putBefore().



putCurrent
OperationStatus putCurrent(Object value) throws DatabaseException(Code)
Binding version of Cursor.putCurrent().



putNoDupData
OperationStatus putNoDupData(Object key, Object value, Object[] oldValue, boolean useCurrentKey) throws DatabaseException(Code)
Binding version of Cursor.putNoDupData(), optionally returning the old value and optionally using the current key instead of the key parameter.



putNoOverwrite
OperationStatus putNoOverwrite(Object key, Object value, boolean useCurrentKey) throws DatabaseException(Code)
Binding version of Cursor.putNoOverwrite(), optionally using the current key instead of the key parameter.



repositionExact
boolean repositionExact(byte[] keyBytes, byte[] priKeyBytes, byte[] valueBytes, boolean lockForWrite) throws DatabaseException(Code)
Repositions to a given raw key/data pair.
throws:
  IllegalStateException - when the database has unordered keys orunordered duplicates. whether the search succeeded.



repositionRange
int repositionRange(byte[] keyBytes, byte[] priKeyBytes, byte[] valueBytes, boolean lockForWrite) throws DatabaseException(Code)
Repositions to a given raw key/data pair, or just past it if that record has been deleted. REPOS_EXACT, REPOS_NEXT or REPOS_EOF.



useRangeKey
void useRangeKey()(Code)
Sets the key entry to the begin key of a single key range, so the next time a putXxx() method is called that key will be used.



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.