mirror of
https://github.com/berkeleydb/je.git
synced 2024-11-15 01:46:24 +00:00
1785 lines
108 KiB
HTML
1785 lines
108 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 (1.8.0_151) on Tue Oct 31 17:36:46 EDT 2017 -->
|
|
<title>PrimaryIndex (Oracle - Berkeley DB Java Edition API)</title>
|
|
<meta name="date" content="2017-10-31">
|
|
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
|
|
<script type="text/javascript" src="../../../script.js"></script>
|
|
</head>
|
|
<body>
|
|
<script type="text/javascript"><!--
|
|
try {
|
|
if (location.href.indexOf('is-external=true') == -1) {
|
|
parent.document.title="PrimaryIndex (Oracle - Berkeley DB Java Edition API)";
|
|
}
|
|
}
|
|
catch(err) {
|
|
}
|
|
//-->
|
|
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10};
|
|
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
|
|
var altColor = "altColor";
|
|
var rowColor = "rowColor";
|
|
var tableTab = "tableTab";
|
|
var activeTableTab = "activeTableTab";
|
|
</script>
|
|
<noscript>
|
|
<div>JavaScript is disabled on your browser.</div>
|
|
</noscript>
|
|
<!-- ========= 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="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/PrimaryIndex.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 Java Edition</b><br><font size=\"-1\"> version 7.5.11</font>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/sleepycat/persist/IndexNotAvailableException.html" title="class in com.sleepycat.persist"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?com/sleepycat/persist/PrimaryIndex.html" target="_top">Frames</a></li>
|
|
<li><a href="PrimaryIndex.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_top">
|
|
<li><a href="../../../allclasses-noframe.html">All Classes</a></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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </li>
|
|
<li><a href="#method.detail">Method</a></li>
|
|
</ul>
|
|
</div>
|
|
<a name="skip.navbar.top">
|
|
<!-- -->
|
|
</a></div>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<div class="header">
|
|
<div class="subTitle">com.sleepycat.persist</div>
|
|
<h2 title="Class PrimaryIndex" class="title">Class PrimaryIndex<PK,E></h2>
|
|
</div>
|
|
<div class="contentContainer">
|
|
<ul class="inheritance">
|
|
<li>java.lang.Object</li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>com.sleepycat.persist.PrimaryIndex<PK,E></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>All Implemented Interfaces:</dt>
|
|
<dd><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><PK,E></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public class <span class="typeNameLabel">PrimaryIndex<PK,E></span>
|
|
extends java.lang.Object</pre>
|
|
<div class="block">The primary index for an entity class and its primary key.
|
|
|
|
<p><code>PrimaryIndex</code> objects are thread-safe. Multiple threads may
|
|
safely call the methods of a shared <code>PrimaryIndex</code> object.</p>
|
|
|
|
<p><code>PrimaryIndex</code> implements <a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><code>EntityIndex</code></a> to map the primary
|
|
key type (PK) to the entity type (E).</p>
|
|
|
|
<p>The <a href="../../../com/sleepycat/persist/model/Entity.html" title="annotation in com.sleepycat.persist.model"><code>Entity</code></a> annotation may be used to define an entity class and
|
|
the <a href="../../../com/sleepycat/persist/model/PrimaryKey.html" title="annotation in com.sleepycat.persist.model"><code>PrimaryKey</code></a> annotation may be used to define a primary key as
|
|
shown in the following example.</p>
|
|
|
|
<pre class="code">
|
|
@Entity
|
|
class Employee {
|
|
|
|
@PrimaryKey
|
|
long id;
|
|
|
|
String name;
|
|
|
|
Employee(long id, String name) {
|
|
this.id = id;
|
|
this.name = name;
|
|
}
|
|
|
|
private Employee() {} // For bindings
|
|
}</pre>
|
|
|
|
<p>To obtain the <code>PrimaryIndex</code> for a given entity class, call <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex-java.lang.Class-java.lang.Class-"><code>EntityStore.getPrimaryIndex</code></a>, passing the
|
|
primary key class and the entity class. For example:</p>
|
|
|
|
<pre class="code">
|
|
EntityStore store = new EntityStore(...);
|
|
|
|
<code>PrimaryIndex<Long, Employee></code> primaryIndex =
|
|
store.getPrimaryIndex(Long.class, Employee.class);</pre>
|
|
|
|
<p>Note that <code>Long.class</code> is passed as the primary key class, but the
|
|
primary key field has the primitive type <code>long</code>. When a primitive
|
|
primary key field is used, the corresponding primitive wrapper class is used
|
|
to access the primary index. For more information on key field types, see
|
|
<a href="../../../com/sleepycat/persist/model/PrimaryKey.html" title="annotation in com.sleepycat.persist.model"><code>PrimaryKey</code></a>.</p>
|
|
|
|
<p>The <code>PrimaryIndex</code> provides the primary storage and access methods
|
|
for the instances of a particular entity class. Entities are inserted and
|
|
updated in the <code>PrimaryIndex</code> by calling a method in the family of
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-"><code>put(E)</code></a> methods. The <a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-"><code>put(E)</code></a> method will insert the entity if no
|
|
entity with the same primary key already exists. If an entity with the same
|
|
primary key does exist, it will update the entity and return the existing
|
|
(old) entity. For example:</p>
|
|
|
|
<pre class="code">
|
|
Employee oldEntity;
|
|
oldEntity = primaryIndex.put(new Employee(1, "Jane Smith")); // Inserts an entity
|
|
assert oldEntity == null;
|
|
oldEntity = primaryIndex.put(new Employee(2, "Joan Smith")); // Inserts an entity
|
|
assert oldEntity == null;
|
|
oldEntity = primaryIndex.put(new Employee(2, "Joan M. Smith")); // Updates an entity
|
|
assert oldEntity != null;</pre>
|
|
|
|
<p>The <a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoReturn-E-"><code>putNoReturn(E)</code></a> method can be used to avoid the overhead of
|
|
returning the existing entity, when the existing entity is not important to
|
|
the application. The return type of <a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoReturn-E-"><code>putNoReturn(E)</code></a> is void. For
|
|
example:</p>
|
|
|
|
<pre class="code">
|
|
primaryIndex.putNoReturn(new Employee(1, "Jane Smith")); // Inserts an entity
|
|
primaryIndex.putNoReturn(new Employee(2, "Joan Smith")); // Inserts an entity
|
|
primaryIndex.putNoReturn(new Employee(2, "Joan M. Smith")); // Updates an entity</pre>
|
|
|
|
<p>The <a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoOverwrite-E-"><code>putNoOverwrite(E)</code></a> method can be used to ensure that an existing
|
|
entity is not overwritten. <a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoOverwrite-E-"><code>putNoOverwrite(E)</code></a> returns true if the
|
|
entity was inserted, or false if an existing entity exists and no action was
|
|
taken. For example:</p>
|
|
|
|
<pre class="code">
|
|
boolean inserted;
|
|
inserted = primaryIndex.putNoOverwrite(new Employee(1, "Jane Smith")); // Inserts an entity
|
|
assert inserted;
|
|
inserted = primaryIndex.putNoOverwrite(new Employee(2, "Joan Smith")); // Inserts an entity
|
|
assert inserted;
|
|
inserted = primaryIndex.putNoOverwrite(new Employee(2, "Joan M. Smith")); // <strong>No action was taken!</strong>
|
|
assert !inserted;</pre>
|
|
|
|
<p>Primary key values must be unique, in other words, each instance of a
|
|
given entity class must have a distinct primary key value. Rather than
|
|
assigning the unique primary key values yourself, a <em>sequence</em> can be
|
|
used to assign sequential integer values automatically, starting with the
|
|
value 1 (one). A sequence is defined using the <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a>
|
|
annotation property. For example:</p>
|
|
|
|
<pre class="code">
|
|
@Entity
|
|
class Employee {
|
|
|
|
@PrimaryKey(sequence="ID")
|
|
long id;
|
|
|
|
String name;
|
|
|
|
Employee(String name) {
|
|
this.name = name;
|
|
}
|
|
|
|
private Employee() {} // For bindings
|
|
}</pre>
|
|
|
|
<p>The name of the sequence used above is "ID". Any name can be used. If
|
|
the same sequence name is used in more than one entity class, the sequence
|
|
will be shared by those classes, in other words, a single sequence of
|
|
integers will be used for all instances of those classes. See <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> for more information.</p>
|
|
|
|
<p>Any method in the family of <a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-"><code>put(E)</code></a> methods may be used to insert
|
|
entities where the primary key is assigned from a sequence. When the <a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-"><code>put(E)</code></a> method returns, the primary key field of the entity object will be set
|
|
to the assigned key value. For example:</p>
|
|
|
|
<pre class="code">
|
|
Employee employee;
|
|
employee = new Employee("Jane Smith");
|
|
primaryIndex.putNoReturn(employee); // Inserts an entity
|
|
assert employee.id == 1;
|
|
employee = new Employee("Joan Smith");
|
|
primaryIndex.putNoReturn(employee); // Inserts an entity
|
|
assert employee.id == 2;</pre>
|
|
|
|
<p>This begs the question: How do you update an existing entity, without
|
|
assigning a new primary key? The answer is that the <a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-"><code>put(E)</code></a> methods
|
|
will only assign a new key from the sequence if the primary key field is
|
|
zero or null (for reference types). If an entity with a non-zero and
|
|
non-null key field is passed to a <a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-"><code>put(E)</code></a> method, any existing entity
|
|
with that primary key value will be updated. For example:</p>
|
|
|
|
<pre class="code">
|
|
Employee employee;
|
|
employee = new Employee("Jane Smith");
|
|
primaryIndex.putNoReturn(employee); // Inserts an entity
|
|
assert employee.id == 1;
|
|
employee = new Employee("Joan Smith");
|
|
primaryIndex.putNoReturn(employee); // Inserts an entity
|
|
assert employee.id == 2;
|
|
employee.name = "Joan M. Smith";
|
|
primaryIndex.putNoReturn(employee); // Updates an existing entity
|
|
assert employee.id == 2;</pre>
|
|
|
|
<p>Since <code>PrimaryIndex</code> implements the <a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><code>EntityIndex</code></a> interface,
|
|
it shares the common index methods for retrieving and deleting entities,
|
|
opening cursors and using transactions. See <a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist"><code>EntityIndex</code></a> for more
|
|
information on these topics.</p>
|
|
|
|
<p>Note that when using an index, keys and values are stored and retrieved
|
|
by value not by reference. In other words, if an entity object is stored
|
|
and then retrieved, or retrieved twice, each object will be a separate
|
|
instance. For example, in the code below the assertion will always
|
|
fail.</p>
|
|
<pre class="code">
|
|
MyKey key = ...;
|
|
MyEntity entity1 = new MyEntity(key, ...);
|
|
index.put(entity1);
|
|
MyEntity entity2 = index.get(key);
|
|
assert entity1 == entity2; // always fails!
|
|
</pre></div>
|
|
<dl>
|
|
<dt><span class="simpleTagLabel">Author:</span></dt>
|
|
<dd>Mark Hayes</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
|
|
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
|
|
<tr>
|
|
<th class="colOne" scope="col">Constructor and Description</th>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colOne"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#PrimaryIndex-com.sleepycat.je.Database-java.lang.Class-com.sleepycat.bind.EntryBinding-java.lang.Class-com.sleepycat.bind.EntityBinding-">PrimaryIndex</a></span>(<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a> database,
|
|
java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>> keyClass,
|
|
<a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>> keyBinding,
|
|
java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> entityClass,
|
|
<a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> entityBinding)</code>
|
|
<div class="block">Creates a primary index without using an <code>EntityStore</code>.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</li>
|
|
</ul>
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.summary">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Summary</h3>
|
|
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
|
|
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
|
|
<tr>
|
|
<th class="colFirst" scope="col">Modifier and Type</th>
|
|
<th class="colLast" scope="col">Method and Description</th>
|
|
</tr>
|
|
<tr id="i0" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#contains-K-">contains</a></span>(K key)</code>
|
|
<div class="block">Checks for existence of a key in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i1" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#contains-com.sleepycat.je.Transaction-K-com.sleepycat.je.LockMode-">contains</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K key,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</code>
|
|
<div class="block">Checks for existence of a key in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i2" class="altColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#count--">count</a></span>()</code>
|
|
<div class="block">Returns a non-transactional count of the entities in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i3" class="rowColor">
|
|
<td class="colFirst"><code>long</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#count-long-">count</a></span>(long memoryLimit)</code>
|
|
<div class="block">Returns a non-transactional count of the entities in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i4" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#delete-K-">delete</a></span>(K key)</code>
|
|
<div class="block">Deletes all entities with a given index key.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i5" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#delete-com.sleepycat.je.Transaction-K-">delete</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K key)</code>
|
|
<div class="block">Deletes all entities with a given index key.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i6" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#delete-com.sleepycat.je.Transaction-K-com.sleepycat.je.WriteOptions-">delete</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K key,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)</code>
|
|
<div class="block">Deletes all entities with a given index key, using a WriteOptions
|
|
parameter and returning an OperationResult.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i7" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities--">entities</a></span>()</code>
|
|
<div class="block">Opens a cursor for traversing all entities in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i8" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities-K-boolean-K-boolean-">entities</a></span>(K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive)</code>
|
|
<div class="block">Opens a cursor for traversing entities in a key range.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i9" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">entities</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)</code>
|
|
<div class="block">Opens a cursor for traversing all entities in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i10" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">entities</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)</code>
|
|
<div class="block">Opens a cursor for traversing entities in a key range.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i11" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#get-PK-">get</a></span>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a> key)</code>
|
|
<div class="block">Gets an entity via a key of this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i12" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityResult.html" title="class in com.sleepycat.persist">EntityResult</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#get-com.sleepycat.je.Transaction-PK-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">get</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a> key,
|
|
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a> getType,
|
|
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a> options)</code>
|
|
<div class="block">Gets an entity via a key of this index, using Get type and ReadOptions
|
|
parameters, and returning an EntityResult.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i13" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#get-com.sleepycat.je.Transaction-PK-com.sleepycat.je.LockMode-">get</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a> key,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)</code>
|
|
<div class="block">Gets an entity via a key of this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i14" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getDatabase--">getDatabase</a></span>()</code>
|
|
<div class="block">Returns the underlying database for this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i15" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getEntityBinding--">getEntityBinding</a></span>()</code>
|
|
<div class="block">Returns the entity binding for this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i16" class="altColor">
|
|
<td class="colFirst"><code>java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getEntityClass--">getEntityClass</a></span>()</code>
|
|
<div class="block">Returns the entity class for this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i17" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getKeyBinding--">getKeyBinding</a></span>()</code>
|
|
<div class="block">Returns the primary key binding for this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i18" class="altColor">
|
|
<td class="colFirst"><code>java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getKeyClass--">getKeyClass</a></span>()</code>
|
|
<div class="block">Returns the primary key class for this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i19" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys--">keys</a></span>()</code>
|
|
<div class="block">Opens a cursor for traversing all keys in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i20" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys-K-boolean-K-boolean-">keys</a></span>(K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive)</code>
|
|
<div class="block">Opens a cursor for traversing keys in a key range.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i21" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">keys</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)</code>
|
|
<div class="block">Opens a cursor for traversing all keys in this index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i22" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">keys</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)</code>
|
|
<div class="block">Opens a cursor for traversing keys in a key range.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i23" class="rowColor">
|
|
<td class="colFirst"><code>java.util.Map<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>,<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#map--">map</a></span>()</code>
|
|
<div class="block">Returns a standard Java map based on this entity index.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i24" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-">put</a></span>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)</code>
|
|
<div class="block">Inserts an entity and returns null, or updates it if the primary key
|
|
already exists and returns the existing entity.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i25" class="rowColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-com.sleepycat.je.Transaction-E-">put</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)</code>
|
|
<div class="block">Inserts an entity and returns null, or updates it if the primary key
|
|
already exists and returns the existing entity.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i26" class="altColor">
|
|
<td class="colFirst"><code><a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-com.sleepycat.je.Transaction-E-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-">put</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity,
|
|
<a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je">Put</a> putType,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)</code>
|
|
<div class="block">Inserts or updates an entity, using Put type and WriteOptions
|
|
parameters, and returning an OperationResult.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i27" class="rowColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoOverwrite-E-">putNoOverwrite</a></span>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)</code>
|
|
<div class="block">Inserts an entity and returns true, or returns false if the primary key
|
|
already exists.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i28" class="altColor">
|
|
<td class="colFirst"><code>boolean</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoOverwrite-com.sleepycat.je.Transaction-E-">putNoOverwrite</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)</code>
|
|
<div class="block">Inserts an entity and returns true, or returns false if the primary key
|
|
already exists.</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i29" class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoReturn-E-">putNoReturn</a></span>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)</code>
|
|
<div class="block">Inserts an entity, or updates it if the primary key already exists (does
|
|
not return the existing entity).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i30" class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoReturn-com.sleepycat.je.Transaction-E-">putNoReturn</a></span>(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)</code>
|
|
<div class="block">Inserts an entity, or updates it if the primary key already exists (does
|
|
not return the existing entity).</div>
|
|
</td>
|
|
</tr>
|
|
<tr id="i31" class="rowColor">
|
|
<td class="colFirst"><code>java.util.SortedMap<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>,<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>></code></td>
|
|
<td class="colLast"><code><span class="memberNameLink"><a href="../../../com/sleepycat/persist/PrimaryIndex.html#sortedMap--">sortedMap</a></span>()</code>
|
|
<div class="block">Returns a standard Java sorted map based on this entity index.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class java.lang.Object</h3>
|
|
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="details">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="constructor.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Constructor Detail</h3>
|
|
<a name="PrimaryIndex-com.sleepycat.je.Database-java.lang.Class-com.sleepycat.bind.EntryBinding-java.lang.Class-com.sleepycat.bind.EntityBinding-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>PrimaryIndex</h4>
|
|
<pre>public PrimaryIndex(<a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a> database,
|
|
java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>> keyClass,
|
|
<a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>> keyBinding,
|
|
java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> entityClass,
|
|
<a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> entityBinding)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block">Creates a primary index without using an <code>EntityStore</code>.
|
|
|
|
<p>This constructor is not normally needed and is provided for
|
|
applications that wish to use custom bindings along with the Direct
|
|
Persistence Layer. Normally, <a href="../../../com/sleepycat/persist/EntityStore.html#getPrimaryIndex-java.lang.Class-java.lang.Class-"><code>getPrimaryIndex</code></a> is used instead.</p>
|
|
|
|
<p>Note that when this constructor is used directly, primary keys cannot
|
|
be automatically assigned from a sequence. The key assignment feature
|
|
requires knowledge of the primary key field, which is only available if
|
|
an <code>EntityStore</code> is used. Of course, primary keys may be
|
|
assigned from a sequence manually before calling the <code>put</code>
|
|
methods in this class.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>database</code> - the primary database.</dd>
|
|
<dd><code>keyClass</code> - the class of the primary key.</dd>
|
|
<dd><code>keyBinding</code> - the binding to be used for primary keys.</dd>
|
|
<dd><code>entityClass</code> - the class of the entities stored in this index.</dd>
|
|
<dd><code>entityBinding</code> - the binding to be used for entities.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method.detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="getKeyClass--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getKeyClass</h4>
|
|
<pre>public java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>> getKeyClass()</pre>
|
|
<div class="block">Returns the primary key class for this index.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the key class.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getKeyBinding--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getKeyBinding</h4>
|
|
<pre>public <a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>> getKeyBinding()</pre>
|
|
<div class="block">Returns the primary key binding for this index.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the key binding.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getEntityClass--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getEntityClass</h4>
|
|
<pre>public java.lang.Class<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> getEntityClass()</pre>
|
|
<div class="block">Returns the entity class for this index.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the entity class.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getEntityBinding--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getEntityBinding</h4>
|
|
<pre>public <a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> getEntityBinding()</pre>
|
|
<div class="block">Returns the entity binding for this index.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the entity binding.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="put-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="put-E-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>put</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> put(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block">Inserts an entity and returns null, or updates it if the primary key
|
|
already exists and returns the existing entity.
|
|
|
|
<p>If a <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> is used and the primary key field of
|
|
the given entity is null or zero, this method will assign the next value
|
|
from the sequence to the primary key field of the given entity.</p>
|
|
|
|
<p>Auto-commit is used implicitly if the store is transactional.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>entity</code> - the entity to be inserted or updated.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the existing entity that was updated, or null if the entity was
|
|
inserted.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="put-com.sleepycat.je.Transaction-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="put-com.sleepycat.je.Transaction-E-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>put</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> put(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block">Inserts an entity and returns null, or updates it if the primary key
|
|
already exists and returns the existing entity.
|
|
|
|
<p>If a <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> is used and the primary key field of
|
|
the given entity is null or zero, this method will assign the next value
|
|
from the sequence to the primary key field of the given entity.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, null to use
|
|
auto-commit, or null if the store is non-transactional.</dd>
|
|
<dd><code>entity</code> - the entity to be inserted or updated.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the existing entity that was updated, or null if the entity was
|
|
inserted.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="putNoReturn-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="putNoReturn-E-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>putNoReturn</h4>
|
|
<pre>public void putNoReturn(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block">Inserts an entity, or updates it if the primary key already exists (does
|
|
not return the existing entity). This method may be used instead of
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-E-"><code>put(Object)</code></a> to save the overhead of returning the existing
|
|
entity.
|
|
|
|
<p>If a <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> is used and the primary key field of
|
|
the given entity is null or zero, this method will assign the next value
|
|
from the sequence to the primary key field of the given entity.</p>
|
|
|
|
<p>Auto-commit is used implicitly if the store is transactional.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>entity</code> - the entity to be inserted or updated.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="putNoReturn-com.sleepycat.je.Transaction-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="putNoReturn-com.sleepycat.je.Transaction-E-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>putNoReturn</h4>
|
|
<pre>public void putNoReturn(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block">Inserts an entity, or updates it if the primary key already exists (does
|
|
not return the existing entity). This method may be used instead of
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html#put-com.sleepycat.je.Transaction-E-"><code>put(Transaction,Object)</code></a> to save the overhead of returning the
|
|
existing entity.
|
|
|
|
<p>If a <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> is used and the primary key field of
|
|
the given entity is null or zero, this method will assign the next value
|
|
from the sequence to the primary key field of the given entity.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, null to use
|
|
auto-commit, or null if the store is non-transactional.</dd>
|
|
<dd><code>entity</code> - the entity to be inserted or updated.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="putNoOverwrite-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="putNoOverwrite-E-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>putNoOverwrite</h4>
|
|
<pre>public boolean putNoOverwrite(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block">Inserts an entity and returns true, or returns false if the primary key
|
|
already exists.
|
|
|
|
<p>If a <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> is used and the primary key field of
|
|
the given entity is null or zero, this method will assign the next value
|
|
from the sequence to the primary key field of the given entity.</p>
|
|
|
|
<p>Auto-commit is used implicitly if the store is transactional.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>entity</code> - the entity to be inserted.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the entity was inserted, or false if an entity with the
|
|
same primary key is already present.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="putNoOverwrite-com.sleepycat.je.Transaction-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="putNoOverwrite-com.sleepycat.je.Transaction-E-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>putNoOverwrite</h4>
|
|
<pre>public boolean putNoOverwrite(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block">Inserts an entity and returns true, or returns false if the primary key
|
|
already exists.
|
|
|
|
<p>If a <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> is used and the primary key field of
|
|
the given entity is null or zero, this method will assign the next value
|
|
from the sequence to the primary key field of the given entity.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, null to use
|
|
auto-commit, or null if the store is non-transactional.</dd>
|
|
<dd><code>entity</code> - the entity to be inserted.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>true if the entity was inserted, or false if an entity with the
|
|
same primary key is already present.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="put-com.sleepycat.je.Transaction-java.lang.Object-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-">
|
|
<!-- -->
|
|
</a><a name="put-com.sleepycat.je.Transaction-E-com.sleepycat.je.Put-com.sleepycat.je.WriteOptions-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>put</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a> put(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> entity,
|
|
<a href="../../../com/sleepycat/je/Put.html" title="enum in com.sleepycat.je">Put</a> putType,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)</pre>
|
|
<div class="block">Inserts or updates an entity, using Put type and WriteOptions
|
|
parameters, and returning an OperationResult.
|
|
|
|
<p>If a <a href="../../../com/sleepycat/persist/model/PrimaryKey.html#sequence--"><code>PrimaryKey.sequence()</code></a> is used and the primary key field of
|
|
the given entity is null or zero, this method will assign the next value
|
|
from the sequence to the primary key field of the given entity.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, null to use
|
|
auto-commit, or null if the store is non-transactional.</dd>
|
|
<dd><code>entity</code> - the entity to be inserted.</dd>
|
|
<dd><code>putType</code> - is <a href="../../../com/sleepycat/je/Put.html#OVERWRITE"><code>Put.OVERWRITE</code></a> or <a href="../../../com/sleepycat/je/Put.html#NO_OVERWRITE"><code>Put.NO_OVERWRITE</code></a>.</dd>
|
|
<dd><code>options</code> - the WriteOptions, or null to use default options.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the OperationResult if the record is written, else null. If
|
|
<code>Put.NO_OVERWRITE</code> is used, null is returned if an entity with the
|
|
same primary key is already present. If <code>Put.OVERWRITE</code> is used,
|
|
null is never returned.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
<dt><span class="simpleTagLabel">Since:</span></dt>
|
|
<dd>7.0</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="get-PK-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> get(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a> key)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#get-K-">EntityIndex</a></code></span></div>
|
|
<div class="block">Gets an entity via a key of this index.
|
|
|
|
<p>The operation will not be transaction protected, and <a href="../../../com/sleepycat/je/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the value mapped to the given key, or null if the key is not
|
|
present in the index.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-com.sleepycat.je.Transaction-java.lang.Object-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a><a name="get-com.sleepycat.je.Transaction-PK-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a> get(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a> key,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#get-com.sleepycat.je.Transaction-K-com.sleepycat.je.LockMode-">EntityIndex</a></code></span></div>
|
|
<div class="block">Gets an entity via a key of this index.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, or null
|
|
if the operation should not be transaction protected.</dd>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
|
|
use <a href="../../../com/sleepycat/je/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the value mapped to the given key, or null if the key is not
|
|
present in the index.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="get-com.sleepycat.je.Transaction-java.lang.Object-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">
|
|
<!-- -->
|
|
</a><a name="get-com.sleepycat.je.Transaction-PK-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>get</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityResult.html" title="class in com.sleepycat.persist">EntityResult</a><<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> get(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a> key,
|
|
<a href="../../../com/sleepycat/je/Get.html" title="enum in com.sleepycat.je">Get</a> getType,
|
|
<a href="../../../com/sleepycat/je/ReadOptions.html" title="class in com.sleepycat.je">ReadOptions</a> options)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#get-com.sleepycat.je.Transaction-K-com.sleepycat.je.Get-com.sleepycat.je.ReadOptions-">EntityIndex</a></code></span></div>
|
|
<div class="block">Gets an entity via a key of this index, using Get type and ReadOptions
|
|
parameters, and returning an EntityResult.</div>
|
|
<dl>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, or null
|
|
if the operation should not be transaction protected.</dd>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dd><code>getType</code> - must be <a href="../../../com/sleepycat/je/Get.html#SEARCH"><code>Get.SEARCH</code></a>.</dd>
|
|
<dd><code>options</code> - the ReadOptions, or null to use default options.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the EntityResult, including the value mapped to the given key,
|
|
or null if the key is not present in the index.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="map--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>map</h4>
|
|
<pre>public java.util.Map<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>,<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> map()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#map--">EntityIndex</a></code></span></div>
|
|
<div class="block">Returns a standard Java map based on this entity index. The <a href="../../../com/sleepycat/collections/StoredMap.html" title="class in com.sleepycat.collections"><code>StoredMap</code></a> returned is defined by the <a href="../../../com/sleepycat/collections/package-summary.html">Collections API</a>. Stored collections conform
|
|
to the standard Java collections framework interface.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the map.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="sortedMap--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>sortedMap</h4>
|
|
<pre>public java.util.SortedMap<<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>,<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>> sortedMap()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#sortedMap--">EntityIndex</a></code></span></div>
|
|
<div class="block">Returns a standard Java sorted map based on this entity index. The
|
|
<a href="../../../com/sleepycat/collections/StoredSortedMap.html" title="class in com.sleepycat.collections"><code>StoredSortedMap</code></a> returned is defined by the <a href="../../../com/sleepycat/collections/package-summary.html">Collections API</a>. Stored collections conform
|
|
to the standard Java collections framework interface.</div>
|
|
<dl>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the map.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="getDatabase--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>getDatabase</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/Database.html" title="class in com.sleepycat.je">Database</a> getDatabase()</pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#getDatabase--">EntityIndex</a></code></span></div>
|
|
<div class="block">Returns the underlying database for this index.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#getDatabase--">getDatabase</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the database.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="contains-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="contains-K-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>contains</h4>
|
|
<pre>public boolean contains(K key)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains-K-">EntityIndex</a></code></span></div>
|
|
<div class="block">Checks for existence of a key in this index.
|
|
|
|
<p>The operation will not be transaction protected, and <a href="../../../com/sleepycat/je/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p>
|
|
|
|
<!-- begin JE only -->
|
|
<p><code>READ_UNCOMMITTED</code> can be used with this method to reduce I/O,
|
|
since the record data item will not be read. This is the same benefit
|
|
as described in <a href="#keyCursorReadUncommitted">Key Cursor
|
|
Optimization with READ_UNCOMMITTED</a></p>
|
|
<!-- end JE only --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains-K-">contains</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the key exists in the index.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="contains-com.sleepycat.je.Transaction-java.lang.Object-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a><a name="contains-com.sleepycat.je.Transaction-K-com.sleepycat.je.LockMode-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>contains</h4>
|
|
<pre>public boolean contains(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K key,
|
|
<a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je">LockMode</a> lockMode)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains-com.sleepycat.je.Transaction-K-com.sleepycat.je.LockMode-">EntityIndex</a></code></span></div>
|
|
<div class="block">Checks for existence of a key in this index.
|
|
|
|
<!-- begin JE only -->
|
|
<p><code>READ_UNCOMMITTED</code> can be used with this method to reduce I/O,
|
|
since the record data item will not be read. This is the same benefit
|
|
as described in <a href="#keyCursorReadUncommitted">Key Cursor
|
|
Optimization with READ_UNCOMMITTED</a></p>
|
|
<!-- end JE only --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains-com.sleepycat.je.Transaction-K-com.sleepycat.je.LockMode-">contains</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, or null
|
|
if the operation should not be transaction protected.</dd>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dd><code>lockMode</code> - the lock mode to use for this operation, or null to
|
|
use <a href="../../../com/sleepycat/je/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether the key exists in the index.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">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>public long count()
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#count--">EntityIndex</a></code></span></div>
|
|
<div class="block">Returns a non-transactional count of the entities in this index.
|
|
|
|
<!-- begin JE only -->
|
|
|
|
<p>This operation is faster than obtaining a count by scanning the index
|
|
manually, and will not perturb the current contents of the cache.
|
|
However, the count is not guaranteed to be accurate if there are
|
|
concurrent updates. Note that this method does scan a significant
|
|
portion of the index and should be considered a fairly expensive
|
|
operation.</p>
|
|
|
|
<p>This operation will disable deletion of log files by the JE log
|
|
cleaner during its execution and will consume a certain amount of
|
|
memory (but without affecting the memory that is available for the
|
|
JE cache). To avoid excessive memory consumption (and a potential
|
|
<code>OutOfMemoryError</code>) this method places an internal limit on
|
|
its memory consumption. If this limit is reached, the method will
|
|
still work properly, but its performance will degrade. To specify
|
|
a different memory limit than the one used by this method, use the
|
|
<a href="../../../com/sleepycat/persist/EntityIndex.html#count-long-"><code>EntityIndex.count(long memoryLimit)</code></a> method.</p>
|
|
|
|
<!-- end JE only --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#count--">count</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the number of entities in this index.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="count-long-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>count</h4>
|
|
<pre>public long count(long memoryLimit)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#count-long-">EntityIndex</a></code></span></div>
|
|
<div class="block">Returns a non-transactional count of the entities in this index.
|
|
|
|
<p>This operation is faster than obtaining a count by scanning the index
|
|
manually, and will not perturb the current contents of the cache.
|
|
However, the count is not guaranteed to be accurate if there are
|
|
concurrent updates. Note that this method does scan a significant
|
|
portion of the index and should be considered a fairly expensive
|
|
operation.</p>
|
|
|
|
<p>This operation will disable deletion of log files by the JE log
|
|
cleaner during its execution and will consume a certain amount of
|
|
memory (but without affecting the memory that is available for the
|
|
JE cache). To avoid excessive memory consumption (and a potential
|
|
<code>OutOfMemoryError</code>) this method takes as input an upper bound
|
|
on the memory it may consume. If this limit is reached, the method
|
|
will still work properly, but its performance will degrade.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#count-long-">count</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the number of entities in this index.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#readFailures">Read Operation
|
|
Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="delete-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="delete-K-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>delete</h4>
|
|
<pre>public boolean delete(K key)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete-K-">EntityIndex</a></code></span></div>
|
|
<div class="block">Deletes all entities with a given index key.
|
|
|
|
<p>Auto-commit is used implicitly if the store is transactional.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete-K-">delete</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether any entities were deleted.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="delete-com.sleepycat.je.Transaction-java.lang.Object-">
|
|
<!-- -->
|
|
</a><a name="delete-com.sleepycat.je.Transaction-K-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>delete</h4>
|
|
<pre>public boolean delete(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K key)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete-com.sleepycat.je.Transaction-K-">EntityIndex</a></code></span></div>
|
|
<div class="block">Deletes all entities with a given index key.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete-com.sleepycat.je.Transaction-K-">delete</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, null to use
|
|
auto-commit, or null if the store is non-transactional.</dd>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>whether any entities were deleted.
|
|
|
|
<!-- begin JE only --></dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.
|
|
<!-- end JE only --></dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="delete-com.sleepycat.je.Transaction-java.lang.Object-com.sleepycat.je.WriteOptions-">
|
|
<!-- -->
|
|
</a><a name="delete-com.sleepycat.je.Transaction-K-com.sleepycat.je.WriteOptions-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>delete</h4>
|
|
<pre>public <a href="../../../com/sleepycat/je/OperationResult.html" title="class in com.sleepycat.je">OperationResult</a> delete(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K key,
|
|
<a href="../../../com/sleepycat/je/WriteOptions.html" title="class in com.sleepycat.je">WriteOptions</a> options)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete-com.sleepycat.je.Transaction-K-com.sleepycat.je.WriteOptions-">EntityIndex</a></code></span></div>
|
|
<div class="block">Deletes all entities with a given index key, using a WriteOptions
|
|
parameter and returning an OperationResult.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete-com.sleepycat.je.Transaction-K-com.sleepycat.je.WriteOptions-">delete</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect this operation, null to use
|
|
auto-commit, or null if the store is non-transactional.</dd>
|
|
<dd><code>key</code> - the key to search for.</dd>
|
|
<dd><code>options</code> - the WriteOptions, or null to use default options.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the OperationResult if any entities were deleted, else null. If</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/OperationFailureException.html" title="class in com.sleepycat.je">OperationFailureException</a></code> - if one of the <a
|
|
href="../je/OperationFailureException.html#writeFailures">Write
|
|
Operation Failures</a> occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/EnvironmentFailureException.html" title="class in com.sleepycat.je">EnvironmentFailureException</a></code> - if an unexpected, internal or
|
|
environment-wide failure occurs.</dd>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="keys--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>keys</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K> keys()
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys--">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing all keys in this index.
|
|
|
|
<p>The operations performed with the cursor will not be transaction
|
|
protected, and <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a> is used implicitly. If the
|
|
store is transactional, the cursor may not be used to update or delete
|
|
entities.</p>
|
|
|
|
<!-- begin JE only -->
|
|
<p>Note that <code>READ_UNCOMMITTED</code> can be used with a key cursor to
|
|
reduce I/O, potentially providing significant performance benefits. See
|
|
<a href="#keyCursorReadUncommitted">Key Cursor Optimization with
|
|
READ_UNCOMMITTED</a></p>
|
|
<!-- end JE only --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys--">keys</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="keys-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>keys</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K> keys(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing all keys in this index.
|
|
|
|
<!-- begin JE only -->
|
|
<p>Note that <code>READ_UNCOMMITTED</code> can be used with a key cursor to
|
|
reduce I/O, potentially providing significant performance benefits. See
|
|
<a href="#keyCursorReadUncommitted">Key Cursor Optimization with
|
|
READ_UNCOMMITTED</a></p>
|
|
<!-- end JE only --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">keys</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect all operations performed with
|
|
the cursor, or null if the operations should not be transaction
|
|
protected. If the store is non-transactional, null must be specified.
|
|
For a transactional store the transaction is optional for read-only
|
|
access and required for read-write access.</dd>
|
|
<dd><code>config</code> - the cursor configuration that determines the default lock
|
|
mode used for all cursor operations, or null to implicitly use <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="entities--">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>entities</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E> entities()
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities--">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing all entities in this index.
|
|
|
|
<p>The operations performed with the cursor will not be transaction
|
|
protected, and <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a> is used implicitly. If the
|
|
store is transactional, the cursor may not be used to update or delete
|
|
entities.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities--">entities</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="entities-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>entities</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E> entities(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing all entities in this index.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities-com.sleepycat.je.Transaction-com.sleepycat.je.CursorConfig-">entities</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect all operations performed with
|
|
the cursor, or null if the operations should not be transaction
|
|
protected. If the store is non-transactional, null must be specified.
|
|
For a transactional store the transaction is optional for read-only
|
|
access and required for read-write access.</dd>
|
|
<dd><code>config</code> - the cursor configuration that determines the default lock
|
|
mode used for all cursor operations, or null to implicitly use <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="keys-java.lang.Object-boolean-java.lang.Object-boolean-">
|
|
<!-- -->
|
|
</a><a name="keys-K-boolean-K-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>keys</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K> keys(K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys-K-boolean-K-boolean-">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing keys in a key range.
|
|
|
|
<p>The operations performed with the cursor will not be transaction
|
|
protected, and <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a> is used implicitly. If the
|
|
store is transactional, the cursor may not be used to update or delete
|
|
entities.</p>
|
|
|
|
<!-- begin JE only -->
|
|
<p>Note that <code>READ_UNCOMMITTED</code> can be used with a key cursor to
|
|
reduce I/O, potentially providing significant performance benefits. See
|
|
<a href="#keyCursorReadUncommitted">Key Cursor Optimization with
|
|
READ_UNCOMMITTED</a></p>
|
|
<!-- end JE only --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys-K-boolean-K-boolean-">keys</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>fromKey</code> - is the lower bound of the key range, or null if the range
|
|
has no lower bound.</dd>
|
|
<dd><code>fromInclusive</code> - is true if keys greater than or equal to fromKey
|
|
should be included in the key range, or false if only keys greater than
|
|
fromKey should be included.</dd>
|
|
<dd><code>toKey</code> - is the upper bound of the key range, or null if the range
|
|
has no upper bound.</dd>
|
|
<dd><code>toInclusive</code> - is true if keys less than or equal to toKey should be
|
|
included in the key range, or false if only keys less than toKey should
|
|
be included.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="keys-com.sleepycat.je.Transaction-java.lang.Object-boolean-java.lang.Object-boolean-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a><a name="keys-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>keys</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><K> keys(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing keys in a key range.
|
|
|
|
<!-- begin JE only -->
|
|
<a name="keyCursorReadUncommitted"><h4>Key Cursor Optimization with
|
|
READ_UNCOMMITTED</h4></a>
|
|
|
|
<p>Using a key cursor potentially has a large performance benefit when
|
|
the <code>READ_UNCOMMITTED</code> isolation mode is used. In this case, if
|
|
the record data is not in the JE cache, it will not be read from disk.
|
|
The performance benefit is potentially large because random access disk
|
|
reads may be reduced. Examples are:</p>
|
|
<ul>
|
|
<li>Scanning all records in key order, when the entity is not needed and
|
|
<code>READ_UNCOMMITTED</code> isolation is acceptable.</li>
|
|
<li>Skipping over records quickly to perform approximate pagination with
|
|
<code>READ_UNCOMMITTED</code> isolation.</li>
|
|
</ul>
|
|
|
|
<p>For other isolation modes (<code>READ_COMMITTED</code>, <code>REPEATABLE_READ</code> and <code>SERIALIZABLE</code>), the performance benefit of a
|
|
key cursor is not as significant. In this case, the data item must be
|
|
read into the JE cache if it is not already present, in order to lock
|
|
the record. The only performance benefit is that the data will not be
|
|
copied from the JE cache to the application's entry parameter, and will
|
|
not be unmarshalled into an entity object.</p>
|
|
|
|
<p>For information on specifying isolation modes, see <a href="../../../com/sleepycat/je/LockMode.html" title="enum in com.sleepycat.je"><code>LockMode</code></a>,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je"><code>CursorConfig</code></a> and <a href="../../../com/sleepycat/je/TransactionConfig.html" title="class in com.sleepycat.je"><code>TransactionConfig</code></a>.</p>
|
|
<!-- end JE only --></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">keys</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect all operations performed with
|
|
the cursor, or null if the operations should not be transaction
|
|
protected. If the store is non-transactional, null must be specified.
|
|
For a transactional store the transaction is optional for read-only
|
|
access and required for read-write access.</dd>
|
|
<dd><code>fromKey</code> - is the lower bound of the key range, or null if the range
|
|
has no lower bound.</dd>
|
|
<dd><code>fromInclusive</code> - is true if keys greater than or equal to fromKey
|
|
should be included in the key range, or false if only keys greater than
|
|
fromKey should be included.</dd>
|
|
<dd><code>toKey</code> - is the upper bound of the key range, or null if the range
|
|
has no upper bound.</dd>
|
|
<dd><code>toInclusive</code> - is true if keys less than or equal to toKey should be
|
|
included in the key range, or false if only keys less than toKey should
|
|
be included.</dd>
|
|
<dd><code>config</code> - the cursor configuration that determines the default lock
|
|
mode used for all cursor operations, or null to implicitly use <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="entities-java.lang.Object-boolean-java.lang.Object-boolean-">
|
|
<!-- -->
|
|
</a><a name="entities-K-boolean-K-boolean-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>entities</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E> entities(K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities-K-boolean-K-boolean-">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing entities in a key range.
|
|
|
|
<p>The operations performed with the cursor will not be transaction
|
|
protected, and <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a> is used implicitly. If the
|
|
store is transactional, the cursor may not be used to update or delete
|
|
entities.</p></div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities-K-boolean-K-boolean-">entities</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>fromKey</code> - is the lower bound of the key range, or null if the range
|
|
has no lower bound.</dd>
|
|
<dd><code>fromInclusive</code> - is true if keys greater than or equal to fromKey
|
|
should be included in the key range, or false if only keys greater than
|
|
fromKey should be included.</dd>
|
|
<dd><code>toKey</code> - is the upper bound of the key range, or null if the range
|
|
has no upper bound.</dd>
|
|
<dd><code>toInclusive</code> - is true if keys less than or equal to toKey should be
|
|
included in the key range, or false if only keys less than toKey should
|
|
be included.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></code> - the base class for all BDB exceptions.</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<a name="entities-com.sleepycat.je.Transaction-java.lang.Object-boolean-java.lang.Object-boolean-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a><a name="entities-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>entities</h4>
|
|
<pre>public <a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a><E> entities(<a href="../../../com/sleepycat/je/Transaction.html" title="class in com.sleepycat.je">Transaction</a> txn,
|
|
K fromKey,
|
|
boolean fromInclusive,
|
|
K toKey,
|
|
boolean toInclusive,
|
|
<a href="../../../com/sleepycat/je/CursorConfig.html" title="class in com.sleepycat.je">CursorConfig</a> config)
|
|
throws <a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">DatabaseException</a></pre>
|
|
<div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">EntityIndex</a></code></span></div>
|
|
<div class="block">Opens a cursor for traversing entities in a key range.</div>
|
|
<dl>
|
|
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities-com.sleepycat.je.Transaction-K-boolean-K-boolean-com.sleepycat.je.CursorConfig-">entities</a></code> in interface <code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a><K,E></code></dd>
|
|
<dt><span class="paramLabel">Parameters:</span></dt>
|
|
<dd><code>txn</code> - the transaction used to protect all operations performed with
|
|
the cursor, or null if the operations should not be transaction
|
|
protected. If the store is non-transactional, null must be specified.
|
|
For a transactional store the transaction is optional for read-only
|
|
access and required for read-write access.</dd>
|
|
<dd><code>fromKey</code> - is the lower bound of the key range, or null if the range
|
|
has no lower bound.</dd>
|
|
<dd><code>fromInclusive</code> - is true if keys greater than or equal to fromKey
|
|
should be included in the key range, or false if only keys greater than
|
|
fromKey should be included.</dd>
|
|
<dd><code>toKey</code> - is the upper bound of the key range, or null if the range
|
|
has no upper bound.</dd>
|
|
<dd><code>toInclusive</code> - is true if keys less than or equal to toKey should be
|
|
included in the key range, or false if only keys less than toKey should
|
|
be included.</dd>
|
|
<dd><code>config</code> - the cursor configuration that determines the default lock
|
|
mode used for all cursor operations, or null to implicitly use <a href="../../../com/sleepycat/je/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
|
|
<dt><span class="returnLabel">Returns:</span></dt>
|
|
<dd>the cursor.</dd>
|
|
<dt><span class="throwsLabel">Throws:</span></dt>
|
|
<dd><code><a href="../../../com/sleepycat/je/DatabaseException.html" title="class in com.sleepycat.je">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="../../../overview-summary.html">Overview</a></li>
|
|
<li><a href="package-summary.html">Package</a></li>
|
|
<li class="navBarCell1Rev">Class</li>
|
|
<li><a href="class-use/PrimaryIndex.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 Java Edition</b><br><font size=\"-1\"> version 7.5.11</font>
|
|
</div>
|
|
</div>
|
|
<div class="subNav">
|
|
<ul class="navList">
|
|
<li><a href="../../../com/sleepycat/persist/IndexNotAvailableException.html" title="class in com.sleepycat.persist"><span class="typeNameLink">Prev Class</span></a></li>
|
|
<li><a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><span class="typeNameLink">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?com/sleepycat/persist/PrimaryIndex.html" target="_top">Frames</a></li>
|
|
<li><a href="PrimaryIndex.html" target="_top">No Frames</a></li>
|
|
</ul>
|
|
<ul class="navList" id="allclasses_navbar_bottom">
|
|
<li><a href="../../../allclasses-noframe.html">All 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>
|
|
</div>
|
|
<div>
|
|
<ul class="subNavList">
|
|
<li>Summary: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.summary">Constr</a> | </li>
|
|
<li><a href="#method.summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li><a href="#constructor.detail">Constr</a> | </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) 2002, 2017 Oracle and/or its affiliates. All rights reserved.</font> </small></p>
|
|
</body>
|
|
</html>
|