1702 lines
108 KiB
HTML
1702 lines
108 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<!--NewPage-->
|
|
<HTML>
|
|
<HEAD>
|
|
<!-- Generated by javadoc (build 1.5.0) on Thu May 15 17:17:30 EDT 2008 -->
|
|
<TITLE>
|
|
Cursor (Oracle - Berkeley DB Java API)
|
|
</TITLE>
|
|
|
|
<META NAME="keywords" CONTENT="com.sleepycat.db.Cursor class">
|
|
|
|
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">
|
|
|
|
<SCRIPT type="text/javascript">
|
|
function windowTitle()
|
|
{
|
|
parent.document.title="Cursor (Oracle - Berkeley DB Java API)";
|
|
}
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
</NOSCRIPT>
|
|
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="white" onload="windowTitle();">
|
|
|
|
|
|
<!-- ========= START OF TOP NAVBAR ======= -->
|
|
<A NAME="navbar_top"><!-- --></A>
|
|
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_top_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Cursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../com/sleepycat/db/CompactStats.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?com/sleepycat/db/Cursor.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Cursor.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_top"></A>
|
|
<!-- ========= END OF TOP NAVBAR ========= -->
|
|
|
|
<HR>
|
|
<!-- ======== START OF CLASS DATA ======== -->
|
|
<H2>
|
|
<FONT SIZE="-1">
|
|
com.sleepycat.db</FONT>
|
|
<BR>
|
|
Class Cursor</H2>
|
|
<PRE>
|
|
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
|
|
<IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.db.Cursor</B>
|
|
</PRE>
|
|
<DL>
|
|
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db">SecondaryCursor</A></DD>
|
|
</DL>
|
|
<HR>
|
|
<DL>
|
|
<DT><PRE>public class <B>Cursor</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL>
|
|
</PRE>
|
|
|
|
<P>
|
|
A database cursor. Cursors are used for operating on collections of
|
|
records, for iterating over a database, and for saving handles to
|
|
individual records, so that they can be modified after they have been
|
|
read.
|
|
<p>
|
|
Cursors may be used by multiple threads, but only serially. That is,
|
|
the application must serialize access to the handle.
|
|
<p>
|
|
If the cursor is to be used to perform operations on behalf of a
|
|
transaction, the cursor must be opened and closed within the context of
|
|
that single transaction.
|
|
<p>
|
|
Once the cursor close method has been called, the handle may not be
|
|
accessed again, regardless of the close method's success or failure.
|
|
<p>
|
|
To obtain a cursor with default attributes:
|
|
<blockquote><pre>
|
|
Cursor cursor = myDatabase.openCursor(txn, null);
|
|
</pre></blockquote>
|
|
To customize the attributes of a cursor, use a CursorConfig object.
|
|
<blockquote><pre>
|
|
CursorConfig config = new CursorConfig();
|
|
config.setDirtyRead(true);
|
|
Cursor cursor = myDatabase.openCursor(txn, config);
|
|
</pre></blockquote>
|
|
<p>
|
|
Modifications to the database during a sequential scan will be reflected
|
|
in the scan; that is, records inserted behind a cursor will not be
|
|
returned while records inserted in front of a cursor will be returned.
|
|
In Queue and Recno databases, missing entries (that is, entries that
|
|
were never explicitly created or that were created and then deleted)
|
|
will be ignored during a sequential scan.
|
|
<P>
|
|
|
|
<P>
|
|
<HR>
|
|
|
|
<P>
|
|
|
|
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
<A NAME="constructor_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Constructor Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE>protected </CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#Cursor(com.sleepycat.db.Database, com.sleepycat.db.CursorConfig)">Cursor</A></B>(<A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A> database,
|
|
<A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A> config)</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<!-- ========== METHOD SUMMARY =========== -->
|
|
|
|
<A NAME="method_summary"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
|
|
<B>Method Summary</B></FONT></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#close()">close</A></B>()</CODE>
|
|
|
|
<BR>
|
|
</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> int</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#count()">count</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Return a count of the number of data items for the key to which the
|
|
cursor refers.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#delete()">delete</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Delete the key/data pair to which the cursor refers.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/Cursor.html" title="class in com.sleepycat.db">Cursor</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#dup(boolean)">dup</A></B>(boolean samePosition)</CODE>
|
|
|
|
<BR>
|
|
Return a new cursor with the same transaction and locker ID as the
|
|
original cursor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getConfig()">getConfig</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Return this cursor's configuration.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getCurrent(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getCurrent</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Returns the key/data pair to which the cursor refers.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getDatabase()">getDatabase</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Return the Database handle associated with this Cursor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getFirst(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getFirst</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the first key/data pair of the database, and return
|
|
that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getLast(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getLast</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the last key/data pair of the database, and return
|
|
that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getNext(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getNext</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the next key/data pair and return that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getNextDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getNextDup</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
If the next key/data pair of the database is a duplicate data record for
|
|
the current key/data pair, move the cursor to the next key/data pair
|
|
of the database and return that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getNextNoDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getNextNoDup</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the next non-duplicate key/data pair and return
|
|
that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getPrev(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getPrev</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the previous key/data pair and return that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getPrevDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getPrevDup</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
If the previous key/data pair of the database is a duplicate data record
|
|
for the current key/data pair, move the cursor to the previous key/data
|
|
pair of the database and return that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getPrevNoDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getPrevNoDup</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the previous non-duplicate key/data pair and return
|
|
that pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/CacheFilePriority.html" title="class in com.sleepycat.db">CacheFilePriority</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getPriority()">getPriority</A></B>()</CODE>
|
|
|
|
<BR>
|
|
Get the cache priority for pages referenced by the cursor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getRecordNumber(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getRecordNumber</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Return the record number associated with the cursor.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getSearchBoth(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchBoth</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the specified key/data pair, where both the key and
|
|
data items must match.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getSearchBothRange(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchBothRange</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the specified key and closest matching data item of the
|
|
database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getSearchKey(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchKey</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the given key of the database, and return the datum
|
|
associated with the given key.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getSearchKeyRange(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchKeyRange</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the closest matching key of the database, and return
|
|
the data item associated with the matching key.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#getSearchRecordNumber(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchRecordNumber</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)</CODE>
|
|
|
|
<BR>
|
|
Move the cursor to the specific numbered record of the database, and
|
|
return the associated key/data pair.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#put(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">put</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Store a key/data pair into the database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#putAfter(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putAfter</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Store a key/data pair into the database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#putBefore(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putBefore</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Store a key/data pair into the database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#putCurrent(com.sleepycat.db.DatabaseEntry)">putCurrent</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Replaces the data in the key/data pair at the current cursor position.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#putKeyFirst(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putKeyFirst</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Store a key/data pair into the database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#putKeyLast(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putKeyLast</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Store a key/data pair into the database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#putNoDupData(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putNoDupData</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Store a key/data pair into the database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#putNoOverwrite(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putNoOverwrite</A></B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)</CODE>
|
|
|
|
<BR>
|
|
Store a key/data pair into the database.</TD>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
|
<CODE> void</CODE></FONT></TD>
|
|
<TD><CODE><B><A HREF="../../../com/sleepycat/db/Cursor.html#setPriority(com.sleepycat.db.CacheFilePriority)">setPriority</A></B>(<A HREF="../../../com/sleepycat/db/CacheFilePriority.html" title="class in com.sleepycat.db">CacheFilePriority</A> priority)</CODE>
|
|
|
|
<BR>
|
|
Set the cache priority for pages referenced by the DBC handle.</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
|
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
|
|
</TR>
|
|
<TR BGCOLOR="white" CLASS="TableRowColor">
|
|
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<P>
|
|
|
|
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
<A NAME="constructor_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Constructor Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="Cursor(com.sleepycat.db.Database, com.sleepycat.db.CursorConfig)"><!-- --></A><H3>
|
|
Cursor</H3>
|
|
<PRE>
|
|
protected <B>Cursor</B>(<A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A> database,
|
|
<A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A> config)</PRE>
|
|
<DL>
|
|
</DL>
|
|
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
|
|
<A NAME="method_detail"><!-- --></A>
|
|
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
|
|
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
|
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
|
|
<B>Method Detail</B></FONT></TH>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<A NAME="close()"><!-- --></A><H3>
|
|
close</H3>
|
|
<PRE>
|
|
public void <B>close</B>()
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="dup(boolean)"><!-- --></A><H3>
|
|
dup</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/Cursor.html" title="class in com.sleepycat.db">Cursor</A> <B>dup</B>(boolean samePosition)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Return a new cursor with the same transaction and locker ID as the
|
|
original cursor.
|
|
<p>
|
|
This is useful when an application is using locking and requires two
|
|
or more cursors in the same thread of control.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>samePosition</CODE> - If true, the newly created cursor is initialized to refer to the
|
|
same position in the database as the original cursor (if any) and
|
|
hold the same locks (if any). If false, or the original cursor does
|
|
not hold a database position and locks, the returned cursor is
|
|
uninitialized and will behave like a newly created cursor.
|
|
<p>
|
|
<DT><B>Returns:</B><DD>A new cursor with the same transaction and locker ID as the original
|
|
cursor.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getConfig()"><!-- --></A><H3>
|
|
getConfig</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A> <B>getConfig</B>()</PRE>
|
|
<DL>
|
|
<DD>Return this cursor's configuration.
|
|
<p>
|
|
This may differ from the configuration used to open this object if
|
|
the cursor existed previously.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>This cursor's configuration.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getDatabase()"><!-- --></A><H3>
|
|
getDatabase</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A> <B>getDatabase</B>()</PRE>
|
|
<DL>
|
|
<DD>Return the Database handle associated with this Cursor.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>The Database handle associated with this Cursor.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="count()"><!-- --></A><H3>
|
|
count</H3>
|
|
<PRE>
|
|
public int <B>count</B>()
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Return a count of the number of data items for the key to which the
|
|
cursor refers.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Returns:</B><DD>A count of the number of data items for the key to which the cursor
|
|
refers.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="delete()"><!-- --></A><H3>
|
|
delete</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>delete</B>()
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Delete the key/data pair to which the cursor refers.
|
|
<p>
|
|
When called on a cursor opened on a database that has been made into a
|
|
secondary index, this method the key/data pair from the primary database
|
|
and all secondary indices.
|
|
<p>
|
|
The cursor position is unchanged after a delete, and subsequent calls
|
|
to cursor functions expecting the cursor to refer to an existing key
|
|
will fail.
|
|
<p>
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getCurrent(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getCurrent</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getCurrent</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Returns the key/data pair to which the cursor refers.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the key/pair at the cursor
|
|
position has been deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getFirst(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getFirst</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getFirst</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the first key/data pair of the database, and return
|
|
that pair. If the first key has duplicate values, the first data item
|
|
in the set of duplicates is returned.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getLast(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getLast</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getLast</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the last key/data pair of the database, and return
|
|
that pair. If the last key has duplicate values, the last data item in
|
|
the set of duplicates is returned.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getNext(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getNext</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getNext</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the next key/data pair and return that pair. If
|
|
the matching key has duplicate values, the first data item in the set
|
|
of duplicates is returned.
|
|
<p>
|
|
If the cursor is not yet initialized, move the cursor to the first
|
|
key/data pair of the database, and return that pair. Otherwise, the
|
|
cursor is moved to the next key/data pair of the database, and that pair
|
|
is returned. In the presence of duplicate key values, the value of the
|
|
key may not change.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getNextDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getNextDup</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getNextDup</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>If the next key/data pair of the database is a duplicate data record for
|
|
the current key/data pair, move the cursor to the next key/data pair
|
|
of the database and return that pair.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getNextNoDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getNextNoDup</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getNextNoDup</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the next non-duplicate key/data pair and return
|
|
that pair. If the matching key has duplicate values, the first data
|
|
item in the set of duplicates is returned.
|
|
<p>
|
|
If the cursor is not yet initialized, move the cursor to the first
|
|
key/data pair of the database, and return that pair. Otherwise, the
|
|
cursor is moved to the next non-duplicate key of the database, and that
|
|
key/data pair is returned.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPrev(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getPrev</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getPrev</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the previous key/data pair and return that pair.
|
|
If the matching key has duplicate values, the last data item in the set
|
|
of duplicates is returned.
|
|
<p>
|
|
If the cursor is not yet initialized, move the cursor to the last
|
|
key/data pair of the database, and return that pair. Otherwise, the
|
|
cursor is moved to the previous key/data pair of the database, and that
|
|
pair is returned. In the presence of duplicate key values, the value of
|
|
the key may not change.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPrevDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getPrevDup</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getPrevDup</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>If the previous key/data pair of the database is a duplicate data record
|
|
for the current key/data pair, move the cursor to the previous key/data
|
|
pair of the database and return that pair.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPrevNoDup(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getPrevNoDup</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getPrevNoDup</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the previous non-duplicate key/data pair and return
|
|
that pair. If the matching key has duplicate values, the last data item
|
|
in the set of duplicates is returned.
|
|
<p>
|
|
If the cursor is not yet initialized, move the cursor to the last
|
|
key/data pair of the database, and return that pair. Otherwise, the
|
|
cursor is moved to the previous non-duplicate key of the database, and
|
|
that key/data pair is returned.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getRecordNumber(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getRecordNumber</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getRecordNumber</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Return the record number associated with the cursor. The record number
|
|
will be returned in the data parameter.
|
|
<p>
|
|
For this method to be called, the underlying database must be of type
|
|
Btree, and it must have been configured to support record numbers.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>data</CODE> - the data
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSearchKey(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getSearchKey</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getSearchKey</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the given key of the database, and return the datum
|
|
associated with the given key. If the matching key has duplicate
|
|
values, the first data item in the set of duplicates is returned.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
used as input. It must be initialized with a non-null byte array by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSearchKeyRange(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getSearchKeyRange</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getSearchKeyRange</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the closest matching key of the database, and return
|
|
the data item associated with the matching key. If the matching key has
|
|
duplicate values, the first data item in the set of duplicates is returned.
|
|
<p>
|
|
The returned key/data pair is for the smallest key greater than or equal
|
|
to the specified key (as determined by the key comparison function),
|
|
permitting partial key matches and range searches.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
used as input and returned as output. It must be initialized with a non-null
|
|
byte array by the caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSearchBoth(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getSearchBoth</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getSearchBoth</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the specified key/data pair, where both the key and
|
|
data items must match.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
used as input. It must be initialized with a non-null byte array by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
used as input. It must be initialized with a non-null byte array by the
|
|
caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSearchBothRange(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getSearchBothRange</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getSearchBothRange</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the specified key and closest matching data item of the
|
|
database.
|
|
<p>
|
|
In the case of any database supporting sorted duplicate sets, the returned
|
|
key/data pair is for the smallest data item greater than or equal to the
|
|
specified data item (as determined by the duplicate comparison function),
|
|
permitting partial matches and range searches in duplicate data sets.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
used as input and returned as output. It must be initialized with a non-null
|
|
byte array by the caller.<DD><CODE>data</CODE> - the data
|
|
used as input and returned as output. It must be initialized with a non-null
|
|
byte array by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getSearchRecordNumber(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
|
|
getSearchRecordNumber</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getSearchRecordNumber</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data,
|
|
<A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A> lockMode)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Move the cursor to the specific numbered record of the database, and
|
|
return the associated key/data pair.
|
|
<p>
|
|
The data field of the specified key must be a byte array containing a
|
|
record number, as described in <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A>. This determines
|
|
the record to be retrieved.
|
|
<p>
|
|
For this method to be called, the underlying database must be of type
|
|
Btree, and it must have been configured to support record numbers.
|
|
<p>
|
|
If this method fails for any reason, the position of the cursor will be
|
|
unchanged.
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key
|
|
returned as output. Its byte array does not need to be initialized by the
|
|
caller.<DD><CODE>data</CODE> - the data
|
|
returned as output. Multiple results can be retrieved by passing an object
|
|
that is a subclass of <A HREF="../../../com/sleepycat/db/MultipleEntry.html" title="class in com.sleepycat.db"><CODE>MultipleEntry</CODE></A>, otherwise its byte array does not
|
|
need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
|
|
<DT><B>Returns:</B><DD><A HREF="../../../com/sleepycat/db/OperationStatus.html#NOTFOUND"><CODE>OperationStatus.NOTFOUND</CODE></A> if no matching key/data pair is
|
|
found; <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEMPTY"><CODE>OperationStatus.KEYEMPTY</CODE></A> if the database is a Queue or Recno database and the specified key exists, but was never explicitly created by the application or was later deleted; otherwise, <A HREF="../../../com/sleepycat/db/OperationStatus.html#SUCCESS"><CODE>OperationStatus.SUCCESS</CODE></A>.
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
|
|
does not contain a required non-null byte array.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
|
|
<p></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="put(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
put</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>put</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Store a key/data pair into the database.
|
|
<p>
|
|
If the put method succeeds, the cursor is always positioned to refer to
|
|
the newly inserted item. If the put method fails for any reason, the
|
|
state of the cursor will be unchanged.
|
|
<p>
|
|
If the key already appears in the database and duplicates are supported,
|
|
the new data value is inserted at the correct sorted location. If the
|
|
key already appears in the database and duplicates are not supported,
|
|
the existing key/data pair will be replaced.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> operated on.
|
|
<p><DD><CODE>data</CODE> - the data <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> stored.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="putAfter(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
putAfter</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>putAfter</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Store a key/data pair into the database.
|
|
<p>
|
|
If the putAfter method succeeds, the cursor is always positioned to refer to
|
|
the newly inserted item. If the putAfter method fails for any reason, the
|
|
state of the cursor will be unchanged.
|
|
<p>
|
|
In the case of the Btree and Hash access methods, insert the data
|
|
element as a duplicate element of the key to which the cursor refers.
|
|
The new element appears immediately
|
|
after
|
|
the current cursor position. It is an error to call this method if the
|
|
underlying Btree or Hash database does not support duplicate data items.
|
|
The key parameter is ignored.
|
|
<p>
|
|
In the case of the Hash access method, the putAfter method will fail and
|
|
throw an exception if the current cursor record has already been deleted.
|
|
<p>
|
|
In the case of the Recno access method, it is an error to call this
|
|
method if the underlying Recno database was not configured to have
|
|
mutable record numbers. A new key is created, all records after the
|
|
inserted item are automatically renumbered, and the key of the new
|
|
record is returned in the key parameter. The initial value of the key
|
|
parameter is ignored.
|
|
<p>
|
|
The putAfter method may not be called for the Queue access method.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> operated on.
|
|
<p><DD><CODE>data</CODE> - the data <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> stored.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="putBefore(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
putBefore</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>putBefore</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Store a key/data pair into the database.
|
|
<p>
|
|
If the putBefore method succeeds, the cursor is always positioned to refer to
|
|
the newly inserted item. If the putBefore method fails for any reason, the
|
|
state of the cursor will be unchanged.
|
|
<p>
|
|
In the case of the Btree and Hash access methods, insert the data
|
|
element as a duplicate element of the key to which the cursor refers.
|
|
The new element appears immediately
|
|
before
|
|
the current cursor position. It is an error to call this method if the
|
|
underlying Btree or Hash database does not support duplicate data items.
|
|
The key parameter is ignored.
|
|
<p>
|
|
In the case of the Hash access method, the putBefore method will fail and
|
|
throw an exception if the current cursor record has already been deleted.
|
|
<p>
|
|
In the case of the Recno access method, it is an error to call this
|
|
method if the underlying Recno database was not configured to have
|
|
mutable record numbers. A new key is created, all records after the
|
|
inserted item are automatically renumbered, and the key of the new
|
|
record is returned in the key parameter. The initial value of the key
|
|
parameter is ignored.
|
|
<p>
|
|
The putBefore method may not be called for the Queue access method.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> operated on.
|
|
<p><DD><CODE>data</CODE> - the data <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> stored.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="putNoOverwrite(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
putNoOverwrite</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>putNoOverwrite</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Store a key/data pair into the database.
|
|
<p>
|
|
If the putNoOverwrite method succeeds, the cursor is always positioned to refer to
|
|
the newly inserted item. If the putNoOverwrite method fails for any reason, the
|
|
state of the cursor will be unchanged.
|
|
<p>
|
|
If the key already appears in the database, putNoOverwrite will return
|
|
<A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEXIST"><CODE>OperationStatus.KEYEXIST</CODE></A>.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> operated on.
|
|
<p><DD><CODE>data</CODE> - the data <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> stored.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="putKeyFirst(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
putKeyFirst</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>putKeyFirst</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Store a key/data pair into the database.
|
|
<p>
|
|
If the putKeyFirst method succeeds, the cursor is always positioned to refer to
|
|
the newly inserted item. If the putKeyFirst method fails for any reason, the
|
|
state of the cursor will be unchanged.
|
|
<p>
|
|
In the case of the Btree and Hash access methods, insert the specified
|
|
key/data pair into the database.
|
|
<p>
|
|
If the underlying database supports duplicate data items, and if the
|
|
key already exists in the database and a duplicate sort function has
|
|
been specified, the inserted data item is added in its sorted location.
|
|
If the key already exists in the database and no duplicate sort function
|
|
has been specified, the inserted data item is added as the
|
|
first
|
|
of the data items for that key.
|
|
<p>
|
|
The putKeyFirst method may not be called for the Queue or Recno access methods.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> operated on.
|
|
<p><DD><CODE>data</CODE> - the data <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> stored.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="putKeyLast(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
putKeyLast</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>putKeyLast</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Store a key/data pair into the database.
|
|
<p>
|
|
If the putKeyLast method succeeds, the cursor is always positioned to refer to
|
|
the newly inserted item. If the putKeyLast method fails for any reason, the
|
|
state of the cursor will be unchanged.
|
|
<p>
|
|
In the case of the Btree and Hash access methods, insert the specified
|
|
key/data pair into the database.
|
|
<p>
|
|
If the underlying database supports duplicate data items, and if the
|
|
key already exists in the database and a duplicate sort function has
|
|
been specified, the inserted data item is added in its sorted location.
|
|
If the key already exists in the database and no duplicate sort function
|
|
has been specified, the inserted data item is added as the
|
|
last
|
|
of the data items for that key.
|
|
<p>
|
|
The putKeyLast method may not be called for the Queue or Recno access methods.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> operated on.
|
|
<p><DD><CODE>data</CODE> - the data <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> stored.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="putNoDupData(com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
putNoDupData</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>putNoDupData</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> key,
|
|
<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Store a key/data pair into the database.
|
|
<p>
|
|
If the putNoDupData method succeeds, the cursor is always positioned to refer to
|
|
the newly inserted item. If the putNoDupData method fails for any reason, the
|
|
state of the cursor will be unchanged.
|
|
<p>
|
|
In the case of the Btree and Hash access methods, insert
|
|
the specified key/data pair into the database, unless a key/data pair
|
|
comparing equally to it already exists in the database. If a matching
|
|
key/data pair already exists in the database, <A HREF="../../../com/sleepycat/db/OperationStatus.html#KEYEXIST"><CODE>OperationStatus.KEYEXIST</CODE></A> is returned.
|
|
<p>
|
|
This method may only be called if the underlying database has been
|
|
configured to support sorted duplicate data items.
|
|
<p>
|
|
This method may not be called for the Queue or Recno access methods.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> operated on.
|
|
<p><DD><CODE>data</CODE> - the data <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A> stored.
|
|
<p>
|
|
<p>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - if the operation was selected to resolve a
|
|
deadlock.
|
|
<p>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
|
|
<p>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="putCurrent(com.sleepycat.db.DatabaseEntry)"><!-- --></A><H3>
|
|
putCurrent</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>putCurrent</B>(<A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A> data)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Replaces the data in the key/data pair at the current cursor position.
|
|
<p>
|
|
Whether the putCurrent method succeeds or fails for any reason, the state
|
|
of the cursor will be unchanged.
|
|
<p>
|
|
Overwrite the data of the key/data pair to which the cursor refers with the
|
|
specified data item. This method will return OperationStatus.NOTFOUND if
|
|
the cursor currently refers to an already-deleted key/data pair.
|
|
<p>
|
|
For a database that does not support duplicates, the data may be changed by
|
|
this method. If duplicates are supported, the data may be changed only if
|
|
a custom partial comparator is configured and the comparator considers the
|
|
old and new data to be equal (that is, the comparator returns zero). For
|
|
more information on partial comparators see <A HREF="../../../com/sleepycat/db/DatabaseConfig.html#setDuplicateComparator(java.util.Comparator)"><CODE>DatabaseConfig.setDuplicateComparator(java.util.Comparator)</CODE></A>.
|
|
<p>
|
|
If the old and new data are unequal according to the comparator, a <code>DatabaseException</code> is thrown. Changing the data in this case would change
|
|
the sort order of the record, which would change the cursor position, and
|
|
this is not allowed. To change the sort order of a record, delete it and
|
|
then re-insert it.
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
<DT><B>Parameters:</B><DD><CODE>data</CODE> - - the data DatabaseEntry stored.
|
|
<br>
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DeadlockException.html" title="class in com.sleepycat.db">DeadlockException</A></CODE> - - if the operation was selected to resolve a
|
|
deadlock.
|
|
<br>
|
|
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - - if an invalid parameter was specified.
|
|
<br>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - - if the old and new data are not equal according
|
|
to the configured duplicate comparator or default comparator, or if a
|
|
failure occurs.
|
|
<br></DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="getPriority()"><!-- --></A><H3>
|
|
getPriority</H3>
|
|
<PRE>
|
|
public <A HREF="../../../com/sleepycat/db/CacheFilePriority.html" title="class in com.sleepycat.db">CacheFilePriority</A> <B>getPriority</B>()
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Get the cache priority for pages referenced by the cursor.
|
|
<p>
|
|
This method may be called at any time during the life of the application.
|
|
<p>
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<HR>
|
|
|
|
<A NAME="setPriority(com.sleepycat.db.CacheFilePriority)"><!-- --></A><H3>
|
|
setPriority</H3>
|
|
<PRE>
|
|
public void <B>setPriority</B>(<A HREF="../../../com/sleepycat/db/CacheFilePriority.html" title="class in com.sleepycat.db">CacheFilePriority</A> priority)
|
|
throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
|
|
<DL>
|
|
<DD>Set the cache priority for pages referenced by the DBC handle.
|
|
<p>
|
|
The priority of a page biases the replacement algorithm to be more or less
|
|
likely to discard a page when space is needed in the buffer pool. The bias
|
|
is temporary, and pages will eventually be discarded if they are not
|
|
referenced again. The DBcursor->set_priority method is only advisory, and
|
|
does not guarantee pages will be treated in a specific way.
|
|
<p>
|
|
This method may be called at any time during the life of the application.
|
|
<p>
|
|
<p>
|
|
<P>
|
|
<DD><DL>
|
|
|
|
<DT><B>Throws:</B>
|
|
<DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
|
|
</DD>
|
|
</DL>
|
|
<!-- ========= END OF CLASS DATA ========= -->
|
|
<HR>
|
|
|
|
|
|
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
|
<A NAME="navbar_bottom"><!-- --></A>
|
|
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
|
|
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
|
|
<TR>
|
|
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
|
<A NAME="navbar_bottom_firstrow"><!-- --></A>
|
|
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
|
|
<TR ALIGN="center" VALIGN="top">
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Cursor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
|
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
|
<b>Berkeley DB</b><br><font size="-1"> version 4.7.25</font></EM>
|
|
</TD>
|
|
</TR>
|
|
|
|
<TR>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../com/sleepycat/db/CompactStats.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>
|
|
<A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
|
|
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
|
<A HREF="../../../index.html?com/sleepycat/db/Cursor.html" target="_top"><B>FRAMES</B></A>
|
|
<A HREF="Cursor.html" target="_top"><B>NO FRAMES</B></A>
|
|
<SCRIPT type="text/javascript">
|
|
<!--
|
|
if(window==top) {
|
|
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
|
|
}
|
|
//-->
|
|
</SCRIPT>
|
|
<NOSCRIPT>
|
|
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
|
|
</NOSCRIPT>
|
|
|
|
|
|
</FONT></TD>
|
|
</TR>
|
|
<TR>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
|
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
|
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
|
</TR>
|
|
</TABLE>
|
|
<A NAME="skip-navbar_bottom"></A>
|
|
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
|
|
|
<HR>
|
|
<font size=1>Copyright (c) 1996,2008 Oracle. All rights reserved.</font>
|
|
</BODY>
|
|
</HTML>
|