Sophie

Sophie

distrib > PLD > th > x86_64 > by-pkgid > 636b2a8b77acacd6717dd7e72eda4c1d > files > 585

db6.1-java-devel-6.1.29.0-1.x86_64.rpm

<!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 (version 1.7.0_75) on Fri May 13 13:32:18 PDT 2016 -->
<title>PrimaryIndex (Oracle - Berkeley DB Java API)</title>
<meta name="date" content="2016-05-13">
<link rel="stylesheet" type="text/css" href="../../../style.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="PrimaryIndex (Oracle - Berkeley DB Java API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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"><em><b>Berkeley DB</b><br><font size="-1"> version 6.1.29</font></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/persist/IndexNotAvailableException.html" title="class in com.sleepycat.persist"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><span class="strong">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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</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&lt;PK,E&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.sleepycat.persist.PrimaryIndex&lt;PK,E&gt;</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>&lt;PK,E&gt;</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">PrimaryIndex&lt;PK,E&gt;</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,%20java.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&lt;Long, Employee&gt;</code> primaryIndex =
     store.getPrimaryIndex(Long.class, Employee.class);</pre>
 </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>
</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#PrimaryIndex(com.sleepycat.db.Database,%20java.lang.Class,%20com.sleepycat.bind.EntryBinding,%20java.lang.Class,%20com.sleepycat.bind.EntityBinding)">PrimaryIndex</a></strong>(<a href="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</a>&nbsp;database,
            java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;&nbsp;keyClass,
            <a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;&nbsp;keyBinding,
            java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;&nbsp;entityClass,
            <a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;&nbsp;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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#contains(K)">contains</a></strong>(K&nbsp;key)</code>
<div class="block">Checks for existence of a key in this index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#contains(com.sleepycat.db.Transaction,%20K,%20com.sleepycat.db.LockMode)">contains</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
        K&nbsp;key,
        <a href="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Checks for existence of a key in this index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#count()">count</a></strong>()</code>
<div class="block">Returns a non-transactional count of the entities in this index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#delete(K)">delete</a></strong>(K&nbsp;key)</code>
<div class="block">Deletes all entities with a given index key.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#delete(com.sleepycat.db.Transaction,%20K)">delete</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
      K&nbsp;key)</code>
<div class="block">Deletes all entities with a given index key.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities()">entities</a></strong>()</code>
<div class="block">Opens a cursor for traversing all entities in this index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities(K,%20boolean,%20K,%20boolean)">entities</a></strong>(K&nbsp;fromKey,
        boolean&nbsp;fromInclusive,
        K&nbsp;toKey,
        boolean&nbsp;toInclusive)</code>
<div class="block">Opens a cursor for traversing entities in a key range.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities(com.sleepycat.db.Transaction,%20com.sleepycat.db.CursorConfig)">entities</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
        <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)</code>
<div class="block">Opens a cursor for traversing all entities in this index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#entities(com.sleepycat.db.Transaction,%20K,%20boolean,%20K,%20boolean,%20com.sleepycat.db.CursorConfig)">entities</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
        K&nbsp;fromKey,
        boolean&nbsp;fromInclusive,
        K&nbsp;toKey,
        boolean&nbsp;toInclusive,
        <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)</code>
<div class="block">Opens a cursor for traversing entities in a key range.</div>
</td>
</tr>
<tr 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><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#get(PK)">get</a></strong>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&nbsp;key)</code>
<div class="block">Gets an entity via a key of this index.</div>
</td>
</tr>
<tr 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><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#get(com.sleepycat.db.Transaction,%20PK,%20com.sleepycat.db.LockMode)">get</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
   <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&nbsp;key,
   <a href="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)</code>
<div class="block">Gets an entity via a key of this index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</a></code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getDatabase()">getDatabase</a></strong>()</code>
<div class="block">Returns the underlying database for this index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getEntityBinding()">getEntityBinding</a></strong>()</code>
<div class="block">Returns the entity binding for this index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getEntityClass()">getEntityClass</a></strong>()</code>
<div class="block">Returns the entity class for this index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getKeyBinding()">getKeyBinding</a></strong>()</code>
<div class="block">Returns the primary key binding for this index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#getKeyClass()">getKeyClass</a></strong>()</code>
<div class="block">Returns the primary key class for this index.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys()">keys</a></strong>()</code>
<div class="block">Opens a cursor for traversing all keys in this index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys(K,%20boolean,%20K,%20boolean)">keys</a></strong>(K&nbsp;fromKey,
    boolean&nbsp;fromInclusive,
    K&nbsp;toKey,
    boolean&nbsp;toInclusive)</code>
<div class="block">Opens a cursor for traversing keys in a key range.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys(com.sleepycat.db.Transaction,%20com.sleepycat.db.CursorConfig)">keys</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
    <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)</code>
<div class="block">Opens a cursor for traversing all keys in this index.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#keys(com.sleepycat.db.Transaction,%20K,%20boolean,%20K,%20boolean,%20com.sleepycat.db.CursorConfig)">keys</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
    K&nbsp;fromKey,
    boolean&nbsp;fromInclusive,
    K&nbsp;toKey,
    boolean&nbsp;toInclusive,
    <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)</code>
<div class="block">Opens a cursor for traversing keys in a key range.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.Map&lt;<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>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#map()">map</a></strong>()</code>
<div class="block">Returns a standard Java map based on this entity index.</div>
</td>
</tr>
<tr 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><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#put(E)">put</a></strong>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;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 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><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#put(com.sleepycat.db.Transaction,%20E)">put</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
   <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;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 class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoOverwrite(E)">putNoOverwrite</a></strong>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)</code>
<div class="block">Inserts an entity and returns true, or returns false if the primary key
 already exists.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoOverwrite(com.sleepycat.db.Transaction,%20E)">putNoOverwrite</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
              <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)</code>
<div class="block">Inserts an entity and returns true, or returns false if the primary key
 already exists.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoReturn(E)">putNoReturn</a></strong>(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;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 class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#putNoReturn(com.sleepycat.db.Transaction,%20E)">putNoReturn</a></strong>(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
           <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;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 class="rowColor">
<td class="colFirst"><code>java.util.SortedMap&lt;<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>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../com/sleepycat/persist/PrimaryIndex.html#sortedMap()">sortedMap</a></strong>()</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&nbsp;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.db.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&nbsp;PrimaryIndex(<a href="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</a>&nbsp;database,
            java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;&nbsp;keyClass,
            <a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;&nbsp;keyBinding,
            java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;&nbsp;entityClass,
            <a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;&nbsp;entityBinding)
             throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">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,%20java.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="strong">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="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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&nbsp;java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;&nbsp;getKeyClass()</pre>
<div class="block">Returns the primary key class for this index.</div>
<dl><dt><span class="strong">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&nbsp;<a href="../../../com/sleepycat/bind/EntryBinding.html" title="interface in com.sleepycat.bind">EntryBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&gt;&nbsp;getKeyBinding()</pre>
<div class="block">Returns the primary key binding for this index.</div>
<dl><dt><span class="strong">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&nbsp;java.lang.Class&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;&nbsp;getEntityClass()</pre>
<div class="block">Returns the entity class for this index.</div>
<dl><dt><span class="strong">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&nbsp;<a href="../../../com/sleepycat/bind/EntityBinding.html" title="interface in com.sleepycat.bind">EntityBinding</a>&lt;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&gt;&nbsp;getEntityBinding()</pre>
<div class="block">Returns the entity binding for this index.</div>
<dl><dt><span class="strong">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&nbsp;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;put(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)
      throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">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="strong">Parameters:</span></dt><dd><code>entity</code> - the entity to be inserted or updated.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the existing entity that was updated, or null if the entity was
 inserted.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="put(com.sleepycat.db.Transaction,java.lang.Object)">
<!--   -->
</a><a name="put(com.sleepycat.db.Transaction, E)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;put(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
    <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)
      throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">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="strong">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="strong">Returns:</span></dt><dd>the existing entity that was updated, or null if the entity was
 inserted.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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&nbsp;void&nbsp;putNoReturn(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)
                 throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">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="strong">Parameters:</span></dt><dd><code>entity</code> - the entity to be inserted or updated.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="putNoReturn(com.sleepycat.db.Transaction,java.lang.Object)">
<!--   -->
</a><a name="putNoReturn(com.sleepycat.db.Transaction, E)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNoReturn</h4>
<pre>public&nbsp;void&nbsp;putNoReturn(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
               <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)
                 throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">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.db.Transaction,%20E)"><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="strong">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="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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&nbsp;boolean&nbsp;putNoOverwrite(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)
                       throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">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="strong">Parameters:</span></dt><dd><code>entity</code> - the entity to be inserted.</dd>
<dt><span class="strong">Returns:</span></dt><dd>true if the entity was inserted, or false if an entity with the
 same primary key is already present.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="putNoOverwrite(com.sleepycat.db.Transaction,java.lang.Object)">
<!--   -->
</a><a name="putNoOverwrite(com.sleepycat.db.Transaction, E)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>putNoOverwrite</h4>
<pre>public&nbsp;boolean&nbsp;putNoOverwrite(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
                     <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;entity)
                       throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">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="strong">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="strong">Returns:</span></dt><dd>true if the entity was inserted, or false if an entity with the
 same primary key is already present.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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&nbsp;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;get(<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&nbsp;key)
      throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#get(K)">EntityIndex</a></code></strong></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/db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to search for.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value mapped to the given key, or null if the key is not
 present in the index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="get(com.sleepycat.db.Transaction,java.lang.Object,com.sleepycat.db.LockMode)">
<!--   -->
</a><a name="get(com.sleepycat.db.Transaction, PK, com.sleepycat.db.LockMode)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">E</a>&nbsp;get(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
    <a href="../../../com/sleepycat/persist/PrimaryIndex.html" title="type parameter in PrimaryIndex">PK</a>&nbsp;key,
    <a href="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
      throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#get(com.sleepycat.db.Transaction,%20K,%20com.sleepycat.db.LockMode)">EntityIndex</a></code></strong></div>
<div class="block">Gets an entity via a key of this index.</div>
<dl><dt><span class="strong">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/db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the value mapped to the given key, or null if the key is not
 present in the index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="map()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>map</h4>
<pre>public&nbsp;java.util.Map&lt;<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>&gt;&nbsp;map()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#map()">EntityIndex</a></code></strong></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="strong">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&nbsp;java.util.SortedMap&lt;<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>&gt;&nbsp;sortedMap()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#sortedMap()">EntityIndex</a></code></strong></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="strong">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&nbsp;<a href="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</a>&nbsp;getDatabase()</pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#getDatabase()">EntityIndex</a></code></strong></div>
<div class="block">Returns the underlying database for this index.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#getDatabase()">getDatabase</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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&nbsp;boolean&nbsp;contains(K&nbsp;key)
                 throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains(K)">EntityIndex</a></code></strong></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/db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a> is used implicitly.</p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains(K)">contains</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to search for.</dd>
<dt><span class="strong">Returns:</span></dt><dd>whether the key exists in the index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="contains(com.sleepycat.db.Transaction,java.lang.Object,com.sleepycat.db.LockMode)">
<!--   -->
</a><a name="contains(com.sleepycat.db.Transaction, K, com.sleepycat.db.LockMode)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public&nbsp;boolean&nbsp;contains(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
               K&nbsp;key,
               <a href="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</a>&nbsp;lockMode)
                 throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains(com.sleepycat.db.Transaction,%20K,%20com.sleepycat.db.LockMode)">EntityIndex</a></code></strong></div>
<div class="block">Checks for existence of a key in this index.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#contains(com.sleepycat.db.Transaction,%20K,%20com.sleepycat.db.LockMode)">contains</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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/db/LockMode.html#DEFAULT"><code>LockMode.DEFAULT</code></a>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>whether the key exists in the index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="count()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>count</h4>
<pre>public&nbsp;long&nbsp;count()
           throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#count()">EntityIndex</a></code></strong></div>
<div class="block">Returns a non-transactional count of the entities in this index.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#count()">count</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of entities in this index.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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&nbsp;boolean&nbsp;delete(K&nbsp;key)
               throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete(K)">EntityIndex</a></code></strong></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><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete(K)">delete</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>key</code> - the key to search for.</dd>
<dt><span class="strong">Returns:</span></dt><dd>whether any entities were deleted.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="delete(com.sleepycat.db.Transaction,java.lang.Object)">
<!--   -->
</a><a name="delete(com.sleepycat.db.Transaction, K)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>delete</h4>
<pre>public&nbsp;boolean&nbsp;delete(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
             K&nbsp;key)
               throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete(com.sleepycat.db.Transaction,%20K)">EntityIndex</a></code></strong></div>
<div class="block">Deletes all entities with a given index key.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#delete(com.sleepycat.db.Transaction,%20K)">delete</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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="strong">Returns:</span></dt><dd>whether any entities were deleted.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="keys()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keys</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;&nbsp;keys()
                     throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys()">EntityIndex</a></code></strong></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/db/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><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys()">keys</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="keys(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keys</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;&nbsp;keys(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
                   <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)
                     throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys(com.sleepycat.db.Transaction,%20com.sleepycat.db.CursorConfig)">EntityIndex</a></code></strong></div>
<div class="block">Opens a cursor for traversing all keys in this index.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys(com.sleepycat.db.Transaction,%20com.sleepycat.db.CursorConfig)">keys</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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/db/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="entities()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>entities</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;&nbsp;entities()
                         throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities()">EntityIndex</a></code></strong></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/db/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><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities()">entities</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="entities(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>entities</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;&nbsp;entities(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
                       <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)
                         throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities(com.sleepycat.db.Transaction,%20com.sleepycat.db.CursorConfig)">EntityIndex</a></code></strong></div>
<div class="block">Opens a cursor for traversing all entities in this index.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities(com.sleepycat.db.Transaction,%20com.sleepycat.db.CursorConfig)">entities</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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/db/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;&nbsp;keys(K&nbsp;fromKey,
                   boolean&nbsp;fromInclusive,
                   K&nbsp;toKey,
                   boolean&nbsp;toInclusive)
                     throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys(K,%20boolean,%20K,%20boolean)">EntityIndex</a></code></strong></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/db/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><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys(K,%20boolean,%20K,%20boolean)">keys</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="keys(com.sleepycat.db.Transaction,java.lang.Object,boolean,java.lang.Object,boolean,com.sleepycat.db.CursorConfig)">
<!--   -->
</a><a name="keys(com.sleepycat.db.Transaction, K, boolean, K, boolean, com.sleepycat.db.CursorConfig)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keys</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;K&gt;&nbsp;keys(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
                   K&nbsp;fromKey,
                   boolean&nbsp;fromInclusive,
                   K&nbsp;toKey,
                   boolean&nbsp;toInclusive,
                   <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)
                     throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys(com.sleepycat.db.Transaction,%20K,%20boolean,%20K,%20boolean,%20com.sleepycat.db.CursorConfig)">EntityIndex</a></code></strong></div>
<div class="block">Opens a cursor for traversing keys in a key range.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#keys(com.sleepycat.db.Transaction,%20K,%20boolean,%20K,%20boolean,%20com.sleepycat.db.CursorConfig)">keys</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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/db/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;&nbsp;entities(K&nbsp;fromKey,
                       boolean&nbsp;fromInclusive,
                       K&nbsp;toKey,
                       boolean&nbsp;toInclusive)
                         throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities(K,%20boolean,%20K,%20boolean)">EntityIndex</a></code></strong></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/db/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><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities(K,%20boolean,%20K,%20boolean)">entities</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</dd></dl>
</li>
</ul>
<a name="entities(com.sleepycat.db.Transaction,java.lang.Object,boolean,java.lang.Object,boolean,com.sleepycat.db.CursorConfig)">
<!--   -->
</a><a name="entities(com.sleepycat.db.Transaction, K, boolean, K, boolean, com.sleepycat.db.CursorConfig)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>entities</h4>
<pre>public&nbsp;<a href="../../../com/sleepycat/persist/EntityCursor.html" title="interface in com.sleepycat.persist">EntityCursor</a>&lt;E&gt;&nbsp;entities(<a href="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</a>&nbsp;txn,
                       K&nbsp;fromKey,
                       boolean&nbsp;fromInclusive,
                       K&nbsp;toKey,
                       boolean&nbsp;toInclusive,
                       <a href="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</a>&nbsp;config)
                         throws <a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></pre>
<div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities(com.sleepycat.db.Transaction,%20K,%20boolean,%20K,%20boolean,%20com.sleepycat.db.CursorConfig)">EntityIndex</a></code></strong></div>
<div class="block">Opens a cursor for traversing entities in a key range.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../com/sleepycat/persist/EntityIndex.html#entities(com.sleepycat.db.Transaction,%20K,%20boolean,%20K,%20boolean,%20com.sleepycat.db.CursorConfig)">entities</a></code>&nbsp;in interface&nbsp;<code><a href="../../../com/sleepycat/persist/EntityIndex.html" title="interface in com.sleepycat.persist">EntityIndex</a>&lt;K,E&gt;</code></dd>
<dt><span class="strong">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/db/CursorConfig.html#DEFAULT"><code>CursorConfig.DEFAULT</code></a>.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the cursor.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</a></code> - the base class for all BDB exceptions.</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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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"><em><b>Berkeley DB</b><br><font size="-1"> version 6.1.29</font></em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/sleepycat/persist/IndexNotAvailableException.html" title="class in com.sleepycat.persist"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../com/sleepycat/persist/SecondaryIndex.html" title="class in com.sleepycat.persist"><span class="strong">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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><font size=1>Copyright (c) 1996, 2016 Oracle and/or its affiliates.  All rights reserved.</font></small></p>
</body>
</html>