1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.5.0) on Thu May 15 17:17:33 EDT 2008 -->
6<TITLE>
7EntityCursor (Oracle - Berkeley DB Java API)
8</TITLE>
9
10<META NAME="keywords" CONTENT="com.sleepycat.persist.EntityCursor interface">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="/style.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    parent.document.title="EntityCursor (Oracle - Berkeley DB Java API)";
18}
19</SCRIPT>
20<NOSCRIPT>
21</NOSCRIPT>
22
23</HEAD>
24
25<BODY BGCOLOR="white" onload="windowTitle();">
26
27
28<!-- ========= START OF TOP NAVBAR ======= -->
29<A NAME="navbar_top"><!-- --></A>
30<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32<TR>
33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34<A NAME="navbar_top_firstrow"><!-- --></A>
35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36  <TR ALIGN="center" VALIGN="top">
37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
38  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
39  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/EntityCursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
45  </TR>
46</TABLE>
47</TD>
48<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
49<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
50</TD>
51</TR>
52
53<TR>
54<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
55&nbsp;<A HREF="/com/sleepycat/persist/DatabaseNamer.html" title="interface in com.sleepycat.persist"><B>PREV CLASS</B></A>&nbsp;
56&nbsp;<A HREF="/com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><B>NEXT CLASS</B></A></FONT></TD>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58  <A HREF="/index.html?com/sleepycat/persist/EntityCursor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
59&nbsp;<A HREF="EntityCursor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
60&nbsp;<SCRIPT type="text/javascript">
61  <!--
62  if(window==top) {
63    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
64  }
65  //-->
66</SCRIPT>
67<NOSCRIPT>
68  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
69</NOSCRIPT>
70
71
72</FONT></TD>
73</TR>
74<TR>
75<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
77<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
78DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
79</TR>
80</TABLE>
81<A NAME="skip-navbar_top"></A>
82<!-- ========= END OF TOP NAVBAR ========= -->
83
84<HR>
85<!-- ======== START OF CLASS DATA ======== -->
86<H2>
87<FONT SIZE="-1">
88com.sleepycat.persist</FONT>
89<BR>
90Interface EntityCursor&lt;V&gt;</H2>
91<DL>
92<DT><B>All Superinterfaces:</B> <DD><A HREF="/com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A>&lt;V&gt;, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A>&lt;V&gt;</DD>
93</DL>
94<HR>
95<DL>
96<DT><PRE>public interface <B>EntityCursor&lt;V&gt;</B><DT>extends <A HREF="/com/sleepycat/persist/ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</A>&lt;V&gt;</DL>
97</PRE>
98
99<P>
100Traverses entity values or key values and allows deleting or updating the
101 entity at the current cursor position.  The value type (V) is either an
102 entity class or a key class, depending on how the cursor was opened.
103
104 <p><code>EntityCursor</code> objects are <em>not</em> thread-safe.  Cursors
105 should be opened, used and closed by a single thread.</p>
106
107 <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
108 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
109 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>
110 methods.</p>
111
112 <p>Values are always returned by a cursor in key order, where the key is
113 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
114 <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
115 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
116 values ordered by primary key.</p>
117
118 <p><em>WARNING:</em> Cursors must always be closed to prevent resource leaks
119 which could lead to the index becoming unusable or cause an
120 <code>OutOfMemoryError</code>.  To ensure that a cursor is closed in the
121 face of exceptions, call <A HREF="/com/sleepycat/persist/EntityCursor.html#close()"><CODE>close()</CODE></A> in a finally block.  For example,
122 the following code traverses all Employee entities and closes the cursor
123 whether or not an exception occurs:</p>
124
125 <pre class="code">
126 @Entity
127 class Employee {
128
129     @PrimaryKey
130     long id;
131
132     @SecondaryKey(relate=MANY_TO_ONE)
133     String department;
134
135     String name;
136
137     private Employee() {}
138 }
139
140 EntityStore store = ...
141
142 <code>PrimaryIndex&lt;Long,Employee&gt;</code> primaryIndex =
143     store.getPrimaryIndex(Long.class, Employee.class);
144
145 <code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
146 try {
147     for (Employee entity = cursor.first();
148                   entity != null;
149                   entity = cursor.next()) {
150         // Do something with the entity...
151     }
152 } finally {
153     cursor.close();
154 }</pre>
155
156 <h3>Initializing the Cursor Position</h3>
157
158 <p>When it is opened, a cursor is not initially positioned on any value; in
159 other words, it is uninitialized.  Most methods in this interface initialize
160 the cursor position but certain methods, for example, <A HREF="/com/sleepycat/persist/EntityCursor.html#current()"><CODE>current()</CODE></A> and
161 <A HREF="/com/sleepycat/persist/EntityCursor.html#delete()"><CODE>delete()</CODE></A>, throw <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang"><CODE>IllegalStateException</CODE></A> when called for an
162 uninitialized cursor.</p>
163
164 <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
165 last value respectively for an uninitialized cursor.  This allows the loop
166 in the example above to be rewritten as follows:</p>
167
168 <pre class="code">
169 <code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
170 try {
171     Employee entity;
172     while ((entity = cursor.next()) != null) {
173         // Do something with the entity...
174     }
175 } finally {
176     cursor.close();
177 }</pre>
178
179 <h3>Cursors and Iterators</h3>
180
181 <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
182 example:</p>
183
184 <pre class="code">
185 <code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
186 try {
187     <code>Iterator&lt;Employee&gt;</code> i = cursor.iterator();
188     while (i.hasNext()) {
189          Employee entity = i.next();
190         // Do something with the entity...
191     }
192 } finally {
193     cursor.close();
194 }</pre>
195
196 <p>The <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" 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>
197 to allow using the cursor as the target of a Java "foreach" statement:</p>
198
199 <pre class="code">
200 <code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
201 try {
202     for (Employee entity : cursor) {
203         // Do something with the entity...
204     }
205 } finally {
206     cursor.close();
207 }</pre>
208
209 <p>The iterator uses the cursor directly, so any changes to the cursor
210 position impact the iterator and vice versa.  The iterator advances the
211 cursor by calling <A HREF="/com/sleepycat/persist/EntityCursor.html#next()"><CODE>next()</CODE></A> when <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html#hasNext()" title="class or interface in java.util"><CODE>Iterator.hasNext()</CODE></A> or <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html#next()" title="class or interface in java.util"><CODE>Iterator.next()</CODE></A> is called.  Because of this interaction, to keep things
212 simple it is best not to mix the use of an <code>EntityCursor</code>
213 <code>Iterator</code> with the use of the <code>EntityCursor</code> traversal methods
214 such as <A HREF="/com/sleepycat/persist/EntityCursor.html#next()"><CODE>next()</CODE></A>, for a single <code>EntityCursor</code> object.</p>
215
216 <h3>Key Ranges</h3>
217
218 <p>A key range may be specified when opening the cursor, to restrict the
219 key range of the cursor to a subset of the complete range of keys in the
220 index.  A <code>fromKey</code> and/or <code>toKey</code> parameter may be specified
221 when calling <A HREF="/com/sleepycat/persist/EntityIndex.html#keys(K, boolean, K, boolean)"><CODE>EntityIndex.keys(Object,boolean,Object,boolean)</CODE></A> or
222 <A HREF="/com/sleepycat/persist/EntityIndex.html#entities(K, boolean, K, boolean)"><CODE>EntityIndex.entities(Object,boolean,Object,boolean)</CODE></A>.  The key
223 arguments may be specified as inclusive or exclusive values.</p>
224
225 <p>Whenever a cursor with a key range is moved, the key range bounds will be
226 checked, and the cursor will never be positioned outside the range.  The
227 <A HREF="/com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A> cursor value is the first existing value in the range, and
228 the <A HREF="/com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A> cursor value is the last existing value in the range.  For
229 example, the following code traverses Employee entities with keys from 100
230 (inclusive) to 200 (exclusive):</p>
231
232 <pre class="code">
233 <code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities(100, true, 200, false);
234 try {
235     for (Employee entity : cursor) {
236         // Do something with the entity...
237     }
238 } finally {
239     cursor.close();
240 }</pre>
241
242 <h3>Duplicate Keys</h3>
243
244 <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
245 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
246 Employee entities with the same department key value.  The <A HREF="/com/sleepycat/persist/EntityCursor.html#nextDup()"><CODE>nextDup()</CODE></A>,
247 <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
248 used to control how non-unique keys are returned by the cursor.</p>
249
250 <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
251 only if it has the same key as the current value, and null is returned when
252 a different key is encountered.  For example, these methods can be used to
253 return all employees in a given department.</p>
254
255 <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
256 value with a unique key, skipping over values that have the same key.  For
257 example, these methods can be used to return the first employee in each
258 department.</p>
259
260 <p>For example, the following code will find the first employee in each
261 department with <A HREF="/com/sleepycat/persist/EntityCursor.html#nextNoDup()"><CODE>nextNoDup()</CODE></A> until it finds a department name that
262 matches a particular regular expression.  For each matching department it
263 will find all employees in that department using <A HREF="/com/sleepycat/persist/EntityCursor.html#nextDup()"><CODE>nextDup()</CODE></A>.</p>
264
265 <pre class="code">
266 <code>SecondaryIndex&lt;String,Long,Employee&gt;</code> secondaryIndex =
267     store.getSecondaryIndex(primaryIndex, String.class, "department");
268
269 String regex = ...;
270 <code>EntityCursor&lt;Employee&gt;</code> cursor = secondaryIndex.entities();
271 try {
272     for (Employee entity = cursor.first();
273                   entity != null;
274                   entity = cursor.nextNoDup()) {
275         if (entity.department.matches(regex)) {
276             while (entity != null) {
277                 // Do something with the matching entities...
278                 entity = cursor.nextDup();
279             }
280         }
281     }
282 } finally {
283     cursor.close();
284 }</pre>
285
286 <h3>Updating and Deleting Entities with a Cursor</h3>
287
288 <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
289 the current cursor position.  Cursors on any type of index may be used to
290 delete entities.  For example, the following code deletes all employees in
291 departments which have names that match a particular regular expression:</p>
292
293 <pre class="code">
294 <code>SecondaryIndex&lt;String,Long,Employee&gt;</code> secondaryIndex =
295     store.getSecondaryIndex(primaryIndex, String.class, "department");
296
297 String regex = ...;
298 <code>EntityCursor&lt;Employee&gt;</code> cursor = secondaryIndex.entities();
299 try {
300     for (Employee entity = cursor.first();
301                   entity != null;
302                   entity = cursor.nextNoDup()) {
303         if (entity.department.matches(regex)) {
304             while (entity != null) {
305                 cursor.delete();
306                 entity = cursor.nextDup();
307             }
308         }
309     }
310 } finally {
311     cursor.close();
312 }</pre>
313
314 <p>Note that the cursor can be moved to the next (or previous) value after
315 deleting the entity at the current position.  This is an important property
316 of cursors, since without it you would not be able to easily delete while
317 processing multiple values with a cursor.  A cursor positioned on a deleted
318 entity is in a special state.  In this state, <A HREF="/com/sleepycat/persist/EntityCursor.html#current()"><CODE>current()</CODE></A> will return
319 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
320 false.</p>
321
322 <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
323 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
324 employee names to uppercase:</p>
325
326 <pre class="code">
327 <code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
328 try {
329     for (Employee entity = cursor.first();
330                   entity != null;
331                   entity = cursor.next()) {
332         entity.name = entity.name.toUpperCase();
333         cursor.update(entity);
334     }
335 } finally {
336     cursor.close();
337 }</pre>
338<P>
339
340<P>
341<HR>
342
343<P>
344
345<!-- ========== METHOD SUMMARY =========== -->
346
347<A NAME="method_summary"><!-- --></A>
348<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
349<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
350<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
351<B>Method Summary</B></FONT></TH>
352</TR>
353<TR BGCOLOR="white" CLASS="TableRowColor">
354<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
355<CODE>&nbsp;void</CODE></FONT></TD>
356<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#close()">close</A></B>()</CODE>
357
358<BR>
359&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the cursor.</TD>
360</TR>
361<TR BGCOLOR="white" CLASS="TableRowColor">
362<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
363<CODE>&nbsp;int</CODE></FONT></TD>
364<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#count()">count</A></B>()</CODE>
365
366<BR>
367&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of values (duplicates) for the key at the cursor
368 position, or returns zero if all values for the key have been deleted,
369 Returns one or zero if the underlying index has unique keys.</TD>
370</TR>
371<TR BGCOLOR="white" CLASS="TableRowColor">
372<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
373<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
374<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#current()">current</A></B>()</CODE>
375
376<BR>
377&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value at the cursor position, or null if the value at the
378 cursor position has been deleted.</TD>
379</TR>
380<TR BGCOLOR="white" CLASS="TableRowColor">
381<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
382<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
383<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>&nbsp;lockMode)</CODE>
384
385<BR>
386&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value at the cursor position, or null if the value at the
387 cursor position has been deleted.</TD>
388</TR>
389<TR BGCOLOR="white" CLASS="TableRowColor">
390<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
391<CODE>&nbsp;boolean</CODE></FONT></TD>
392<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#delete()">delete</A></B>()</CODE>
393
394<BR>
395&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deletes the entity at the cursor position.</TD>
396</TR>
397<TR BGCOLOR="white" CLASS="TableRowColor">
398<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
399<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</A>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></FONT></TD>
400<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#dup()">dup</A></B>()</CODE>
401
402<BR>
403&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Duplicates the cursor at the cursor position.</TD>
404</TR>
405<TR BGCOLOR="white" CLASS="TableRowColor">
406<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
407<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
408<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#first()">first</A></B>()</CODE>
409
410<BR>
411&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the first value and returns it, or returns null if
412 the cursor range is empty.</TD>
413</TR>
414<TR BGCOLOR="white" CLASS="TableRowColor">
415<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
416<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
417<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>&nbsp;lockMode)</CODE>
418
419<BR>
420&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the first value and returns it, or returns null if
421 the cursor range is empty.</TD>
422</TR>
423<TR BGCOLOR="white" CLASS="TableRowColor">
424<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
425<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></FONT></TD>
426<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#iterator()">iterator</A></B>()</CODE>
427
428<BR>
429&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an iterator over the key range, starting with the value
430 following the current position or at the first value if the cursor is
431 uninitialized.</TD>
432</TR>
433<TR BGCOLOR="white" CLASS="TableRowColor">
434<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
435<CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></FONT></TD>
436<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>&nbsp;lockMode)</CODE>
437
438<BR>
439&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an iterator over the key range, starting with the value
440 following the current position or at the first value if the cursor is
441 uninitialized.</TD>
442</TR>
443<TR BGCOLOR="white" CLASS="TableRowColor">
444<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
445<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
446<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#last()">last</A></B>()</CODE>
447
448<BR>
449&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the last value and returns it, or returns null if
450 the cursor range is empty.</TD>
451</TR>
452<TR BGCOLOR="white" CLASS="TableRowColor">
453<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
454<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
455<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>&nbsp;lockMode)</CODE>
456
457<BR>
458&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the last value and returns it, or returns null if
459 the cursor range is empty.</TD>
460</TR>
461<TR BGCOLOR="white" CLASS="TableRowColor">
462<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
463<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
464<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#next()">next</A></B>()</CODE>
465
466<BR>
467&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value and returns it, or returns null
468 if there are no more values in the cursor range.</TD>
469</TR>
470<TR BGCOLOR="white" CLASS="TableRowColor">
471<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
472<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
473<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>&nbsp;lockMode)</CODE>
474
475<BR>
476&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value and returns it, or returns null
477 if there are no more values in the cursor range.</TD>
478</TR>
479<TR BGCOLOR="white" CLASS="TableRowColor">
480<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
481<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
482<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#nextDup()">nextDup</A></B>()</CODE>
483
484<BR>
485&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value with the same key (duplicate) and
486 returns it, or returns null if no more values are present for the key at
487 the current position.</TD>
488</TR>
489<TR BGCOLOR="white" CLASS="TableRowColor">
490<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
491<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
492<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>&nbsp;lockMode)</CODE>
493
494<BR>
495&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value with the same key (duplicate) and
496 returns it, or returns null if no more values are present for the key at
497 the current position.</TD>
498</TR>
499<TR BGCOLOR="white" CLASS="TableRowColor">
500<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
501<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
502<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#nextNoDup()">nextNoDup</A></B>()</CODE>
503
504<BR>
505&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value with a different key and returns it,
506 or returns null if there are no more unique keys in the cursor range.</TD>
507</TR>
508<TR BGCOLOR="white" CLASS="TableRowColor">
509<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
510<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
511<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>&nbsp;lockMode)</CODE>
512
513<BR>
514&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the next value with a different key and returns it,
515 or returns null if there are no more unique keys in the cursor range.</TD>
516</TR>
517<TR BGCOLOR="white" CLASS="TableRowColor">
518<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
519<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
520<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#prev()">prev</A></B>()</CODE>
521
522<BR>
523&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the previous value and returns it, or returns null
524 if there are no preceding values in the cursor range.</TD>
525</TR>
526<TR BGCOLOR="white" CLASS="TableRowColor">
527<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
528<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
529<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>&nbsp;lockMode)</CODE>
530
531<BR>
532&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the previous value and returns it, or returns null
533 if there are no preceding values in the cursor range.</TD>
534</TR>
535<TR BGCOLOR="white" CLASS="TableRowColor">
536<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
537<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
538<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#prevDup()">prevDup</A></B>()</CODE>
539
540<BR>
541&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the previous value with the same key (duplicate) and
542 returns it, or returns null if no preceding values are present for the
543 key at the current position.</TD>
544</TR>
545<TR BGCOLOR="white" CLASS="TableRowColor">
546<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
547<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
548<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>&nbsp;lockMode)</CODE>
549
550<BR>
551&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the previous value with the same key (duplicate) and
552 returns it, or returns null if no preceding values are present for the
553 key at the current position.</TD>
554</TR>
555<TR BGCOLOR="white" CLASS="TableRowColor">
556<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
557<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
558<TD><CODE><B><A HREF="/com/sleepycat/persist/EntityCursor.html#prevNoDup()">prevNoDup</A></B>()</CODE>
559
560<BR>
561&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the preceding value with a different key and returns
562 it, or returns null if there are no preceding unique keys in the cursor
563 range.</TD>
564</TR>
565<TR BGCOLOR="white" CLASS="TableRowColor">
566<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
567<CODE>&nbsp;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A></CODE></FONT></TD>
568<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>&nbsp;lockMode)</CODE>
569
570<BR>
571&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Moves the cursor to the preceding value with a different key and returns
572 it, or returns null if there are no preceding unique keys in the cursor
573 range.</TD>
574</TR>
575<TR BGCOLOR="white" CLASS="TableRowColor">
576<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
577<CODE>&nbsp;boolean</CODE></FONT></TD>
578<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>&nbsp;entity)</CODE>
579
580<BR>
581&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replaces the entity at the cursor position with the given entity.</TD>
582</TR>
583</TABLE>
584&nbsp;
585<P>
586
587<!-- ============ METHOD DETAIL ========== -->
588
589<A NAME="method_detail"><!-- --></A>
590<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
591<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
592<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
593<B>Method Detail</B></FONT></TH>
594</TR>
595</TABLE>
596
597<A NAME="first()"><!-- --></A><H3>
598first</H3>
599<PRE>
600<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>first</B>()
601        throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
602<DL>
603<DD>Moves the cursor to the first value and returns it, or returns null if
604 the cursor range is empty.
605
606 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
607<P>
608<DD><DL>
609</DL>
610</DD>
611<DD><DL>
612
613<DT><B>Returns:</B><DD>the first value, or null if the cursor range is empty.
614<DT><B>Throws:</B>
615<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
616</DD>
617</DL>
618<HR>
619
620<A NAME="first(com.sleepycat.db.LockMode)"><!-- --></A><H3>
621first</H3>
622<PRE>
623<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>&nbsp;lockMode)
624        throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
625<DL>
626<DD>Moves the cursor to the first value and returns it, or returns null if
627 the cursor range is empty.
628<P>
629<DD><DL>
630</DL>
631</DD>
632<DD><DL>
633<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
634 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
635<DT><B>Returns:</B><DD>the first value, or null if the cursor range is empty.
636<DT><B>Throws:</B>
637<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
638</DD>
639</DL>
640<HR>
641
642<A NAME="last()"><!-- --></A><H3>
643last</H3>
644<PRE>
645<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>last</B>()
646       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
647<DL>
648<DD>Moves the cursor to the last value and returns it, or returns null if
649 the cursor range is empty.
650
651 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
652<P>
653<DD><DL>
654</DL>
655</DD>
656<DD><DL>
657
658<DT><B>Returns:</B><DD>the last value, or null if the cursor range is empty.
659<DT><B>Throws:</B>
660<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
661</DD>
662</DL>
663<HR>
664
665<A NAME="last(com.sleepycat.db.LockMode)"><!-- --></A><H3>
666last</H3>
667<PRE>
668<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>&nbsp;lockMode)
669       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
670<DL>
671<DD>Moves the cursor to the last value and returns it, or returns null if
672 the cursor range is empty.
673<P>
674<DD><DL>
675</DL>
676</DD>
677<DD><DL>
678<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
679 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
680<DT><B>Returns:</B><DD>the last value, or null if the cursor range is empty.
681<DT><B>Throws:</B>
682<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
683</DD>
684</DL>
685<HR>
686
687<A NAME="next()"><!-- --></A><H3>
688next</H3>
689<PRE>
690<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>next</B>()
691       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
692<DL>
693<DD>Moves the cursor to the next value and returns it, or returns null
694 if there are no more values in the cursor range.  If the cursor is
695 uninitialized, this method is equivalent to <A HREF="/com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
696
697 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
698<P>
699<DD><DL>
700<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>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></DL>
701</DD>
702<DD><DL>
703
704<DT><B>Returns:</B><DD>the next value, or null if there are no more values in the
705 cursor range.
706<DT><B>Throws:</B>
707<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
708</DD>
709</DL>
710<HR>
711
712<A NAME="next(com.sleepycat.db.LockMode)"><!-- --></A><H3>
713next</H3>
714<PRE>
715<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>&nbsp;lockMode)
716       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
717<DL>
718<DD>Moves the cursor to the next value and returns it, or returns null
719 if there are no more values in the cursor range.  If the cursor is
720 uninitialized, this method is equivalent to <A HREF="/com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
721<P>
722<DD><DL>
723<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>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></DL>
724</DD>
725<DD><DL>
726<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
727 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
728<DT><B>Returns:</B><DD>the next value, or null if there are no more values in the
729 cursor range.
730<DT><B>Throws:</B>
731<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
732</DD>
733</DL>
734<HR>
735
736<A NAME="nextDup()"><!-- --></A><H3>
737nextDup</H3>
738<PRE>
739<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>nextDup</B>()
740          throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
741<DL>
742<DD>Moves the cursor to the next value with the same key (duplicate) and
743 returns it, or returns null if no more values are present for the key at
744 the current position.
745
746 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
747<P>
748<DD><DL>
749</DL>
750</DD>
751<DD><DL>
752
753<DT><B>Returns:</B><DD>the next value with the same key, or null if no more values are
754 present for the key at the current position.
755<DT><B>Throws:</B>
756<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
757<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
758</DD>
759</DL>
760<HR>
761
762<A NAME="nextDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
763nextDup</H3>
764<PRE>
765<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>&nbsp;lockMode)
766          throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
767<DL>
768<DD>Moves the cursor to the next value with the same key (duplicate) and
769 returns it, or returns null if no more values are present for the key at
770 the current position.
771<P>
772<DD><DL>
773</DL>
774</DD>
775<DD><DL>
776<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
777 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
778<DT><B>Returns:</B><DD>the next value with the same key, or null if no more values are
779 present for the key at the current position.
780<DT><B>Throws:</B>
781<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
782<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
783</DD>
784</DL>
785<HR>
786
787<A NAME="nextNoDup()"><!-- --></A><H3>
788nextNoDup</H3>
789<PRE>
790<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>nextNoDup</B>()
791            throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
792<DL>
793<DD>Moves the cursor to the next value with a different key and returns it,
794 or returns null if there are no more unique keys in the cursor range.
795 If the cursor is uninitialized, this method is equivalent to <A HREF="/com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
796
797 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
798<P>
799<DD><DL>
800</DL>
801</DD>
802<DD><DL>
803
804<DT><B>Returns:</B><DD>the next value with a different key, or null if there are no
805 more unique keys in the cursor range.
806<DT><B>Throws:</B>
807<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
808</DD>
809</DL>
810<HR>
811
812<A NAME="nextNoDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
813nextNoDup</H3>
814<PRE>
815<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>&nbsp;lockMode)
816            throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
817<DL>
818<DD>Moves the cursor to the next value with a different key and returns it,
819 or returns null if there are no more unique keys in the cursor range.
820 If the cursor is uninitialized, this method is equivalent to <A HREF="/com/sleepycat/persist/EntityCursor.html#first()"><CODE>first()</CODE></A>.
821<P>
822<DD><DL>
823</DL>
824</DD>
825<DD><DL>
826<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
827 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
828<DT><B>Returns:</B><DD>the next value with a different key, or null if there are no
829 more unique keys in the cursor range.
830<DT><B>Throws:</B>
831<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
832</DD>
833</DL>
834<HR>
835
836<A NAME="prev()"><!-- --></A><H3>
837prev</H3>
838<PRE>
839<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prev</B>()
840       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
841<DL>
842<DD>Moves the cursor to the previous value and returns it, or returns null
843 if there are no preceding values in the cursor range.  If the cursor is
844 uninitialized, this method is equivalent to <A HREF="/com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
845
846 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
847<P>
848<DD><DL>
849</DL>
850</DD>
851<DD><DL>
852
853<DT><B>Returns:</B><DD>the previous value, or null if there are no preceding values in
854 the cursor range.
855<DT><B>Throws:</B>
856<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
857</DD>
858</DL>
859<HR>
860
861<A NAME="prev(com.sleepycat.db.LockMode)"><!-- --></A><H3>
862prev</H3>
863<PRE>
864<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>&nbsp;lockMode)
865       throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
866<DL>
867<DD>Moves the cursor to the previous value and returns it, or returns null
868 if there are no preceding values in the cursor range.  If the cursor is
869 uninitialized, this method is equivalent to <A HREF="/com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
870<P>
871<DD><DL>
872</DL>
873</DD>
874<DD><DL>
875<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
876 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
877<DT><B>Returns:</B><DD>the previous value, or null if there are no preceding values in
878 the cursor range.
879<DT><B>Throws:</B>
880<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
881</DD>
882</DL>
883<HR>
884
885<A NAME="prevDup()"><!-- --></A><H3>
886prevDup</H3>
887<PRE>
888<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prevDup</B>()
889          throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
890<DL>
891<DD>Moves the cursor to the previous value with the same key (duplicate) and
892 returns it, or returns null if no preceding values are present for the
893 key at the current position.
894
895 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
896<P>
897<DD><DL>
898</DL>
899</DD>
900<DD><DL>
901
902<DT><B>Returns:</B><DD>the previous value with the same key, or null if no preceding
903 values are present for the key at the current position.
904<DT><B>Throws:</B>
905<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
906<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
907</DD>
908</DL>
909<HR>
910
911<A NAME="prevDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
912prevDup</H3>
913<PRE>
914<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>&nbsp;lockMode)
915          throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
916<DL>
917<DD>Moves the cursor to the previous value with the same key (duplicate) and
918 returns it, or returns null if no preceding values are present for the
919 key at the current position.
920<P>
921<DD><DL>
922</DL>
923</DD>
924<DD><DL>
925<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
926 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
927<DT><B>Returns:</B><DD>the previous value with the same key, or null if no preceding
928 values are present for the key at the current position.
929<DT><B>Throws:</B>
930<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
931<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
932</DD>
933</DL>
934<HR>
935
936<A NAME="prevNoDup()"><!-- --></A><H3>
937prevNoDup</H3>
938<PRE>
939<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>prevNoDup</B>()
940            throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
941<DL>
942<DD>Moves the cursor to the preceding value with a different key and returns
943 it, or returns null if there are no preceding unique keys in the cursor
944 range.  If the cursor is uninitialized, this method is equivalent to
945 <A HREF="/com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
946
947 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
948<P>
949<DD><DL>
950</DL>
951</DD>
952<DD><DL>
953
954<DT><B>Returns:</B><DD>the previous value with a different key, or null if there are no
955 preceding unique keys in the cursor range.
956<DT><B>Throws:</B>
957<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
958</DD>
959</DL>
960<HR>
961
962<A NAME="prevNoDup(com.sleepycat.db.LockMode)"><!-- --></A><H3>
963prevNoDup</H3>
964<PRE>
965<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>&nbsp;lockMode)
966            throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
967<DL>
968<DD>Moves the cursor to the preceding value with a different key and returns
969 it, or returns null if there are no preceding unique keys in the cursor
970 range.  If the cursor is uninitialized, this method is equivalent to
971 <A HREF="/com/sleepycat/persist/EntityCursor.html#last()"><CODE>last()</CODE></A>.
972<P>
973<DD><DL>
974</DL>
975</DD>
976<DD><DL>
977<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
978 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
979<DT><B>Returns:</B><DD>the previous value with a different key, or null if there are no
980 preceding unique keys in the cursor range.
981<DT><B>Throws:</B>
982<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
983</DD>
984</DL>
985<HR>
986
987<A NAME="current()"><!-- --></A><H3>
988current</H3>
989<PRE>
990<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A> <B>current</B>()
991          throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
992<DL>
993<DD>Returns the value at the cursor position, or null if the value at the
994 cursor position has been deleted.
995
996 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
997<P>
998<DD><DL>
999</DL>
1000</DD>
1001<DD><DL>
1002
1003<DT><B>Returns:</B><DD>the value at the cursor position, or null if it has been
1004 deleted.
1005<DT><B>Throws:</B>
1006<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1007<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
1008</DD>
1009</DL>
1010<HR>
1011
1012<A NAME="current(com.sleepycat.db.LockMode)"><!-- --></A><H3>
1013current</H3>
1014<PRE>
1015<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>&nbsp;lockMode)
1016          throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1017<DL>
1018<DD>Returns the value at the cursor position, or null if the value at the
1019 cursor position has been deleted.
1020<P>
1021<DD><DL>
1022</DL>
1023</DD>
1024<DD><DL>
1025<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for this operation, or null to
1026 use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
1027<DT><B>Returns:</B><DD>the value at the cursor position, or null if it has been
1028 deleted.
1029<DT><B>Throws:</B>
1030<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1031<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
1032</DD>
1033</DL>
1034<HR>
1035
1036<A NAME="count()"><!-- --></A><H3>
1037count</H3>
1038<PRE>
1039int <B>count</B>()
1040          throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1041<DL>
1042<DD>Returns the number of values (duplicates) for the key at the cursor
1043 position, or returns zero if all values for the key have been deleted,
1044 Returns one or zero if the underlying index has unique keys.
1045
1046 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
1047<P>
1048<DD><DL>
1049</DL>
1050</DD>
1051<DD><DL>
1052
1053<DT><B>Returns:</B><DD>the number of duplicates, or zero if all values for the current
1054 key have been deleted.
1055<DT><B>Throws:</B>
1056<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1057<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
1058</DD>
1059</DL>
1060<HR>
1061
1062<A NAME="iterator()"><!-- --></A><H3>
1063iterator</H3>
1064<PRE>
1065<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt; <B>iterator</B>()</PRE>
1066<DL>
1067<DD>Returns an iterator over the key range, starting with the value
1068 following the current position or at the first value if the cursor is
1069 uninitialized.
1070
1071 <p><A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A> is used implicitly.</p>
1072<P>
1073<DD><DL>
1074<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>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html#iterator()" title="class or interface in java.lang">iterator</A></CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Iterable.html" title="class or interface in java.lang">Iterable</A>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></DL>
1075</DD>
1076<DD><DL>
1077
1078<DT><B>Returns:</B><DD>the iterator.</DL>
1079</DD>
1080</DL>
1081<HR>
1082
1083<A NAME="iterator(com.sleepycat.db.LockMode)"><!-- --></A><H3>
1084iterator</H3>
1085<PRE>
1086<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt; <B>iterator</B>(<A HREF="/com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)</PRE>
1087<DL>
1088<DD>Returns an iterator over the key range, starting with the value
1089 following the current position or at the first value if the cursor is
1090 uninitialized.
1091<P>
1092<DD><DL>
1093<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>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></DL>
1094</DD>
1095<DD><DL>
1096<DT><B>Parameters:</B><DD><CODE>lockMode</CODE> - the lock mode to use for all operations performed
1097 using the iterator, or null to use <A HREF="/com/sleepycat/db/LockMode.html#DEFAULT"><CODE>LockMode.DEFAULT</CODE></A>.
1098<DT><B>Returns:</B><DD>the iterator.</DL>
1099</DD>
1100</DL>
1101<HR>
1102
1103<A NAME="update(java.lang.Object)"><!-- --></A><A NAME="update(V)"><!-- --></A><H3>
1104update</H3>
1105<PRE>
1106boolean <B>update</B>(<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&nbsp;entity)
1107               throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1108<DL>
1109<DD>Replaces the entity at the cursor position with the given entity.
1110<P>
1111<DD><DL>
1112</DL>
1113</DD>
1114<DD><DL>
1115<DT><B>Parameters:</B><DD><CODE>entity</CODE> - the entity to replace the entity at the current position.
1116<DT><B>Returns:</B><DD>true if successful or false if the entity at the current
1117 position was previously deleted.
1118<DT><B>Throws:</B>
1119<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1120<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the index is read only or if
1121 the value type is not an entity type.
1122<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
1123</DD>
1124</DL>
1125<HR>
1126
1127<A NAME="delete()"><!-- --></A><H3>
1128delete</H3>
1129<PRE>
1130boolean <B>delete</B>()
1131               throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1132<DL>
1133<DD>Deletes the entity at the cursor position.
1134<P>
1135<DD><DL>
1136</DL>
1137</DD>
1138<DD><DL>
1139
1140<DT><B>Returns:</B><DD>true if successful or false if the entity at the current
1141 position has been deleted.
1142<DT><B>Throws:</B>
1143<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalStateException.html" title="class or interface in java.lang">IllegalStateException</A></CODE> - if the cursor is uninitialized.
1144<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the index is read only.
1145<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
1146</DD>
1147</DL>
1148<HR>
1149
1150<A NAME="dup()"><!-- --></A><H3>
1151dup</H3>
1152<PRE>
1153<A HREF="/com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</A>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt; <B>dup</B>()
1154                    throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1155<DL>
1156<DD>Duplicates the cursor at the cursor position.  The returned cursor will
1157 be initially positioned at the same position as this current cursor, and
1158 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>.
1159<P>
1160<DD><DL>
1161</DL>
1162</DD>
1163<DD><DL>
1164
1165<DT><B>Returns:</B><DD>the duplicated cursor.
1166<DT><B>Throws:</B>
1167<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
1168</DD>
1169</DL>
1170<HR>
1171
1172<A NAME="close()"><!-- --></A><H3>
1173close</H3>
1174<PRE>
1175void <B>close</B>()
1176           throws <A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
1177<DL>
1178<DD>Closes the cursor.
1179<P>
1180<DD><DL>
1181<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>&lt;<A HREF="/com/sleepycat/persist/EntityCursor.html" title="type parameter in EntityCursor">V</A>&gt;</CODE></DL>
1182</DD>
1183<DD><DL>
1184
1185<DT><B>Throws:</B>
1186<DD><CODE><A HREF="/com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
1187</DD>
1188</DL>
1189<!-- ========= END OF CLASS DATA ========= -->
1190<HR>
1191
1192
1193<!-- ======= START OF BOTTOM NAVBAR ====== -->
1194<A NAME="navbar_bottom"><!-- --></A>
1195<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
1196<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
1197<TR>
1198<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1199<A NAME="navbar_bottom_firstrow"><!-- --></A>
1200<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
1201  <TR ALIGN="center" VALIGN="top">
1202  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
1203  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
1204  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1205  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/EntityCursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1206  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1207  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1208  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1209  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="/help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1210  </TR>
1211</TABLE>
1212</TD>
1213<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1214<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
1215</TD>
1216</TR>
1217
1218<TR>
1219<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1220&nbsp;<A HREF="/com/sleepycat/persist/DatabaseNamer.html" title="interface in com.sleepycat.persist"><B>PREV CLASS</B></A>&nbsp;
1221&nbsp;<A HREF="/com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><B>NEXT CLASS</B></A></FONT></TD>
1222<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1223  <A HREF="/index.html?com/sleepycat/persist/EntityCursor.html" target="_top"><B>FRAMES</B></A>  &nbsp;
1224&nbsp;<A HREF="EntityCursor.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
1225&nbsp;<SCRIPT type="text/javascript">
1226  <!--
1227  if(window==top) {
1228    document.writeln('<A HREF="/allclasses-noframe.html"><B>All Classes</B></A>');
1229  }
1230  //-->
1231</SCRIPT>
1232<NOSCRIPT>
1233  <A HREF="/allclasses-noframe.html"><B>All Classes</B></A>
1234</NOSCRIPT>
1235
1236
1237</FONT></TD>
1238</TR>
1239<TR>
1240<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1241  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1242<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1243DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1244</TR>
1245</TABLE>
1246<A NAME="skip-navbar_bottom"></A>
1247<!-- ======== END OF BOTTOM NAVBAR ======= -->
1248
1249<HR>
1250<font size=1>Copyright (c) 1996,2008 Oracle.  All rights reserved.</font>
1251</BODY>
1252</HTML>
1253