Debian Codegraph @

docs/java/com/sleepycat/db/SecondaryDatabase.html

raw symbols SCIP
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc (build 1.6.0_51) on Mon Sep 09 11:47:05 EDT 2013 -->
6 <TITLE>
7 SecondaryDatabase (Oracle - Berkeley DB Java API)
8 </TITLE>
9
10 <META NAME="date" CONTENT="2013-09-09">
11
12 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">
13
14 <SCRIPT type="text/javascript">
15 function windowTitle()
16 {
17 if (location.href.indexOf('is-external=true') == -1) {
18 parent.document.title="SecondaryDatabase (Oracle - Berkeley DB Java API)";
19 }
20 }
21 </SCRIPT>
22 <NOSCRIPT>
23 </NOSCRIPT>
24
25 </HEAD>
26
27 <BODY BGCOLOR="white" onload="windowTitle();">
28 <HR>
29
30
31 <!-- ========= START OF TOP NAVBAR ======= -->
32 <A NAME="navbar_top"><!-- --></A>
33 <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35 <TR>
36 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37 <A NAME="navbar_top_firstrow"><!-- --></A>
38 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39 <TR ALIGN="center" VALIGN="top">
40 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SecondaryDatabase.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48 </TR>
49 </TABLE>
50 </TD>
51 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52 <b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM>
53 </TD>
54 </TR>
55
56 <TR>
57 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58 &nbsp;<A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>&nbsp;
59 &nbsp;<A HREF="../../../com/sleepycat/db/SecondaryKeyCreator.html" title="interface in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
60 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61 <A HREF="../../../index.html?com/sleepycat/db/SecondaryDatabase.html" target="_top"><B>FRAMES</B></A> &nbsp;
62 &nbsp;<A HREF="SecondaryDatabase.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
63 &nbsp;<SCRIPT type="text/javascript">
64 <!--
65 if(window==top) {
66 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
67 }
68 //-->
69 </SCRIPT>
70 <NOSCRIPT>
71 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
72 </NOSCRIPT>
73
74
75 </FONT></TD>
76 </TR>
77 <TR>
78 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82 </TR>
83 </TABLE>
84 <A NAME="skip-navbar_top"></A>
85 <!-- ========= END OF TOP NAVBAR ========= -->
86
87 <HR>
88 <!-- ======== START OF CLASS DATA ======== -->
89 <H2>
90 <FONT SIZE="-1">
91 com.sleepycat.db</FONT>
92 <BR>
93 Class SecondaryDatabase</H2>
94 <PRE>
95 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">com.sleepycat.db.Database</A>
97 <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.sleepycat.db.SecondaryDatabase</B>
98 </PRE>
99 <HR>
100 <DL>
101 <DT><PRE>public class <B>SecondaryDatabase</B><DT>extends <A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A></DL>
102 </PRE>
103
104 <P>
105 A secondary database handle.
106 <p>
107 Secondary databases are opened with <A HREF="../../../com/sleepycat/db/Environment.html#openSecondaryDatabase(com.sleepycat.db.Transaction, java.lang.String, java.lang.String, com.sleepycat.db.Database, com.sleepycat.db.SecondaryConfig)"><CODE>Environment.openSecondaryDatabase</CODE></A> and are
108 always associated with a single primary database. The distinguishing
109 characteristics of a secondary database are:
110 <ul>
111 <li>Records are automatically added to a secondary database when records are
112 added, modified and deleted in the primary database. Direct calls to
113 <code>put()</code> methods on a secondary database are prohibited.</li>
114 <li>The <A HREF="../../../com/sleepycat/db/Database.html#delete(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry)"><CODE>delete</CODE></A> method of a secondary database will delete
115 the primary record and as well as all its associated secondary records.</li>
116 <li>Calls to all <code>get()</code> methods will return the data from the
117 associated primary database.</li>
118 <li>Additional <code>get()</code> method signatures are provided to return
119 the primary key in an additional <code>pKey</code> parameter.</li>
120 <li>Calls to <A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#openCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)"><CODE>openCursor</CODE></A> will return a <A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db"><CODE>SecondaryCursor</CODE></A>, which itself has <code>get()</code> methods that return
121 the data of the primary database and additional <code>get()</code> method
122 signatures for returning the primary key.</li>
123 <li>The <A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#openSecondaryCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)"><CODE>openSecondaryCursor</CODE></A> method is provided
124 to return a <A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db"><CODE>SecondaryCursor</CODE></A> that doesn't require casting.</li>
125 </ul>
126 <p>
127 Before opening or creating a secondary database you must implement the <A HREF="../../../com/sleepycat/db/SecondaryKeyCreator.html" title="interface in com.sleepycat.db"><CODE>SecondaryKeyCreator</CODE></A>
128 interface.
129 <p>
130 For example, to create a secondary database that supports duplicates:
131 <pre>
132 Database primaryDb; // The primary database must already be open.
133 SecondaryKeyCreator keyCreator; // Your key creator implementation.
134 SecondaryConfig secConfig = new SecondaryConfig();
135 secConfig.setAllowCreate(true);
136 secConfig.setSortedDuplicates(true);
137 secConfig.setKeyCreator(keyCreator);
138 SecondaryDatabase newDb = env.openSecondaryDatabase(transaction,
139 "myDatabaseName",
140 primaryDb,
141 secConfig)
142 </pre>
143 <p>
144 If a primary database is to be associated with one or more secondary
145 databases, it may not be configured for duplicates.
146 <p>
147 Note that the associations between primary and secondary databases are not
148 stored persistently. Whenever a primary database is opened for write access by
149 the application, the appropriate associated secondary databases should also be
150 opened by the application. This is necessary to ensure data integrity when
151 changes are made to the primary database.
152 <P>
153
154 <P>
155 <HR>
156
157 <P>
158
159 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
160
161 <A NAME="constructor_summary"><!-- --></A>
162 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
163 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
164 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
165 <B>Constructor Summary</B></FONT></TH>
166 </TR>
167 <TR BGCOLOR="white" CLASS="TableRowColor">
168 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#SecondaryDatabase(java.lang.String, java.lang.String, com.sleepycat.db.Database, com.sleepycat.db.SecondaryConfig)">SecondaryDatabase</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;fileName,
169 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;databaseName,
170 <A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A>&nbsp;primaryDatabase,
171 <A HREF="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</A>&nbsp;config)</CODE>
172
173 <BR>
174 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open a database.</TD>
175 </TR>
176 </TABLE>
177 &nbsp;
178 <!-- ========== METHOD SUMMARY =========== -->
179
180 <A NAME="method_summary"><!-- --></A>
181 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
182 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
183 <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
184 <B>Method Summary</B></FONT></TH>
185 </TR>
186 <TR BGCOLOR="white" CLASS="TableRowColor">
187 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
188 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
189 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#get(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">get</A></B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
190 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;key,
191 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;pKey,
192 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;data,
193 <A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)</CODE>
194
195 <BR>
196 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the key/data pair with the given key.</TD>
197 </TR>
198 <TR BGCOLOR="white" CLASS="TableRowColor">
199 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
200 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</A></CODE></FONT></TD>
201 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#getConfig()">getConfig</A></B>()</CODE>
202
203 <BR>
204 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return this Database object's configuration.</TD>
205 </TR>
206 <TR BGCOLOR="white" CLASS="TableRowColor">
207 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
208 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A></CODE></FONT></TD>
209 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#getPrimaryDatabase()">getPrimaryDatabase</A></B>()</CODE>
210
211 <BR>
212 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the primary database associated with this secondary database.</TD>
213 </TR>
214 <TR BGCOLOR="white" CLASS="TableRowColor">
215 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
216 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
217 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#getSearchBoth(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchBoth</A></B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
218 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;key,
219 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;pKey,
220 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;data,
221 <A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)</CODE>
222
223 <BR>
224 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the key/data pair with the specified secondary and primary key, that
225 is, both the primary and secondary key items must match.</TD>
226 </TR>
227 <TR BGCOLOR="white" CLASS="TableRowColor">
228 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A></CODE></FONT></TD>
230 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#getSearchRecordNumber(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchRecordNumber</A></B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
231 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;key,
232 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;pKey,
233 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;data,
234 <A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)</CODE>
235
236 <BR>
237 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieves the key/data pair associated with the specific numbered record of the database.</TD>
238 </TR>
239 <TR BGCOLOR="white" CLASS="TableRowColor">
240 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
241 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</A></CODE></FONT></TD>
242 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#getSecondaryConfig()">getSecondaryConfig</A></B>()</CODE>
243
244 <BR>
245 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a copy of the secondary configuration of this database.</TD>
246 </TR>
247 <TR BGCOLOR="white" CLASS="TableRowColor">
248 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
249 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/Cursor.html" title="class in com.sleepycat.db">Cursor</A></CODE></FONT></TD>
250 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#openCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)">openCursor</A></B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
251 <A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A>&nbsp;config)</CODE>
252
253 <BR>
254 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a cursor into the database.</TD>
255 </TR>
256 <TR BGCOLOR="white" CLASS="TableRowColor">
257 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
258 <CODE>&nbsp;<A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db">SecondaryCursor</A></CODE></FONT></TD>
259 <TD><CODE><B><A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#openSecondaryCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)">openSecondaryCursor</A></B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
260 <A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A>&nbsp;config)</CODE>
261
262 <BR>
263 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Obtain a cursor on a database, returning a <code>SecondaryCursor</code>.</TD>
264 </TR>
265 </TABLE>
266 &nbsp;<A NAME="methods_inherited_from_class_com.sleepycat.db.Database"><!-- --></A>
267 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
268 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
269 <TH ALIGN="left"><B>Methods inherited from class com.sleepycat.db.<A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A></B></TH>
270 </TR>
271 <TR BGCOLOR="white" CLASS="TableRowColor">
272 <TD><CODE><A HREF="../../../com/sleepycat/db/Database.html#append(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">append</A>, <A HREF="../../../com/sleepycat/db/Database.html#close()">close</A>, <A HREF="../../../com/sleepycat/db/Database.html#close(boolean)">close</A>, <A HREF="../../../com/sleepycat/db/Database.html#compact(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.CompactConfig)">compact</A>, <A HREF="../../../com/sleepycat/db/Database.html#consume(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, boolean)">consume</A>, <A HREF="../../../com/sleepycat/db/Database.html#delete(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry)">delete</A>, <A HREF="../../../com/sleepycat/db/Database.html#deleteMultiple(com.sleepycat.db.Transaction, com.sleepycat.db.MultipleEntry)">deleteMultiple</A>, <A HREF="../../../com/sleepycat/db/Database.html#deleteMultipleKey(com.sleepycat.db.Transaction, com.sleepycat.db.MultipleEntry)">deleteMultipleKey</A>, <A HREF="../../../com/sleepycat/db/Database.html#exists(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry)">exists</A>, <A HREF="../../../com/sleepycat/db/Database.html#get(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">get</A>, <A HREF="../../../com/sleepycat/db/Database.html#getCacheFile()">getCacheFile</A>, <A HREF="../../../com/sleepycat/db/Database.html#getDatabaseFile()">getDatabaseFile</A>, <A HREF="../../../com/sleepycat/db/Database.html#getDatabaseName()">getDatabaseName</A>, <A HREF="../../../com/sleepycat/db/Database.html#getEnvironment()">getEnvironment</A>, <A HREF="../../../com/sleepycat/db/Database.html#getKeyRange(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry)">getKeyRange</A>, <A HREF="../../../com/sleepycat/db/Database.html#getSearchBoth(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchBoth</A>, <A HREF="../../../com/sleepycat/db/Database.html#getSearchRecordNumber(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)">getSearchRecordNumber</A>, <A HREF="../../../com/sleepycat/db/Database.html#getStats(com.sleepycat.db.Transaction, com.sleepycat.db.StatsConfig)">getStats</A>, <A HREF="../../../com/sleepycat/db/Database.html#join(com.sleepycat.db.Cursor[], com.sleepycat.db.JoinConfig)">join</A>, <A HREF="../../../com/sleepycat/db/Database.html#openSequence(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.SequenceConfig)">openSequence</A>, <A HREF="../../../com/sleepycat/db/Database.html#put(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">put</A>, <A HREF="../../../com/sleepycat/db/Database.html#putMultiple(com.sleepycat.db.Transaction, com.sleepycat.db.MultipleEntry, com.sleepycat.db.MultipleEntry, boolean)">putMultiple</A>, <A HREF="../../../com/sleepycat/db/Database.html#putMultipleKey(com.sleepycat.db.Transaction, com.sleepycat.db.MultipleEntry, boolean)">putMultipleKey</A>, <A HREF="../../../com/sleepycat/db/Database.html#putNoDupData(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putNoDupData</A>, <A HREF="../../../com/sleepycat/db/Database.html#putNoOverwrite(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry)">putNoOverwrite</A>, <A HREF="../../../com/sleepycat/db/Database.html#remove(java.lang.String, java.lang.String, com.sleepycat.db.DatabaseConfig)">remove</A>, <A HREF="../../../com/sleepycat/db/Database.html#removeSequence(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.SequenceConfig)">removeSequence</A>, <A HREF="../../../com/sleepycat/db/Database.html#rename(java.lang.String, java.lang.String, java.lang.String, com.sleepycat.db.DatabaseConfig)">rename</A>, <A HREF="../../../com/sleepycat/db/Database.html#setConfig(com.sleepycat.db.DatabaseConfig)">setConfig</A>, <A HREF="../../../com/sleepycat/db/Database.html#sortMultipleKeyAndData(com.sleepycat.db.MultipleDataEntry, com.sleepycat.db.MultipleDataEntry)">sortMultipleKeyAndData</A>, <A HREF="../../../com/sleepycat/db/Database.html#sortMultipleKeyData(com.sleepycat.db.MultipleKeyDataEntry)">sortMultipleKeyData</A>, <A HREF="../../../com/sleepycat/db/Database.html#sortMultipleKeyOrData(com.sleepycat.db.MultipleDataEntry)">sortMultipleKeyOrData</A>, <A HREF="../../../com/sleepycat/db/Database.html#sync()">sync</A>, <A HREF="../../../com/sleepycat/db/Database.html#truncate(com.sleepycat.db.Transaction, boolean)">truncate</A>, <A HREF="../../../com/sleepycat/db/Database.html#upgrade(java.lang.String, com.sleepycat.db.DatabaseConfig)">upgrade</A>, <A HREF="../../../com/sleepycat/db/Database.html#verify(java.lang.String, java.lang.String, java.io.PrintStream, com.sleepycat.db.VerifyConfig, com.sleepycat.db.DatabaseConfig)">verify</A></CODE></TD>
273 </TR>
274 </TABLE>
275 &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
276 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
277 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
278 <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
279 </TR>
280 <TR BGCOLOR="white" CLASS="TableRowColor">
281 <TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
282 </TR>
283 </TABLE>
284 &nbsp;
285 <P>
286
287 <!-- ========= CONSTRUCTOR DETAIL ======== -->
288
289 <A NAME="constructor_detail"><!-- --></A>
290 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
291 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
292 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
293 <B>Constructor Detail</B></FONT></TH>
294 </TR>
295 </TABLE>
296
297 <A NAME="SecondaryDatabase(java.lang.String, java.lang.String, com.sleepycat.db.Database, com.sleepycat.db.SecondaryConfig)"><!-- --></A><H3>
298 SecondaryDatabase</H3>
299 <PRE>
300 public <B>SecondaryDatabase</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;fileName,
301 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;databaseName,
302 <A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A>&nbsp;primaryDatabase,
303 <A HREF="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</A>&nbsp;config)
304 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A>,
305 <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</A></PRE>
306 <DL>
307 <DD>Open a database.
308 <p>
309 The database is represented by the file and database parameters.
310 <p>
311 The currently supported database file formats (or <em>access
312 methods</em>) are Btree, Hash, Queue, and Recno. The Btree format is a
313 representation of a sorted, balanced tree structure. The Hash format
314 is an extensible, dynamic hashing scheme. The Queue format supports
315 fast access to fixed-length records accessed sequentially or by logical
316 record number. The Recno format supports fixed- or variable-length
317 records, accessed sequentially or by logical record number, and
318 optionally backed by a flat text file.
319 <p>
320 Storage and retrieval are based on key/data pairs; see <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A>
321 for more information.
322 <p>
323 Opening a database is a relatively expensive operation, and maintaining
324 a set of open databases will normally be preferable to repeatedly
325 opening and closing the database for each new query.
326 <p>
327 In-memory databases never intended to be preserved on disk may be
328 created by setting both the fileName and databaseName parameters to
329 null. Note that in-memory databases can only ever be shared by sharing
330 the single database handle that created them, in circumstances where
331 doing so is safe. The environment variable <code>TMPDIR</code> may
332 be used as a directory in which to create temporary backing files.
333 <p>
334 <P>
335 <DL>
336 <DT><B>Parameters:</B><DD><CODE>fileName</CODE> - The name of an underlying file that will be used to back the database.
337 On Windows platforms, this argument will be interpreted as a UTF-8
338 string, which is equivalent to ASCII for Latin characters.
339 <p><DD><CODE>databaseName</CODE> - An optional parameter that allows applications to have multiple
340 databases in a single file. Although no databaseName parameter needs
341 to be specified, it is an error to attempt to open a second database in
342 a physical file that was not initially created using a databaseName
343 parameter. Further, the databaseName parameter is not supported by the
344 Queue format.
345 <p><DD><CODE>primaryDatabase</CODE> - a database handle for the primary database that is to be indexed.
346 <p><DD><CODE>config</CODE> - The secondary database open attributes. If null, default attributes are used.
347 <DT><B>Throws:</B>
348 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE>
349 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/FileNotFoundException.html?is-external=true" title="class or interface in java.io">FileNotFoundException</A></CODE></DL>
350 </DL>
351
352 <!-- ============ METHOD DETAIL ========== -->
353
354 <A NAME="method_detail"><!-- --></A>
355 <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
356 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
357 <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
358 <B>Method Detail</B></FONT></TH>
359 </TR>
360 </TABLE>
361
362 <A NAME="openCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)"><!-- --></A><H3>
363 openCursor</H3>
364 <PRE>
365 public <A HREF="../../../com/sleepycat/db/Cursor.html" title="class in com.sleepycat.db">Cursor</A> <B>openCursor</B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
366 <A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A>&nbsp;config)
367 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
368 <DL>
369 <DD>Return a cursor into the database.
370 <p>
371 <P>
372 <DD><DL>
373 <DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sleepycat/db/Database.html#openCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)">openCursor</A></CODE> in class <CODE><A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A></CODE></DL>
374 </DD>
375 <DD><DL>
376 <DT><B>Parameters:</B><DD><CODE>txn</CODE> - To use a cursor for writing to a transactional database, an explicit
377 transaction must be specified. For read-only access to a transactional
378 database, the transaction may be null. For a non-transactional database,
379 the transaction must be null.
380 <p>
381 To transaction-protect cursor operations, cursors must be opened and closed
382 within the context of a transaction, and the txn parameter specifies the
383 transaction context in which the cursor will be used.
384 <p><DD><CODE>config</CODE> - The cursor attributes. If null, default attributes are used.
385 <p>
386 <DT><B>Returns:</B><DD>A database cursor.
387 <p>
388 <DT><B>Throws:</B>
389 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
390 </DD>
391 </DL>
392 <HR>
393
394 <A NAME="openSecondaryCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)"><!-- --></A><H3>
395 openSecondaryCursor</H3>
396 <PRE>
397 public <A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db">SecondaryCursor</A> <B>openSecondaryCursor</B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
398 <A HREF="../../../com/sleepycat/db/CursorConfig.html" title="class in com.sleepycat.db">CursorConfig</A>&nbsp;config)
399 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
400 <DL>
401 <DD>Obtain a cursor on a database, returning a <code>SecondaryCursor</code>.
402 Calling this method is the equivalent of calling <A HREF="../../../com/sleepycat/db/SecondaryDatabase.html#openCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)"><CODE>openCursor(com.sleepycat.db.Transaction, com.sleepycat.db.CursorConfig)</CODE></A> and
403 casting the result to <A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db"><CODE>SecondaryCursor</CODE></A>.
404 <p>
405 <P>
406 <DD><DL>
407 <DT><B>Parameters:</B><DD><CODE>txn</CODE> - To use a cursor for writing to a transactional database, an explicit
408 transaction must be specified. For read-only access to a transactional
409 database, the transaction may be null. For a non-transactional database,
410 the transaction must be null.
411 <p>
412 To transaction-protect cursor operations, cursors must be opened and closed
413 within the context of a transaction, and the txn parameter specifies the
414 transaction context in which the cursor will be used.
415 <p><DD><CODE>config</CODE> - The cursor attributes. If null, default attributes are used.
416 <p>
417 <DT><B>Returns:</B><DD>A secondary database cursor.
418 <p>
419 <DT><B>Throws:</B>
420 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
421 </DD>
422 </DL>
423 <HR>
424
425 <A NAME="getPrimaryDatabase()"><!-- --></A><H3>
426 getPrimaryDatabase</H3>
427 <PRE>
428 public <A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A> <B>getPrimaryDatabase</B>()</PRE>
429 <DL>
430 <DD>Returns the primary database associated with this secondary database.
431 <p>
432 <P>
433 <DD><DL>
434
435 <DT><B>Returns:</B><DD>the primary database associated with this secondary database.</DL>
436 </DD>
437 </DL>
438 <HR>
439
440 <A NAME="getConfig()"><!-- --></A><H3>
441 getConfig</H3>
442 <PRE>
443 public <A HREF="../../../com/sleepycat/db/DatabaseConfig.html" title="class in com.sleepycat.db">DatabaseConfig</A> <B>getConfig</B>()
444 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
445 <DL>
446 <DD>Return this Database object's configuration.
447 <p>
448 This may differ from the configuration used to open this object if
449 the database existed previously.
450 <p>
451 <P>
452 <DD><DL>
453 <DT><B>Overrides:</B><DD><CODE><A HREF="../../../com/sleepycat/db/Database.html#getConfig()">getConfig</A></CODE> in class <CODE><A HREF="../../../com/sleepycat/db/Database.html" title="class in com.sleepycat.db">Database</A></CODE></DL>
454 </DD>
455 <DD><DL>
456
457 <DT><B>Returns:</B><DD>This Database object's configuration.
458 <p>
459 <p>
460 <DT><B>Throws:</B>
461 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
462 </DD>
463 </DL>
464 <HR>
465
466 <A NAME="getSecondaryConfig()"><!-- --></A><H3>
467 getSecondaryConfig</H3>
468 <PRE>
469 public <A HREF="../../../com/sleepycat/db/SecondaryConfig.html" title="class in com.sleepycat.db">SecondaryConfig</A> <B>getSecondaryConfig</B>()
470 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
471 <DL>
472 <DD>Returns a copy of the secondary configuration of this database.
473 <p>
474 <P>
475 <DD><DL>
476
477 <DT><B>Returns:</B><DD>a copy of the secondary configuration of this database.
478 <p>
479 <p>
480 <DT><B>Throws:</B>
481 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
482 </DD>
483 </DL>
484 <HR>
485
486 <A NAME="get(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
487 get</H3>
488 <PRE>
489 public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>get</B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
490 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;key,
491 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;pKey,
492 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;data,
493 <A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)
494 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
495 <DL>
496 <DD>Retrieves the key/data pair with the given key. If the matching key has
497 duplicate values, the first data item in the set of duplicates is returned.
498 Retrieval of duplicates requires the use of <A HREF="../../../com/sleepycat/db/Cursor.html" title="class in com.sleepycat.db"><CODE>Cursor</CODE></A> operations.
499 <p>
500 <P>
501 <DD><DL>
502 <DT><B>Parameters:</B><DD><CODE>txn</CODE> - For a transactional database, an explicit transaction may be specified to
503 transaction-protect the operation, or null may be specified to perform the
504 operation without transaction protection. For a non-transactional database,
505 null must be specified.
506 <p><DD><CODE>key</CODE> - the secondary key
507 used as input. It must be initialized with a non-null byte array by the
508 caller.
509 <p><DD><CODE>pKey</CODE> - the primary key
510 returned as output. Its byte array does not need to be initialized by the
511 caller.
512 <p><DD><CODE>data</CODE> - the primary data
513 returned as output. Its byte array does not need to be initialized by the
514 caller.
515 <p><DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
516 <p>
517 <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
518 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>.
519 <p>
520 <p>
521 <DT><B>Throws:</B>
522 <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
523 deadlock.
524 <p>
525 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
526 <p>
527 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
528 </DD>
529 </DL>
530 <HR>
531
532 <A NAME="getSearchBoth(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
533 getSearchBoth</H3>
534 <PRE>
535 public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getSearchBoth</B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
536 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;key,
537 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;pKey,
538 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;data,
539 <A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)
540 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
541 <DL>
542 <DD>Retrieves the key/data pair with the specified secondary and primary key, that
543 is, both the primary and secondary key items must match.
544 <p>
545 <P>
546 <DD><DL>
547 <DT><B>Parameters:</B><DD><CODE>txn</CODE> - For a transactional database, an explicit transaction may be specified to
548 transaction-protect the operation, or null may be specified to perform the
549 operation without transaction protection. For a non-transactional database,
550 null must be specified.<DD><CODE>key</CODE> - the secondary key
551 used as input. It must be initialized with a non-null byte array by the
552 caller.<DD><CODE>pKey</CODE> - the primary key
553 used as input. It must be initialized with a non-null byte array by the
554 caller.<DD><CODE>data</CODE> - the primary data
555 returned as output. Its byte array does not need to be initialized by the
556 caller.
557 <p><DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
558 <p>
559 <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
560 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>.
561 <p>
562 <p>
563 <DT><B>Throws:</B>
564 <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
565 deadlock.
566 <p>
567 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
568 <p>
569 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.</DL>
570 </DD>
571 </DL>
572 <HR>
573
574 <A NAME="getSearchRecordNumber(com.sleepycat.db.Transaction, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.DatabaseEntry, com.sleepycat.db.LockMode)"><!-- --></A><H3>
575 getSearchRecordNumber</H3>
576 <PRE>
577 public <A HREF="../../../com/sleepycat/db/OperationStatus.html" title="class in com.sleepycat.db">OperationStatus</A> <B>getSearchRecordNumber</B>(<A HREF="../../../com/sleepycat/db/Transaction.html" title="class in com.sleepycat.db">Transaction</A>&nbsp;txn,
578 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;key,
579 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;pKey,
580 <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db">DatabaseEntry</A>&nbsp;data,
581 <A HREF="../../../com/sleepycat/db/LockMode.html" title="class in com.sleepycat.db">LockMode</A>&nbsp;lockMode)
582 throws <A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></PRE>
583 <DL>
584 <DD>Retrieves the key/data pair associated with the specific numbered record of the database.
585 <p>
586 The data field of the specified key must be a byte array containing a
587 record number, as described in <A HREF="../../../com/sleepycat/db/DatabaseEntry.html" title="class in com.sleepycat.db"><CODE>DatabaseEntry</CODE></A>. This determines
588 the record to be retrieved.
589 <p>
590 For this method to be called, the underlying database must be of type
591 Btree, and it must have been configured to support record numbers.
592 <p>
593 If this method fails for any reason, the position of the cursor will be
594 unchanged.
595 <P>
596 <DD><DL>
597 <DT><B>Parameters:</B><DD><CODE>key</CODE> - the secondary key
598 returned as output. Its byte array does not need to be initialized by the
599 caller.<DD><CODE>pKey</CODE> - the primary key
600 returned as output. Its byte array does not need to be initialized by the
601 caller.<DD><CODE>data</CODE> - the primary data
602 returned as output. Multiple results can be retrieved by passing an object
603 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
604 need to be initialized by the caller.<DD><CODE>lockMode</CODE> - the locking attributes; if null, default attributes are used.
605 <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
606 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>.
607 <DT><B>Throws:</B>
608 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</A></CODE> - if a DatabaseEntry parameter is null or
609 does not contain a required non-null byte array.
610 <p>
611 <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
612 deadlock.
613 <p>
614 <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an invalid parameter was specified.
615 <p>
616 <DD><CODE><A HREF="../../../com/sleepycat/db/DatabaseException.html" title="class in com.sleepycat.db">DatabaseException</A></CODE> - if a failure occurs.
617 <p></DL>
618 </DD>
619 </DL>
620 <!-- ========= END OF CLASS DATA ========= -->
621 <HR>
622
623
624 <!-- ======= START OF BOTTOM NAVBAR ====== -->
625 <A NAME="navbar_bottom"><!-- --></A>
626 <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
627 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
628 <TR>
629 <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
630 <A NAME="navbar_bottom_firstrow"><!-- --></A>
631 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
632 <TR ALIGN="center" VALIGN="top">
633 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
634 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
635 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
636 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SecondaryDatabase.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
637 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
638 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
639 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
640 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
641 </TR>
642 </TABLE>
643 </TD>
644 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
645 <b>Berkeley DB</b><br><font size="-1"> version 5.3.28</font></EM>
646 </TD>
647 </TR>
648
649 <TR>
650 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
651 &nbsp;<A HREF="../../../com/sleepycat/db/SecondaryCursor.html" title="class in com.sleepycat.db"><B>PREV CLASS</B></A>&nbsp;
652 &nbsp;<A HREF="../../../com/sleepycat/db/SecondaryKeyCreator.html" title="interface in com.sleepycat.db"><B>NEXT CLASS</B></A></FONT></TD>
653 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
654 <A HREF="../../../index.html?com/sleepycat/db/SecondaryDatabase.html" target="_top"><B>FRAMES</B></A> &nbsp;
655 &nbsp;<A HREF="SecondaryDatabase.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
656 &nbsp;<SCRIPT type="text/javascript">
657 <!--
658 if(window==top) {
659 document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
660 }
661 //-->
662 </SCRIPT>
663 <NOSCRIPT>
664 <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
665 </NOSCRIPT>
666
667
668 </FONT></TD>
669 </TR>
670 <TR>
671 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
672 SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
673 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
674 DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
675 </TR>
676 </TABLE>
677 <A NAME="skip-navbar_bottom"></A>
678 <!-- ======== END OF BOTTOM NAVBAR ======= -->
679
680 <HR>
681 <font size=1>Copyright (c) 1996, 2013 Oracle and/or its affiliates. All rights reserved.</font>
682 </BODY>
683 </HTML>