<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Wed Dec 03 16:22:06 EST 2003 --> <TITLE> DataCursor (Sleepycat Software, Inc. - Berkeley DB Java API) </TITLE> <META NAME="keywords" CONTENT="com.sleepycat.bdb.DataCursor,DataCursor class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style"> </HEAD> <SCRIPT> function asd() { parent.document.title="DataCursor (Sleepycat Software, Inc. - Berkeley DB Java API)"; } </SCRIPT> <BODY BGCOLOR="white" onload="asd();"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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/DataCursor.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.2.52</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/bdb/CurrentTransaction.html"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/bdb/DataDb.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DataCursor.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html" TARGET=""><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> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.sleepycat.bdb</FONT> <BR> Class DataCursor</H2> <PRE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">java.lang.Object</A> | +--<B>com.sleepycat.bdb.DataCursor</B> </PRE> <HR> <DL> <DT>public final class <B>DataCursor</B><DT>extends <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></DL> <P> (<em>internal</em>) Represents a Berkeley DB cursor and adds support for indices, bindings and key ranges. <p><b>NOTE:</b> This classes is internal and may be changed incompatibly or deleted in the future. It is public only so it may be used by subpackages.</p> <p>This class operates on a view and takes care of reading and updating indices, calling bindings, constraining access to a key range, etc.</p> <P> <P> <HR> <P> <!-- ======== NESTED CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#DataCursor(com.sleepycat.bdb.DataCursor)">DataCursor</A></B>(<A HREF="../../../com/sleepycat/bdb/DataCursor.html">DataCursor</A> other)</CODE> <BR> Clones a cursor preserving the current position.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#DataCursor(com.sleepycat.bdb.DataView, boolean)">DataCursor</A></B>(<A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A> view, boolean writeAllowed)</CODE> <BR> Creates a cursor for a given view.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#DataCursor(com.sleepycat.bdb.DataView, boolean, java.lang.Object)">DataCursor</A></B>(<A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A> view, boolean writeAllowed, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> singleKey)</CODE> <BR> Creates a cursor for a given view and single key range.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#DataCursor(com.sleepycat.bdb.DataView, boolean, java.lang.Object, boolean, java.lang.Object, boolean)">DataCursor</A></B>(<A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A> view, boolean writeAllowed, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> beginKey, boolean beginInclusive, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> endKey, boolean endInclusive)</CODE> <BR> Creates a cursor for a given view and key range.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></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/bdb/DataCursor.html#close()">close</A></B>()</CODE> <BR> Closes a cursor.</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/bdb/DataCursor.html#count()">count</A></B>()</CODE> <BR> Return the number of duplicates for the current key.</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/bdb/DataCursor.html#delete()">delete</A></B>()</CODE> <BR> Perform an arbitrary database 'delete' operation.</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/bdb/DataCursor.html#find(java.lang.Object, boolean)">find</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, boolean findFirst)</CODE> <BR> Find the given value, using DB_GET_BOTH if possible, or a sequential search otherwise.</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/bdb/DataCursor.html#get(java.lang.Object, java.lang.Object, int, boolean)">get</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> key, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, int flag, boolean lockForWrite)</CODE> <BR> Perform a database 'get' using the given key and value.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#getCurrentKey()">getCurrentKey</A></B>()</CODE> <BR> Returns the key object for the last record read.</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/bdb/DataCursor.html#getCurrentRecordNumber()">getCurrentRecordNumber</A></B>()</CODE> <BR> Returns the record number for the last record read.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#getCurrentValue()">getCurrentValue</A></B>()</CODE> <BR> Returns the value object for the last record read.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#getView()">getView</A></B>()</CODE> <BR> Returns the view for this cursor, as specified to the constructor.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#hasRecNumAccess()">hasRecNumAccess</A></B>()</CODE> <BR> Returns whether record number access is allowed.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../com/sleepycat/bdb/DataCursor.html#isWriteAllowed()">isWriteAllowed</A></B>()</CODE> <BR> Returns whether write is allowed for this cursor, as specified to the constructor.</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/bdb/DataCursor.html#put(java.lang.Object, java.lang.Object, int, java.lang.Object[])">put</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> key, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, int flag, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] oldValue)</CODE> <BR> Perform an arbitrary database 'put' operation, optionally returning the previous value.</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/bdb/DataCursor.html#put(java.lang.Object, java.lang.Object, int, java.lang.Object[], boolean)">put</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> key, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, int flag, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] oldValue, boolean useCurrentKey)</CODE> <BR> Perform an arbitrary database 'put' operation, optionally using the current key instead of the key parameter.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="DataCursor(com.sleepycat.bdb.DataView, boolean)"><!-- --></A><H3> DataCursor</H3> <PRE> public <B>DataCursor</B>(<A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A> view, boolean writeAllowed) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Creates a cursor for a given view. <P> <DT><B>Parameters:</B><DD><CODE>view</CODE> - the database view traversed by the cursor.<DD><CODE>writeAllowed</CODE> - whether the cursor can be used for writing. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> <HR> <A NAME="DataCursor(com.sleepycat.bdb.DataView, boolean, java.lang.Object)"><!-- --></A><H3> DataCursor</H3> <PRE> public <B>DataCursor</B>(<A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A> view, boolean writeAllowed, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> singleKey) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Creates a cursor for a given view and single key range. <P> <DT><B>Parameters:</B><DD><CODE>view</CODE> - the database view traversed by the cursor.<DD><CODE>writeAllowed</CODE> - whether the cursor can be used for writing.<DD><CODE>singleKey</CODE> - the single key value. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> <HR> <A NAME="DataCursor(com.sleepycat.bdb.DataView, boolean, java.lang.Object, boolean, java.lang.Object, boolean)"><!-- --></A><H3> DataCursor</H3> <PRE> public <B>DataCursor</B>(<A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A> view, boolean writeAllowed, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> beginKey, boolean beginInclusive, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> endKey, boolean endInclusive) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Creates a cursor for a given view and key range. <P> <DT><B>Parameters:</B><DD><CODE>view</CODE> - the database view traversed by the cursor.<DD><CODE>writeAllowed</CODE> - whether the cursor can be used for writing.<DD><CODE>beginKey</CODE> - the lower bound.<DD><CODE>beginInclusive</CODE> - whether the lower bound is inclusive.<DD><CODE>endKey</CODE> - the upper bound.<DD><CODE>endInclusive</CODE> - whether the upper bound is inclusive. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> <HR> <A NAME="DataCursor(com.sleepycat.bdb.DataCursor)"><!-- --></A><H3> DataCursor</H3> <PRE> public <B>DataCursor</B>(<A HREF="../../../com/sleepycat/bdb/DataCursor.html">DataCursor</A> other) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Clones a cursor preserving the current position. <P> <DT><B>Parameters:</B><DD><CODE>other</CODE> - the cursor to clone. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="close()"><!-- --></A><H3> close</H3> <PRE> public void <B>close</B>() throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Closes a cursor. <P> <DD><DL> <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="getView()"><!-- --></A><H3> getView</H3> <PRE> public <A HREF="../../../com/sleepycat/bdb/DataView.html">DataView</A> <B>getView</B>()</PRE> <DL> <DD>Returns the view for this cursor, as specified to the constructor. <P> <DD><DL> <DT><B>Returns:</B><DD>the view.</DL> </DD> </DL> <HR> <A NAME="isWriteAllowed()"><!-- --></A><H3> isWriteAllowed</H3> <PRE> public boolean <B>isWriteAllowed</B>()</PRE> <DL> <DD>Returns whether write is allowed for this cursor, as specified to the constructor. <P> <DD><DL> <DT><B>Returns:</B><DD>whether write is allowed.</DL> </DD> </DL> <HR> <A NAME="getCurrentKey()"><!-- --></A><H3> getCurrentKey</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>getCurrentKey</B>() throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Returns the key object for the last record read. <P> <DD><DL> <DT><B>Returns:</B><DD>the current key object. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="getCurrentValue()"><!-- --></A><H3> getCurrentValue</H3> <PRE> public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> <B>getCurrentValue</B>() throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Returns the value object for the last record read. <P> <DD><DL> <DT><B>Returns:</B><DD>the current value object. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="hasRecNumAccess()"><!-- --></A><H3> hasRecNumAccess</H3> <PRE> public boolean <B>hasRecNumAccess</B>()</PRE> <DL> <DD>Returns whether record number access is allowed. <P> <DD><DL> <DT><B>Returns:</B><DD>whether record number access is allowed.</DL> </DD> </DL> <HR> <A NAME="getCurrentRecordNumber()"><!-- --></A><H3> getCurrentRecordNumber</H3> <PRE> public int <B>getCurrentRecordNumber</B>() throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Returns the record number for the last record read. <P> <DD><DL> <DT><B>Returns:</B><DD>the last read record number. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="get(java.lang.Object, java.lang.Object, int, boolean)"><!-- --></A><H3> get</H3> <PRE> public int <B>get</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> key, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, int flag, boolean lockForWrite) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Perform a database 'get' using the given key and value. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key or null if none is required by the flag.<DD><CODE>value</CODE> - the value or null if none is required by the flag.<DD><CODE>flag</CODE> - a single flag value appropriate for cursor get.<DD><CODE>lockForWrite</CODE> - whether to set the RMW flag. <DT><B>Returns:</B><DD>an error or zero for success. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="find(java.lang.Object, boolean)"><!-- --></A><H3> find</H3> <PRE> public int <B>find</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, boolean findFirst) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Find the given value, using DB_GET_BOTH if possible, or a sequential search otherwise. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>value</CODE> - the value to search for among duplicates at the current position.<DD><CODE>findFirst</CODE> - whether to find the first or last value. <DT><B>Returns:</B><DD>an error or zero for success. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="count()"><!-- --></A><H3> count</H3> <PRE> public int <B>count</B>() throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Return the number of duplicates for the current key. <P> <DD><DL> <DT><B>Returns:</B><DD>the number of duplicates. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="put(java.lang.Object, java.lang.Object, int, java.lang.Object[])"><!-- --></A><H3> put</H3> <PRE> public int <B>put</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> key, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, int flag, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] oldValue) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Perform an arbitrary database 'put' operation, optionally returning the previous value. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to put.<DD><CODE>value</CODE> - the value to put.<DD><CODE>flag</CODE> - a single flag value appropriate for cursor put.<DD><CODE>oldValue</CODE> - holds the old value, or null if the old value should not be returned. <DT><B>Returns:</B><DD>an error or zero for success. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="put(java.lang.Object, java.lang.Object, int, java.lang.Object[], boolean)"><!-- --></A><H3> put</H3> <PRE> public int <B>put</B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> key, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A> value, int flag, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html">Object</A>[] oldValue, boolean useCurrentKey) throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Perform an arbitrary database 'put' operation, optionally using the current key instead of the key parameter. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to put.<DD><CODE>value</CODE> - the value to put.<DD><CODE>flag</CODE> - a single flag value appropriate for cursor put.<DD><CODE>oldValue</CODE> - holds the old value, or null if the old value should not be returned.<DD><CODE>useCurrentKey</CODE> - is true to use the current key rather than the key parameter. <DT><B>Returns:</B><DD>an error or zero for success. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <HR> <A NAME="delete()"><!-- --></A><H3> delete</H3> <PRE> public int <B>delete</B>() throws <A HREF="../../../com/sleepycat/db/DbException.html">DbException</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></PRE> <DL> <DD>Perform an arbitrary database 'delete' operation. <P> <DD><DL> <DT><B>Returns:</B><DD>an error or zero for success. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../com/sleepycat/db/DbException.html">DbException</A></CODE> - if a database problem occurs. <DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/io/IOException.html">IOException</A></CODE> - if an IO problem occurs.</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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/DataCursor.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.2.52</font></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../com/sleepycat/bdb/CurrentTransaction.html"><B>PREV CLASS</B></A> <A HREF="../../../com/sleepycat/bdb/DataDb.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DataCursor.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html" TARGET=""><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> <!-- =========== END OF NAVBAR =========== --> <HR> <font size=1><a href="../../../../sleepycat/legal.html">Copyright (c) 1996-2003</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font> </BODY> </HTML>