1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5 <!-- Generated by javadoc (build 1.6.0_23) on Fri May 11 14:10:07 EDT 2012 -->
7 EntityCursor (Oracle - Berkeley DB Java API)
10 <META NAME="date" CONTENT="2012-05-11">
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">
14 <SCRIPT type="text/javascript">
15 function windowTitle()
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="EntityCursor (Oracle - Berkeley DB Java API)";
27 <BODY BGCOLOR="white" onload="windowTitle();">
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <A NAME="navbar_top"><!-- --></A>
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37 <A NAME="navbar_top_firstrow"><!-- --></A>
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EntityCursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52 <b>Berkeley DB</b><br><font size="-1"> version 5.3.21</font></EM>
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58 <A HREF="../../../com/sleepycat/persist/DatabaseNamer.html" title="interface in com.sleepycat.persist"><B>PREV CLASS</B></A>
59 <A HREF="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><B>NEXT CLASS</B></A></FONT></TD>
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61 <A HREF="../../../index.html?com/sleepycat/persist/EntityCursor.html" target="_top"><B>FRAMES</B></A>
62 <A HREF="EntityCursor.html" target="_top"><B>NO FRAMES</B></A>
63 <SCRIPT type="text/javascript">
66 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
71 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
84 <A NAME="skip-navbar_top"></A>
85 <!-- ========= END OF TOP NAVBAR ========= -->
88 <!-- ======== START OF CLASS DATA ======== -->
91 com.sleepycat.persist</FONT>
93 Interface EntityCursor<V></H2>
95 <DT><B>All Superinterfaces:</B> <DD><A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A><V>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><V></DD>
99 <DT><PRE>public interface <B>EntityCursor<V></B><DT>extends <A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A><V></DL>
103 Traverses entity values or key values and allows deleting or updating the
104 entity at the current cursor position. The value type (V) is either an
105 entity class or a key class, depending on how the cursor was opened.
107 <p><code>EntityCursor</code> objects are <em>not</em> thread-safe. Cursors
108 should be opened, used and closed by a single thread.</p>
110 <p>Cursors are opened using the <A HREF="../../../com/sleepycat/persist/EntityIndex.html#keys()"><CODE>EntityIndex.keys()</CODE></A> and <A HREF="../../../com/sleepycat/persist/EntityIndex.html#entities()"><CODE>EntityIndex.entities()</CODE></A> family of methods. These methods are available for
111 objects of any class that implements <A HREF="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><CODE>EntityIndex</CODE></A>: <A HREF="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><CODE>PrimaryIndex</CODE></A>, <A HREF="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><CODE>SecondaryIndex</CODE></A>, and the indices returned by <A HREF="../../../com/sleepycat/persist/SecondaryIndex.html#keysIndex"><CODE>SecondaryIndex.keysIndex</CODE></A> and <A HREF="../../../com/sleepycat/persist/SecondaryIndex.html#subIndex(SK)"><CODE>SecondaryIndex.subIndex(SK)</CODE></A>. A <A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist"><CODE>ForwardCursor</CODE></A>, which implements a subset of cursor operations, is also
112 available via the <A HREF="../../../com/sleepycat/persist/EntityJoin.html#keys()"><CODE>EntityJoin.keys()</CODE></A> and <A HREF="../../../com/sleepycat/persist/EntityJoin.html#entities()"><CODE>EntityJoin.entities()</CODE></A>
115 <p>Values are always returned by a cursor in key order, where the key is
116 defined by the underlying <A HREF="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><CODE>EntityIndex</CODE></A>. For example, a cursor on a
117 <A HREF="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><CODE>SecondaryIndex</CODE></A> returns values ordered by secondary key, while an
118 index on a <A HREF="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><CODE>PrimaryIndex</CODE></A> or a <A HREF="../../../com/sleepycat/persist/SecondaryIndex.html#subIndex(SK)"><CODE>SecondaryIndex.subIndex(SK)</CODE></A> returns
119 values ordered by primary key.</p>
121 <p><em>WARNING:</em> Cursors must always be closed to prevent resource leaks
122 which could lead to the index becoming unusable or cause an
123 <code>OutOfMemoryError</code>. To ensure that a cursor is closed in the
124 face of exceptions, call <A HREF="../../../com/sleepycat/persist/EntityCursor.html#close()"><CODE>close()</CODE></A> in a finally block. For example,
125 the following code traverses all Employee entities and closes the cursor
126 whether or not an exception occurs:</p>
135 @SecondaryKey(relate=MANY_TO_ONE)
140 private Employee() {}
143 EntityStore store = ...
145 <code>PrimaryIndex<Long, Employee></code> primaryIndex =
146 store.getPrimaryIndex(Long.class, Employee.class);
148 <code>EntityCursor<Employee></code> cursor = primaryIndex.entities();
150 for (Employee entity = cursor.first();
152 entity = cursor.next()) {
153 // Do something with the entity...
159 <h3>Initializing the Cursor Position</h3>
161 <p>When it is opened, a cursor is not initially positioned on any value; in
162 other words, it is uninitialized. Most methods in this interface initialize
163 the cursor position but certain methods, for example, <A HREF="../../../com/sleepycat/persist/EntityCursor.html#current()"><CODE>current()</CODE></A> and
164 <A HREF="../../../com/sleepycat/persist/EntityCursor.html#delete()"><CODE>delete()</CODE></A>, throw <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> when called for an
165 uninitialized cursor.</p>
167 <p>Note that the <A HREF="../../../com/sleepycat/persist/EntityCursor.html#next()"><CODE>next()</CODE></A> and <A HREF="../../../com/sleepycat/persist/EntityCursor.html#prev()"><CODE>prev()</CODE></A> methods return the first or
168 last value respectively for an uninitialized cursor. This allows the loop
169 in the example above to be rewritten as follows:</p>
172 <code>EntityCursor<Employee></code> cursor = primaryIndex.entities();
175 while ((entity = cursor.next()) != null) {
176 // Do something with the entity...
182 <h3>Cursors and Iterators</h3>
184 <p>The <A HREF="../../../com/sleepycat/persist/EntityCursor.html#iterator()"><CODE>iterator()</CODE></A> method can be used to return a standard Java <code>Iterator</code> that returns the same values that the cursor returns. For
188 <code>EntityCursor<Employee></code> cursor = primaryIndex.entities();
190 <code>Iterator<Employee></code> i = cursor.iterator();
191 while (i.hasNext()) {
192 Employee entity = i.next();
193 // Do something with the entity...
199 <p>The <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><CODE>Iterable</CODE></A> interface is also extended by <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist"><CODE>EntityCursor</CODE></A>
200 to allow using the cursor as the target of a Java "foreach" statement:</p>
203 <code>EntityCursor<Employee></code> cursor = primaryIndex.entities();
205 for (Employee entity : cursor) {
206 // Do something with the entity...
212 <p>The iterator uses the cursor directly, so any changes to the cursor
213 position impact the iterator and vice versa. The iterator advances the
214 cursor by calling <A HREF="../../../com/sleepycat/persist/EntityCursor.html#next()"><CODE>next()</CODE></A> when <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html?is-external=true#hasNext()" title="class or interface in java.util"><CODE>Iterator.hasNext()</CODE></A> or <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html?is-external=true#next()" title="class or interface in java.util"><CODE>Iterator.next()</CODE></A> is called. Because of this interaction, to keep things
215 simple it is best not to mix the use of an <code>EntityCursor</code>
216 <code>Iterator</code> with the use of the <code>EntityCursor</code> traversal methods
217 such as <A HREF="../../../com/sleepycat/persist/EntityCursor.html#next()"><CODE>next()</CODE></A>, for a single <code>EntityCursor</code> object.</p>
221 <p>A key range may be specified when opening the cursor, to restrict the
222 key range of the cursor to a subset of the complete range of keys in the
223 index. A <code>fromKey</code> and/or <code>toKey</code> parameter may be specified
224 when calling <A HREF="../../../com/sleepycat/persist/EntityIndex.html#keys(K, boolean, K, boolean)"><CODE>EntityIndex.keys(Object,boolean,Object,boolean)</CODE></A> or
225 <A HREF="../../../com/sleepycat/persist/EntityIndex.html#entities(K, boolean, K, boolean)"><CODE>EntityIndex.entities(Object,boolean,Object,boolean)</CODE></A>. The key
226 arguments may be specified as inclusive or exclusive values.</p>
228 <p>Whenever a cursor with a key range is moved, the key range bounds will be
229 checked, and the cursor will never be positioned outside the range. The
230 <A HREF="../../../com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A> cursor value is the first existing value in the range, and
231 the <A HREF="../../../com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A> cursor value is the last existing value in the range. For
232 example, the following code traverses Employee entities with keys from 100
233 (inclusive) to 200 (exclusive):</p>
236 <code>EntityCursor<Employee></code> cursor = primaryIndex.entities(100, true, 200, false);
238 for (Employee entity : cursor) {
239 // Do something with the entity...
245 <h3>Duplicate Keys</h3>
247 <p>When using a cursor for a <A HREF="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><CODE>SecondaryIndex</CODE></A>, the keys in the index
248 may be non-unique (duplicates) if <A HREF="../../../com/sleepycat/persist/model/SecondaryKey.html#relate()"><CODE>SecondaryKey.relate()</CODE></A> is <A HREF="../../../com/sleepycat/persist/model/Relationship.html#MANY_TO_ONE"><CODE>MANY_TO_ONE</CODE></A> or <A HREF="../../../com/sleepycat/persist/model/Relationship.html#MANY_TO_MANY"><CODE>MANY_TO_MANY</CODE></A>. For example, a <code>MANY_TO_ONE</code> <code>Employee.department</code> secondary key is non-unique because there are multiple
249 Employee entities with the same department key value. The <A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextDup()"><CODE>nextDup()</CODE></A>,
250 <A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevDup()"><CODE>prevDup()</CODE></A>, <A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextNoDup()"><CODE>nextNoDup()</CODE></A> and <A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevNoDup()"><CODE>prevNoDup()</CODE></A> methods may be
251 used to control how non-unique keys are returned by the cursor.</p>
253 <p><A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextDup()"><CODE>nextDup()</CODE></A> and <A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevDup()"><CODE>prevDup()</CODE></A> return the next or previous value
254 only if it has the same key as the current value, and null is returned when
255 a different key is encountered. For example, these methods can be used to
256 return all employees in a given department.</p>
258 <p><A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextNoDup()"><CODE>nextNoDup()</CODE></A> and <A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevNoDup()"><CODE>prevNoDup()</CODE></A> return the next or previous
259 value with a unique key, skipping over values that have the same key. For
260 example, these methods can be used to return the first employee in each
263 <p>For example, the following code will find the first employee in each
264 department with <A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextNoDup()"><CODE>nextNoDup()</CODE></A> until it finds a department name that
265 matches a particular regular expression. For each matching department it
266 will find all employees in that department using <A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextDup()"><CODE>nextDup()</CODE></A>.</p>
269 <code>SecondaryIndex<String, Long, Employee></code> secondaryIndex =
270 store.getSecondaryIndex(primaryIndex, String.class, "department");
273 <code>EntityCursor<Employee></code> cursor = secondaryIndex.entities();
275 for (Employee entity = cursor.first();
277 entity = cursor.nextNoDup()) {
278 if (entity.department.matches(regex)) {
279 while (entity != null) {
280 // Do something with the matching entities...
281 entity = cursor.nextDup();
289 <h3>Updating and Deleting Entities with a Cursor</h3>
291 <p>The <A HREF="../../../com/sleepycat/persist/EntityCursor.html#update(V)"><CODE>update(V)</CODE></A> and <A HREF="../../../com/sleepycat/persist/EntityCursor.html#delete()"><CODE>delete()</CODE></A> methods operate on the entity at
292 the current cursor position. Cursors on any type of index may be used to
293 delete entities. For example, the following code deletes all employees in
294 departments which have names that match a particular regular expression:</p>
297 <code>SecondaryIndex<String, Long, Employee></code> secondaryIndex =
298 store.getSecondaryIndex(primaryIndex, String.class, "department");
301 <code>EntityCursor<Employee></code> cursor = secondaryIndex.entities();
303 for (Employee entity = cursor.first();
305 entity = cursor.nextNoDup()) {
306 if (entity.department.matches(regex)) {
307 while (entity != null) {
309 entity = cursor.nextDup();
317 <p>Note that the cursor can be moved to the next (or previous) value after
318 deleting the entity at the current position. This is an important property
319 of cursors, since without it you would not be able to easily delete while
320 processing multiple values with a cursor. A cursor positioned on a deleted
321 entity is in a special state. In this state, <A HREF="../../../com/sleepycat/persist/EntityCursor.html#current()"><CODE>current()</CODE></A> will return
322 null, <A HREF="../../../com/sleepycat/persist/EntityCursor.html#delete()"><CODE>delete()</CODE></A> will return false, and <A HREF="../../../com/sleepycat/persist/EntityCursor.html#update(V)"><CODE>update(V)</CODE></A> will return
325 <p>The <A HREF="../../../com/sleepycat/persist/EntityCursor.html#update(V)"><CODE>update(V)</CODE></A> method is supported only if the value type is an
326 entity class (not a key class) and the underlying index is a <A HREF="../../../com/sleepycat/persist/PrimaryIndex.html" title="class in com.sleepycat.persist"><CODE>PrimaryIndex</CODE></A>; in other words, for a cursor returned by one of the <CODE>BasicIndex.entities()</CODE> methods. For example, the following code changes all
327 employee names to uppercase:</p>
330 <code>EntityCursor<Employee></code> cursor = primaryIndex.entities();
332 for (Employee entity = cursor.first();
334 entity = cursor.next()) {
335 entity.name = entity.name.toUpperCase();
336 cursor.update(entity);
348 <!-- ========== METHOD SUMMARY =========== -->
350 <A NAME="method_summary"><!-- --></A>
351 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
352 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
353 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
354 <B>Method Summary</B></FONT></TH>
356 <TR BGCOLOR="white" CLASS="TableRowColor">
357 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
358 <CODE> void</CODE></FONT></TD>
359 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#close()">close</A></B>()</CODE>
362 Closes the cursor.</TD>
364 <TR BGCOLOR="white" CLASS="TableRowColor">
365 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
366 <CODE> int</CODE></FONT></TD>
367 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#count()">count</A></B>()</CODE>
370 Returns the number of values (duplicates) for the key at the cursor
371 position, or returns zero if all values for the key have been deleted.</TD>
373 <TR BGCOLOR="white" CLASS="TableRowColor">
374 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
375 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
376 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#current()">current</A></B>()</CODE>
379 Returns the value at the cursor position, or null if the value at the
380 cursor position has been deleted.</TD>
382 <TR BGCOLOR="white" CLASS="TableRowColor">
383 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
384 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
385 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#current(com.sleepycat.db.LockMode)">current</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
388 Returns the value at the cursor position, or null if the value at the
389 cursor position has been deleted.</TD>
391 <TR BGCOLOR="white" CLASS="TableRowColor">
392 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
393 <CODE> boolean</CODE></FONT></TD>
394 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#delete()">delete</A></B>()</CODE>
397 Deletes the entity at the cursor position.</TD>
399 <TR BGCOLOR="white" CLASS="TableRowColor">
400 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
401 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></FONT></TD>
402 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#dup()">dup</A></B>()</CODE>
405 Duplicates the cursor at the cursor position.</TD>
407 <TR BGCOLOR="white" CLASS="TableRowColor">
408 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
409 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
410 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#first()">first</A></B>()</CODE>
413 Moves the cursor to the first value and returns it, or returns null if
414 the cursor range is empty.</TD>
416 <TR BGCOLOR="white" CLASS="TableRowColor">
417 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
418 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
419 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#first(com.sleepycat.db.LockMode)">first</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
422 Moves the cursor to the first value and returns it, or returns null if
423 the cursor range is empty.</TD>
425 <TR BGCOLOR="white" CLASS="TableRowColor">
426 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
427 <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></FONT></TD>
428 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#iterator()">iterator</A></B>()</CODE>
431 Returns an iterator over the key range, starting with the value
432 following the current position or at the first value if the cursor is
435 <TR BGCOLOR="white" CLASS="TableRowColor">
436 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
437 <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></FONT></TD>
438 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#iterator(com.sleepycat.db.LockMode)">iterator</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
441 Returns an iterator over the key range, starting with the value
442 following the current position or at the first value if the cursor is
445 <TR BGCOLOR="white" CLASS="TableRowColor">
446 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
447 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
448 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#last()">last</A></B>()</CODE>
451 Moves the cursor to the last value and returns it, or returns null if
452 the cursor range is empty.</TD>
454 <TR BGCOLOR="white" CLASS="TableRowColor">
455 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
456 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
457 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#last(com.sleepycat.db.LockMode)">last</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
460 Moves the cursor to the last value and returns it, or returns null if
461 the cursor range is empty.</TD>
463 <TR BGCOLOR="white" CLASS="TableRowColor">
464 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
465 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
466 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#next()">next</A></B>()</CODE>
469 Moves the cursor to the next value and returns it, or returns null
470 if there are no more values in the cursor range.</TD>
472 <TR BGCOLOR="white" CLASS="TableRowColor">
473 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
474 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
475 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#next(com.sleepycat.db.LockMode)">next</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
478 Moves the cursor to the next value and returns it, or returns null
479 if there are no more values in the cursor range.</TD>
481 <TR BGCOLOR="white" CLASS="TableRowColor">
482 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
483 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
484 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextDup()">nextDup</A></B>()</CODE>
487 Moves the cursor to the next value with the same key (duplicate) and
488 returns it, or returns null if no more values are present for the key at
489 the current position.</TD>
491 <TR BGCOLOR="white" CLASS="TableRowColor">
492 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
493 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
494 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextDup(com.sleepycat.db.LockMode)">nextDup</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
497 Moves the cursor to the next value with the same key (duplicate) and
498 returns it, or returns null if no more values are present for the key at
499 the current position.</TD>
501 <TR BGCOLOR="white" CLASS="TableRowColor">
502 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
503 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
504 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextNoDup()">nextNoDup</A></B>()</CODE>
507 Moves the cursor to the next value with a different key and returns it,
508 or returns null if there are no more unique keys in the cursor range.</TD>
510 <TR BGCOLOR="white" CLASS="TableRowColor">
511 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
512 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
513 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#nextNoDup(com.sleepycat.db.LockMode)">nextNoDup</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
516 Moves the cursor to the next value with a different key and returns it,
517 or returns null if there are no more unique keys in the cursor range.</TD>
519 <TR BGCOLOR="white" CLASS="TableRowColor">
520 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
521 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
522 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#prev()">prev</A></B>()</CODE>
525 Moves the cursor to the previous value and returns it, or returns null
526 if there are no preceding values in the cursor range.</TD>
528 <TR BGCOLOR="white" CLASS="TableRowColor">
529 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
530 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
531 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#prev(com.sleepycat.db.LockMode)">prev</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
534 Moves the cursor to the previous value and returns it, or returns null
535 if there are no preceding values in the cursor range.</TD>
537 <TR BGCOLOR="white" CLASS="TableRowColor">
538 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
539 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
540 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevDup()">prevDup</A></B>()</CODE>
543 Moves the cursor to the previous value with the same key (duplicate) and
544 returns it, or returns null if no preceding values are present for the
545 key at the current position.</TD>
547 <TR BGCOLOR="white" CLASS="TableRowColor">
548 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
549 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
550 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevDup(com.sleepycat.db.LockMode)">prevDup</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
553 Moves the cursor to the previous value with the same key (duplicate) and
554 returns it, or returns null if no preceding values are present for the
555 key at the current position.</TD>
557 <TR BGCOLOR="white" CLASS="TableRowColor">
558 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
559 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
560 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevNoDup()">prevNoDup</A></B>()</CODE>
563 Moves the cursor to the preceding value with a different key and returns
564 it, or returns null if there are no preceding unique keys in the cursor
567 <TR BGCOLOR="white" CLASS="TableRowColor">
568 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
569 <CODE> <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
570 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#prevNoDup(com.sleepycat.db.LockMode)">prevNoDup</A></B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
573 Moves the cursor to the preceding value with a different key and returns
574 it, or returns null if there are no preceding unique keys in the cursor
577 <TR BGCOLOR="white" CLASS="TableRowColor">
578 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
579 <CODE> boolean</CODE></FONT></TD>
580 <TD><CODE><B><A HREF="../../../com/sleepycat/persist/EntityCursor.html#update(V)">update</A></B>(<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> entity)</CODE>
583 Replaces the entity at the cursor position with the given entity.</TD>
589 <!-- ============ METHOD DETAIL ========== -->
591 <A NAME="method_detail"><!-- --></A>
592 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
593 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
594 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
595 <B>Method Detail</B></FONT></TH>
599 <A NAME="first()"><!-- --></A><H3>
602 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>first</B>()
603 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
605 <DD>Moves the cursor to the first value and returns it, or returns null if
606 the cursor range is empty.
608 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
615 <DT><B>Returns:</B><DD>the first value, or null if the cursor range is empty.
617 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
622 <A NAME="first(com.sleepycat.db.LockMode)"><!-- --></A><H3>
625 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>first</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
626 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
628 <DD>Moves the cursor to the first value and returns it, or returns null if
629 the cursor range is empty.
635 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
636 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
637 <DT><B>Returns:</B><DD>the first value, or null if the cursor range is empty.
639 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
644 <A NAME="last()"><!-- --></A><H3>
647 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>last</B>()
648 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
650 <DD>Moves the cursor to the last value and returns it, or returns null if
651 the cursor range is empty.
653 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
660 <DT><B>Returns:</B><DD>the last value, or null if the cursor range is empty.
662 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
667 <A NAME="last(com.sleepycat.db.LockMode)"><!-- --></A><H3>
670 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>last</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
671 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
673 <DD>Moves the cursor to the last value and returns it, or returns null if
674 the cursor range is empty.
680 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
681 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
682 <DT><B>Returns:</B><DD>the last value, or null if the cursor range is empty.
684 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
689 <A NAME="next()"><!-- --></A><H3>
692 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>next</B>()
693 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
695 <DD>Moves the cursor to the next value and returns it, or returns null
696 if there are no more values in the cursor range. If the cursor is
697 uninitialized, this method is equivalent to <A HREF="../../../com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
699 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
702 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html#next()">next</A></CODE> in interface <CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></DL>
706 <DT><B>Returns:</B><DD>the next value, or null if there are no more values in the
709 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
714 <A NAME="next(com.sleepycat.db.LockMode)"><!-- --></A><H3>
717 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>next</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
718 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
720 <DD>Moves the cursor to the next value and returns it, or returns null
721 if there are no more values in the cursor range. If the cursor is
722 uninitialized, this method is equivalent to <A HREF="../../../com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
725 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html#next(com.sleepycat.db.LockMode)">next</A></CODE> in interface <CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></DL>
728 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
729 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
730 <DT><B>Returns:</B><DD>the next value, or null if there are no more values in the
733 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
738 <A NAME="nextDup()"><!-- --></A><H3>
741 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>nextDup</B>()
742 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
744 <DD>Moves the cursor to the next value with the same key (duplicate) and
745 returns it, or returns null if no more values are present for the key at
746 the current position.
748 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
755 <DT><B>Returns:</B><DD>the next value with the same key, or null if no more values are
756 present for the key at the current position.
758 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
759 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
764 <A NAME="nextDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
767 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>nextDup</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
768 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
770 <DD>Moves the cursor to the next value with the same key (duplicate) and
771 returns it, or returns null if no more values are present for the key at
772 the current position.
778 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
779 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
780 <DT><B>Returns:</B><DD>the next value with the same key, or null if no more values are
781 present for the key at the current position.
783 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
784 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
789 <A NAME="nextNoDup()"><!-- --></A><H3>
792 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>nextNoDup</B>()
793 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
795 <DD>Moves the cursor to the next value with a different key and returns it,
796 or returns null if there are no more unique keys in the cursor range.
797 If the cursor is uninitialized, this method is equivalent to <A HREF="../../../com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
799 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
806 <DT><B>Returns:</B><DD>the next value with a different key, or null if there are no
807 more unique keys in the cursor range.
809 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
814 <A NAME="nextNoDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
817 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>nextNoDup</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
818 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
820 <DD>Moves the cursor to the next value with a different key and returns it,
821 or returns null if there are no more unique keys in the cursor range.
822 If the cursor is uninitialized, this method is equivalent to <A HREF="../../../com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
828 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
829 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
830 <DT><B>Returns:</B><DD>the next value with a different key, or null if there are no
831 more unique keys in the cursor range.
833 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
838 <A NAME="prev()"><!-- --></A><H3>
841 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prev</B>()
842 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
844 <DD>Moves the cursor to the previous value and returns it, or returns null
845 if there are no preceding values in the cursor range. If the cursor is
846 uninitialized, this method is equivalent to <A HREF="../../../com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
848 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
855 <DT><B>Returns:</B><DD>the previous value, or null if there are no preceding values in
858 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
863 <A NAME="prev(com.sleepycat.db.LockMode)"><!-- --></A><H3>
866 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prev</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
867 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
869 <DD>Moves the cursor to the previous value and returns it, or returns null
870 if there are no preceding values in the cursor range. If the cursor is
871 uninitialized, this method is equivalent to <A HREF="../../../com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
877 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
878 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
879 <DT><B>Returns:</B><DD>the previous value, or null if there are no preceding values in
882 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
887 <A NAME="prevDup()"><!-- --></A><H3>
890 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prevDup</B>()
891 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
893 <DD>Moves the cursor to the previous value with the same key (duplicate) and
894 returns it, or returns null if no preceding values are present for the
895 key at the current position.
897 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
904 <DT><B>Returns:</B><DD>the previous value with the same key, or null if no preceding
905 values are present for the key at the current position.
907 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
908 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
913 <A NAME="prevDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
916 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prevDup</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
917 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
919 <DD>Moves the cursor to the previous value with the same key (duplicate) and
920 returns it, or returns null if no preceding values are present for the
921 key at the current position.
927 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
928 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
929 <DT><B>Returns:</B><DD>the previous value with the same key, or null if no preceding
930 values are present for the key at the current position.
932 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
933 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
938 <A NAME="prevNoDup()"><!-- --></A><H3>
941 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prevNoDup</B>()
942 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
944 <DD>Moves the cursor to the preceding value with a different key and returns
945 it, or returns null if there are no preceding unique keys in the cursor
946 range. If the cursor is uninitialized, this method is equivalent to
947 <A HREF="../../../com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
949 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
956 <DT><B>Returns:</B><DD>the previous value with a different key, or null if there are no
957 preceding unique keys in the cursor range.
959 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
964 <A NAME="prevNoDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
967 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prevNoDup</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
968 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
970 <DD>Moves the cursor to the preceding value with a different key and returns
971 it, or returns null if there are no preceding unique keys in the cursor
972 range. If the cursor is uninitialized, this method is equivalent to
973 <A HREF="../../../com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
979 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
980 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
981 <DT><B>Returns:</B><DD>the previous value with a different key, or null if there are no
982 preceding unique keys in the cursor range.
984 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
989 <A NAME="current()"><!-- --></A><H3>
992 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>current</B>()
993 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
995 <DD>Returns the value at the cursor position, or null if the value at the
996 cursor position has been deleted.
998 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
1005 <DT><B>Returns:</B><DD>the value at the cursor position, or null if it has been
1008 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1009 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
1014 <A NAME="current(com.sleepycat.db.LockMode)"><!-- --></A><H3>
1017 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>current</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
1018 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1020 <DD>Returns the value at the cursor position, or null if the value at the
1021 cursor position has been deleted.
1027 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
1028 use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
1029 <DT><B>Returns:</B><DD>the value at the cursor position, or null if it has been
1032 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1033 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
1038 <A NAME="count()"><!-- --></A><H3>
1042 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1044 <DD>Returns the number of values (duplicates) for the key at the cursor
1045 position, or returns zero if all values for the key have been deleted.
1046 Returns one or zero if the underlying index has unique keys.
1049 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
1056 <DT><B>Returns:</B><DD>the number of duplicates, or zero if all values for the current
1057 key have been deleted.
1059 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1060 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
1065 <A NAME="iterator()"><!-- --></A><H3>
1068 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>> <B>iterator</B>()</PRE>
1070 <DD>Returns an iterator over the key range, starting with the value
1071 following the current position or at the first value if the cursor is
1074 <p><A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
1077 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html#iterator()">iterator</A></CODE> in interface <CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></DL>
1081 <DT><B>Returns:</B><DD>the iterator.</DL>
1086 <A NAME="iterator(com.sleepycat.db.LockMode)"><!-- --></A><H3>
1089 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>> <B>iterator</B>(<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</PRE>
1091 <DD>Returns an iterator over the key range, starting with the value
1092 following the current position or at the first value if the cursor is
1096 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html#iterator(com.sleepycat.db.LockMode)">iterator</A></CODE> in interface <CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></DL>
1099 <DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for all operations performed
1100 using the iterator, or null to use <A HREF="../../../com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
1101 <DT><B>Returns:</B><DD>the iterator.</DL>
1106 <A NAME="update(java.lang.Object)"><!-- --></A><A NAME="update(V)"><!-- --></A><H3>
1109 boolean <B>update</B>(<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> entity)
1110 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1112 <DD>Replaces the entity at the cursor position with the given entity.
1118 <DT><B>Parameters:</B><DD><CODE>entity</CODE> - the entity to replace the entity at the current position.
1119 <DT><B>Returns:</B><DD>true if successful or false if the entity at the current
1120 position was previously deleted.
1122 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1123 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the index is read only or if
1124 the value type is not an entity type.
1125 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
1130 <A NAME="delete()"><!-- --></A><H3>
1133 boolean <B>delete</B>()
1134 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1136 <DD>Deletes the entity at the cursor position.
1143 <DT><B>Returns:</B><DD>true if successful or false if the entity at the current
1144 position has been deleted.
1146 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1147 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the index is read only.
1148 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
1153 <A NAME="dup()"><!-- --></A><H3>
1156 <A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>> <B>dup</B>()
1157 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1159 <DD>Duplicates the cursor at the cursor position. The returned cursor will
1160 be initially positioned at the same position as this current cursor, and
1161 will inherit this cursor's <A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db"><CODE>Transaction</CODE></A> and <A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db"><CODE>CursorConfig</CODE></A>.
1168 <DT><B>Returns:</B><DD>the duplicated cursor.
1170 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
1175 <A NAME="close()"><!-- --></A><H3>
1179 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1181 <DD>Closes the cursor.
1184 <DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html#close()">close</A></CODE> in interface <CODE><A HREF="../../../com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A><<A HREF="../../../com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>></CODE></DL>
1189 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - the base class for all BDB exceptions.</DL>
1192 <!-- ========= END OF CLASS DATA ========= -->
1196 <!-- ======= START OF BOTTOM NAVBAR ====== -->
1197 <A NAME="navbar_bottom"><!-- --></A>
1198 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1199 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1201 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1202 <A NAME="navbar_bottom_firstrow"><!-- --></A>
1203 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1204 <TR ALIGN="center" VALIGN="top">
1205 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
1206 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
1207 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
1208 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/EntityCursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
1209 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
1210 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
1211 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
1212 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
1216 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1217 <b>Berkeley DB</b><br><font size="-1"> version 5.3.21</font></EM>
1222 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1223 <A HREF="../../../com/sleepycat/persist/DatabaseNamer.html" title="interface in com.sleepycat.persist"><B>PREV CLASS</B></A>
1224 <A HREF="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><B>NEXT CLASS</B></A></FONT></TD>
1225 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1226 <A HREF="../../../index.html?com/sleepycat/persist/EntityCursor.html" target="_top"><B>FRAMES</B></A>
1227 <A HREF="EntityCursor.html" target="_top"><B>NO FRAMES</B></A>
1228 <SCRIPT type="text/javascript">
1231 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
1236 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
1243 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1244 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
1245 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1246 DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
1249 <A NAME="skip-navbar_bottom"></A>
1250 <!-- ======== END OF BOTTOM NAVBAR ======= -->
1253 <font size=1>Copyright (c) 1996, 2012 Oracle and/or its affiliates. All rights reserved.</font>