Files
Yasuhiro KIMURA 9678929700 Update to 18.1.40
2020-07-24 01:10:28 +09:00

1237 lines
60 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.7) on Mon Jun 01 06:40:53 PDT 2020 -->
<title>EntityCursor (Oracle - Berkeley DB Java API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="date" content="2020-06-01">
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../jquery/jquery-3.4.1.js"></script>
<script type="text/javascript" src="../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="EntityCursor (Oracle - Berkeley DB Java API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EntityCursor.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Berkeley DB</b><br><font size="-1"> version 18.1.40</font></div>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.sleepycat.persist</a></div>
<h2 title="Interface EntityCursor" class="title">Interface EntityCursor&lt;V&gt;</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><code><a href="ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</a>&lt;V&gt;</code>, <code>java.lang.Iterable&lt;V&gt;</code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">EntityCursor&lt;V&gt;</span>
extends <a href="ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</a>&lt;V&gt;</pre>
<div class="block">Traverses entity values or key values and allows deleting or updating the
entity at the current cursor position. The value type (V) is either an
entity class or a key class, depending on how the cursor was opened.
<p><code>EntityCursor</code> objects are <em>not</em> thread-safe. Cursors
should be opened, used and closed by a single thread.</p>
<p>Cursors are opened using the <a href="EntityIndex.html#keys--"><code>EntityIndex.keys()</code></a> and <a href="EntityIndex.html#entities--"><code>EntityIndex.entities()</code></a> family of methods. These methods are available for
objects of any class that implements <a href="EntityIndex.html" title="interface in com.sleepycat.persist"><code>EntityIndex</code></a>: <a href="PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a>, <a href="SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a>, and the indices returned by <a href="SecondaryIndex.html#keysIndex"><code>SecondaryIndex.keysIndex</code></a> and <a href="SecondaryIndex.html#subIndex-SK-"><code>SecondaryIndex.subIndex(SK)</code></a>. A <a href="ForwardCursor.html" title="interface in com.sleepycat.persist"><code>ForwardCursor</code></a>, which implements a subset of cursor operations, is also
available via the <a href="EntityJoin.html#keys--"><code>EntityJoin.keys()</code></a> and <a href="EntityJoin.html#entities--"><code>EntityJoin.entities()</code></a>
methods.</p>
<p>Values are always returned by a cursor in key order, where the key is
defined by the underlying <a href="EntityIndex.html" title="interface in com.sleepycat.persist"><code>EntityIndex</code></a>. For example, a cursor on a
<a href="SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a> returns values ordered by secondary key, while an
index on a <a href="PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a> or a <a href="SecondaryIndex.html#subIndex-SK-"><code>SecondaryIndex.subIndex(SK)</code></a> returns
values ordered by primary key.</p>
<p><em>WARNING:</em> Cursors must always be closed to prevent resource leaks
which could lead to the index becoming unusable or cause an
<code>OutOfMemoryError</code>. To ensure that a cursor is closed in the
face of exceptions, call <a href="#close--"><code>close()</code></a> in a finally block. For example,
the following code traverses all Employee entities and closes the cursor
whether or not an exception occurs:</p>
<pre class="code">
@Entity
class Employee {
@PrimaryKey
long id;
@SecondaryKey(relate=MANY_TO_ONE)
String department;
String name;
private Employee() {}
}
EntityStore store = ...
<code>PrimaryIndex&lt;Long, Employee&gt;</code> primaryIndex =
store.getPrimaryIndex(Long.class, Employee.class);
<code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
try {
for (Employee entity = cursor.first();
entity != null;
entity = cursor.next()) {
// Do something with the entity...
}
} finally {
cursor.close();
}</pre>
<h3>Initializing the Cursor Position</h3>
<p>When it is opened, a cursor is not initially positioned on any value; in
other words, it is uninitialized. Most methods in this interface initialize
the cursor position but certain methods, for example, <a href="#current--"><code>current()</code></a> and
<a href="#delete--"><code>delete()</code></a>, throw <code>IllegalStateException</code> when called for an
uninitialized cursor.</p>
<p>Note that the <a href="#next--"><code>next()</code></a> and <a href="#prev--"><code>prev()</code></a> methods return the first or
last value respectively for an uninitialized cursor. This allows the loop
in the example above to be rewritten as follows:</p>
<pre class="code">
<code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
try {
Employee entity;
while ((entity = cursor.next()) != null) {
// Do something with the entity...
}
} finally {
cursor.close();
}</pre>
<h3>Cursors and Iterators</h3>
<p>The <a href="#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
example:</p>
<pre class="code">
<code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
try {
<code>Iterator&lt;Employee&gt;</code> i = cursor.iterator();
while (i.hasNext()) {
Employee entity = i.next();
// Do something with the entity...
}
} finally {
cursor.close();
}</pre>
<p>The <code>Iterable</code> interface is also extended by <a href="EntityCursor.html" title="interface in com.sleepycat.persist"><code>EntityCursor</code></a>
to allow using the cursor as the target of a Java "foreach" statement:</p>
<pre class="code">
<code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
try {
for (Employee entity : cursor) {
// Do something with the entity...
}
} finally {
cursor.close();
}</pre>
<p>The iterator uses the cursor directly, so any changes to the cursor
position impact the iterator and vice versa. The iterator advances the
cursor by calling <a href="#next--"><code>next()</code></a> when <code>Iterator.hasNext()</code> or <code>Iterator.next()</code> is called. Because of this interaction, to keep things
simple it is best not to mix the use of an <code>EntityCursor</code>
<code>Iterator</code> with the use of the <code>EntityCursor</code> traversal methods
such as <a href="#next--"><code>next()</code></a>, for a single <code>EntityCursor</code> object.</p>
<h3>Key Ranges</h3>
<p>A key range may be specified when opening the cursor, to restrict the
key range of the cursor to a subset of the complete range of keys in the
index. A <code>fromKey</code> and/or <code>toKey</code> parameter may be specified
when calling <a href="EntityIndex.html#keys-K-boolean-K-boolean-"><code>EntityIndex.keys(Object,boolean,Object,boolean)</code></a> or
<a href="EntityIndex.html#entities-K-boolean-K-boolean-"><code>EntityIndex.entities(Object,boolean,Object,boolean)</code></a>. The key
arguments may be specified as inclusive or exclusive values.</p>
<p>Whenever a cursor with a key range is moved, the key range bounds will be
checked, and the cursor will never be positioned outside the range. The
<a href="#first--"><code>first()</code></a> cursor value is the first existing value in the range, and
the <a href="#last--"><code>last()</code></a> cursor value is the last existing value in the range. For
example, the following code traverses Employee entities with keys from 100
(inclusive) to 200 (exclusive):</p>
<pre class="code">
<code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities(100, true, 200, false);
try {
for (Employee entity : cursor) {
// Do something with the entity...
}
} finally {
cursor.close();
}</pre>
<h3>Duplicate Keys</h3>
<p>When using a cursor for a <a href="SecondaryIndex.html" title="class in com.sleepycat.persist"><code>SecondaryIndex</code></a>, the keys in the index
may be non-unique (duplicates) if <a href="model/SecondaryKey.html#relate--"><code>SecondaryKey.relate()</code></a> is <a href="model/Relationship.html#MANY_TO_ONE"><code>MANY_TO_ONE</code></a> or <a href="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
Employee entities with the same department key value. The <a href="#nextDup--"><code>nextDup()</code></a>,
<a href="#prevDup--"><code>prevDup()</code></a>, <a href="#nextNoDup--"><code>nextNoDup()</code></a> and <a href="#prevNoDup--"><code>prevNoDup()</code></a> methods may be
used to control how non-unique keys are returned by the cursor.</p>
<p><a href="#nextDup--"><code>nextDup()</code></a> and <a href="#prevDup--"><code>prevDup()</code></a> return the next or previous value
only if it has the same key as the current value, and null is returned when
a different key is encountered. For example, these methods can be used to
return all employees in a given department.</p>
<p><a href="#nextNoDup--"><code>nextNoDup()</code></a> and <a href="#prevNoDup--"><code>prevNoDup()</code></a> return the next or previous
value with a unique key, skipping over values that have the same key. For
example, these methods can be used to return the first employee in each
department.</p>
<p>For example, the following code will find the first employee in each
department with <a href="#nextNoDup--"><code>nextNoDup()</code></a> until it finds a department name that
matches a particular regular expression. For each matching department it
will find all employees in that department using <a href="#nextDup--"><code>nextDup()</code></a>.</p>
<pre class="code">
<code>SecondaryIndex&lt;String, Long, Employee&gt;</code> secondaryIndex =
store.getSecondaryIndex(primaryIndex, String.class, "department");
String regex = ...;
<code>EntityCursor&lt;Employee&gt;</code> cursor = secondaryIndex.entities();
try {
for (Employee entity = cursor.first();
entity != null;
entity = cursor.nextNoDup()) {
if (entity.department.matches(regex)) {
while (entity != null) {
// Do something with the matching entities...
entity = cursor.nextDup();
}
}
}
} finally {
cursor.close();
}</pre>
<h3>Updating and Deleting Entities with a Cursor</h3>
<p>The <a href="#update-V-"><code>update(V)</code></a> and <a href="#delete--"><code>delete()</code></a> methods operate on the entity at
the current cursor position. Cursors on any type of index may be used to
delete entities. For example, the following code deletes all employees in
departments which have names that match a particular regular expression:</p>
<pre class="code">
<code>SecondaryIndex&lt;String, Long, Employee&gt;</code> secondaryIndex =
store.getSecondaryIndex(primaryIndex, String.class, "department");
String regex = ...;
<code>EntityCursor&lt;Employee&gt;</code> cursor = secondaryIndex.entities();
try {
for (Employee entity = cursor.first();
entity != null;
entity = cursor.nextNoDup()) {
if (entity.department.matches(regex)) {
while (entity != null) {
cursor.delete();
entity = cursor.nextDup();
}
}
}
} finally {
cursor.close();
}</pre>
<p>Note that the cursor can be moved to the next (or previous) value after
deleting the entity at the current position. This is an important property
of cursors, since without it you would not be able to easily delete while
processing multiple values with a cursor. A cursor positioned on a deleted
entity is in a special state. In this state, <a href="#current--"><code>current()</code></a> will return
null, <a href="#delete--"><code>delete()</code></a> will return false, and <a href="#update-V-"><code>update(V)</code></a> will return
false.</p>
<p>The <a href="#update-V-"><code>update(V)</code></a> method is supported only if the value type is an
entity class (not a key class) and the underlying index is a <a href="PrimaryIndex.html" title="class in com.sleepycat.persist"><code>PrimaryIndex</code></a>; in other words, for a cursor returned by one of the <a href="EntityIndex.html#entities--"><code>EntityIndex.entities()</code></a> methods. For example, the following code changes all
employee names to uppercase:</p>
<pre class="code">
<code>EntityCursor&lt;Employee&gt;</code> cursor = primaryIndex.entities();
try {
for (Employee entity = cursor.first();
entity != null;
entity = cursor.next()) {
entity.name = entity.name.toUpperCase();
cursor.update(entity);
}
} finally {
cursor.close();
}</pre></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close--">close</a></span>()</code></th>
<td class="colLast">
<div class="block">Closes the cursor.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#count--">count</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the number of values (duplicates) for the key at the cursor
position, or returns zero if all values for the key have been deleted.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#current--">current</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns the value at the cursor position, or null if the value at the
cursor position has been deleted.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#current-com.sleepycat.db.LockMode-">current</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Returns the value at the cursor position, or null if the value at the
cursor position has been deleted.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#delete--">delete</a></span>()</code></th>
<td class="colLast">
<div class="block">Deletes the entity at the cursor position.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#dup--">dup</a></span>()</code></th>
<td class="colLast">
<div class="block">Duplicates the cursor at the cursor position.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first--">first</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the first value and returns it, or returns null if
the cursor range is empty.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#first-com.sleepycat.db.LockMode-">first</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the first value and returns it, or returns null if
the cursor range is empty.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.util.Iterator&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterator--">iterator</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.util.Iterator&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterator-com.sleepycat.db.LockMode-">iterator</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#last--">last</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the last value and returns it, or returns null if
the cursor range is empty.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#last-com.sleepycat.db.LockMode-">last</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the last value and returns it, or returns null if
the cursor range is empty.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#next--">next</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#next-com.sleepycat.db.LockMode-">next</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nextDup--">nextDup</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the next value with the same key (duplicate) and
returns it, or returns null if no more values are present for the key at
the current position.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nextDup-com.sleepycat.db.LockMode-">nextDup</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the next value with the same key (duplicate) and
returns it, or returns null if no more values are present for the key at
the current position.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nextNoDup--">nextNoDup</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the next value with a different key and returns it,
or returns null if there are no more unique keys in the cursor range.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#nextNoDup-com.sleepycat.db.LockMode-">nextNoDup</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the next value with a different key and returns it,
or returns null if there are no more unique keys in the cursor range.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prev--">prev</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the previous value and returns it, or returns null
if there are no preceding values in the cursor range.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prev-com.sleepycat.db.LockMode-">prev</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the previous value and returns it, or returns null
if there are no preceding values in the cursor range.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prevDup--">prevDup</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the previous value with the same key (duplicate) and
returns it, or returns null if no preceding values are present for the
key at the current position.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prevDup-com.sleepycat.db.LockMode-">prevDup</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the previous value with the same key (duplicate) and
returns it, or returns null if no preceding values are present for the
key at the current position.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prevNoDup--">prevNoDup</a></span>()</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the preceding value with a different key and returns
it, or returns null if there are no preceding unique keys in the cursor
range.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#prevNoDup-com.sleepycat.db.LockMode-">prevNoDup</a></span>&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code></th>
<td class="colLast">
<div class="block">Moves the cursor to the preceding value with a different key and returns
it, or returns null if there are no preceding unique keys in the cursor
range.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#update-V-">update</a></span>&#8203;(<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;entity)</code></th>
<td class="colLast">
<div class="block">Replaces the entity at the cursor position with the given entity.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.lang.Iterable</h3>
<code>forEach, spliterator</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="first--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>first</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;first()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the first value and returns it, or returns null if
the cursor range is empty.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the first value, or null if the cursor range is empty.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="first-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>first</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;first&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the first value and returns it, or returns null if
the cursor range is empty.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the first value, or null if the cursor range is empty.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="last--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>last</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;last()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the last value and returns it, or returns null if
the cursor range is empty.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the last value, or null if the cursor range is empty.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="last-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>last</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;last&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the last value and returns it, or returns null if
the cursor range is empty.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the last value, or null if the cursor range is empty.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="next--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>next</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;next()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range. If the cursor is
uninitialized, this method is equivalent to <a href="#first--"><code>first()</code></a>.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="ForwardCursor.html#next--">next</a></code>&nbsp;in interface&nbsp;<code><a href="ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</a>&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next value, or null if there are no more values in the
cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="next-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>next</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;next&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the next value and returns it, or returns null
if there are no more values in the cursor range. If the cursor is
uninitialized, this method is equivalent to <a href="#first--"><code>first()</code></a>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="ForwardCursor.html#next-com.sleepycat.db.LockMode-">next</a></code>&nbsp;in interface&nbsp;<code><a href="ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</a>&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next value, or null if there are no more values in the
cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="nextDup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;nextDup()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the next value with the same key (duplicate) and
returns it, or returns null if no more values are present for the key at
the current position.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next value with the same key, or null if no more values are
present for the key at the current position.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="nextDup-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;nextDup&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the next value with the same key (duplicate) and
returns it, or returns null if no more values are present for the key at
the current position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next value with the same key, or null if no more values are
present for the key at the current position.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="nextNoDup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextNoDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;nextNoDup()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the next value with a different key and returns it,
or returns null if there are no more unique keys in the cursor range.
If the cursor is uninitialized, this method is equivalent to <a href="#first--"><code>first()</code></a>.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next value with a different key, or null if there are no
more unique keys in the cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="nextNoDup-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextNoDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;nextNoDup&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the next value with a different key and returns it,
or returns null if there are no more unique keys in the cursor range.
If the cursor is uninitialized, this method is equivalent to <a href="#first--"><code>first()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the next value with a different key, or null if there are no
more unique keys in the cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="prev--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prev</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;prev()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the previous value and returns it, or returns null
if there are no preceding values in the cursor range. If the cursor is
uninitialized, this method is equivalent to <a href="#last--"><code>last()</code></a>.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous value, or null if there are no preceding values in
the cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="prev-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prev</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;prev&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the previous value and returns it, or returns null
if there are no preceding values in the cursor range. If the cursor is
uninitialized, this method is equivalent to <a href="#last--"><code>last()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous value, or null if there are no preceding values in
the cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="prevDup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prevDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;prevDup()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the previous value with the same key (duplicate) and
returns it, or returns null if no preceding values are present for the
key at the current position.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous value with the same key, or null if no preceding
values are present for the key at the current position.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="prevDup-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prevDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;prevDup&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the previous value with the same key (duplicate) and
returns it, or returns null if no preceding values are present for the
key at the current position.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous value with the same key, or null if no preceding
values are present for the key at the current position.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="prevNoDup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prevNoDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;prevNoDup()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the preceding value with a different key and returns
it, or returns null if there are no preceding unique keys in the cursor
range. If the cursor is uninitialized, this method is equivalent to
<a href="#last--"><code>last()</code></a>.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous value with a different key, or null if there are no
preceding unique keys in the cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="prevNoDup-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>prevNoDup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;prevNoDup&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Moves the cursor to the preceding value with a different key and returns
it, or returns null if there are no preceding unique keys in the cursor
range. If the cursor is uninitialized, this method is equivalent to
<a href="#last--"><code>last()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the previous value with a different key, or null if there are no
preceding unique keys in the cursor range.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="current--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>current</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;current()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Returns the value at the cursor position, or null if the value at the
cursor position has been deleted.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value at the cursor position, or null if it has been
deleted.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="current-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>current</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;current&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Returns the value at the cursor position, or null if the value at the
cursor position has been deleted.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the value at the cursor position, or null if it has been
deleted.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="count--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>count</h4>
<pre class="methodSignature">int&nbsp;count()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Returns the number of values (duplicates) for the key at the cursor
position, or returns zero if all values for the key have been deleted.
Returns one or zero if the underlying index has unique keys.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of duplicates, or zero if all values for the current
key have been deleted.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="iterator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre class="methodSignature">java.util.Iterator&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;&nbsp;iterator()</pre>
<div class="block">Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized.
<p><a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="ForwardCursor.html#iterator--">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</a>&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>iterator</code>&nbsp;in interface&nbsp;<code>java.lang.Iterable&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the iterator.</dd>
</dl>
</li>
</ul>
<a name="iterator-com.sleepycat.db.LockMode-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre class="methodSignature">java.util.Iterator&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;&nbsp;iterator&#8203;(<a href="../db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</pre>
<div class="block">Returns an iterator over the key range, starting with the value
following the current position or at the first value if the cursor is
uninitialized.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="ForwardCursor.html#iterator-com.sleepycat.db.LockMode-">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</a>&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>lockMode</code> - the lock mode to use for all operations performed
using the iterator, or null to use <a href="../db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the iterator.</dd>
</dl>
</li>
</ul>
<a name="update-java.lang.Object-">
<!-- -->
</a><a name="update-V-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>update</h4>
<pre class="methodSignature">boolean&nbsp;update&#8203;(<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&nbsp;entity)
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Replaces the entity at the cursor position with the given entity.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>entity</code> - the entity to replace the entity at the current position.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if successful or false if the entity at the current
position was previously deleted.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code>java.lang.UnsupportedOperationException</code> - if the index is read only or if
the value type is not an entity type.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="delete--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre class="methodSignature">boolean&nbsp;delete()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Deletes the entity at the cursor position.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if successful or false if the entity at the current
position has been deleted.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.IllegalStateException</code> - if the cursor is uninitialized.</dd>
<dd><code>java.lang.UnsupportedOperationException</code> - if the index is read only.</dd>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="dup--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dup</h4>
<pre class="methodSignature"><a href="EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;&nbsp;dup()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Duplicates the cursor at the cursor position. The returned cursor will
be initially positioned at the same position as this current cursor, and
will inherit this cursor's <a href="../db/Transaction.html" title="class in com.sleepycat.db"><code>Transaction</code></a> and <a href="../db/CursorConfig.html" title="class in com.sleepycat.db"><code>CursorConfig</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the duplicated cursor.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">void&nbsp;close()
throws <a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block">Closes the cursor.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="ForwardCursor.html#close--">close</a></code>&nbsp;in interface&nbsp;<code><a href="ForwardCursor.html" title="interface in com.sleepycat.persist">ForwardCursor</a>&lt;<a href="EntityCursor.html" title="type parameter in EntityCursor">V</a>&gt;</code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EntityCursor.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><b>Berkeley DB</b><br><font size="-1"> version 18.1.40</font></div>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size=1>Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.</font></small></p>
</body>
</html>