2
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
4
<!--See the file LICENSE for redistribution information.-->
7
<title>Berkeley DB: DbMultipleDataIterator</title>
8
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
12
<a name="2"><!--meow--></a>
13
<table width="100%"><tr valign=top>
15
<h1>DbMultipleDataIterator</h1>
18
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
23
import com.sleepycat.db.*;
25
public class DbMultipleDataIterator
27
public DbMultipleDataIterator(Dbt data);
29
public boolean next(Dbt data);
32
public class DbMultipleKeyDataIterator
34
public DbMultipleKeyDataIterator(Dbt data);
36
public boolean next(Dbt key, Dbt data);
39
public class DbMultipleRecnoDataIterator
41
public DbMultipleRecnoDataIterator(Dbt data);
43
public boolean next(Dbt key, Dbt data);
47
<p>If either of the <a href="../api_java/dbc_get.html#DB_MULTIPLE">Db.DB_MULTIPLE</a> or <a href="../api_java/dbc_get.html#DB_MULTIPLE_KEY">Db.DB_MULTIPLE_KEY</a> flags
48
were specified to the <a href="../api_java/db_get.html">Db.get</a> or <a href="../api_java/dbc_get.html">Dbc.get</a> method, the data
49
<a href="../api_java/dbt_class.html">Dbt</a> returned by those interfaces will refer to a buffer that
50
is filled with data. Access to that data is through the following
52
<p>All instances of the bulk retrieval classes may be used only once,
53
and to traverse the bulk retrieval buffer in the forward direction
54
only. However, they are nondestructive, so multiple iterators can be
55
instantiated and used on the same returned data <a href="../api_java/dbt_class.html">Dbt</a>.
57
<p><dt>DbMultipleDataIterator<dd>This class is used to iterate through data returned using the
58
<a href="../api_java/dbc_get.html#DB_MULTIPLE">Db.DB_MULTIPLE</a> flag from a database belonging to any access method.
59
The constructor takes the data <a href="../api_java/dbt_class.html">Dbt</a> returned by the call to
60
<a href="../api_java/db_get.html">Db.get</a> or <a href="../api_java/dbc_get.html">Dbc.get</a> that used the <a href="../api_java/dbc_get.html#DB_MULTIPLE">Db.DB_MULTIPLE</a>
61
flag. The next() method takes a <a href="../api_java/dbt_class.html">Dbt</a> that will be filled in with
62
a reference to a buffer, a size, and an offset that together yield the
63
next data item in the original bulk retrieval buffer. The next() method
64
returns false if no more data are available, and true otherwise.
65
<p><dt>DbMultipleKeyDataIterator<dd>This class is used to iterate through data returned using the
66
<a href="../api_java/dbc_get.html#DB_MULTIPLE_KEY">Db.DB_MULTIPLE_KEY</a> flag from a database belonging to the Btree or
67
Hash access methods. The constructor takes the data <a href="../api_java/dbt_class.html">Dbt</a>
68
returned by the call to <a href="../api_java/db_get.html">Db.get</a> or <a href="../api_java/dbc_get.html">Dbc.get</a> that used the
69
<a href="../api_java/dbc_get.html#DB_MULTIPLE_KEY">Db.DB_MULTIPLE_KEY</a> flag. The next() method takes two <a href="../api_java/dbt_class.html">Dbt</a>s,
70
one for a key and one for a data item, that will each be filled in with
71
a reference to a buffer, a size, and an offset that together yield the
72
next key or data item in the original bulk retrieval buffer. The next()
73
method returns false if no more data are available, and true
75
<p><dt>DbMultipleRecnoDataIterator<dd>This class is used to iterate through data returned using the
76
<a href="../api_java/dbc_get.html#DB_MULTIPLE_KEY">Db.DB_MULTIPLE_KEY</a> flag from a database belonging to the Recno or
77
Queue access methods. The constructor takes the data <a href="../api_java/dbt_class.html">Dbt</a>
78
returned by the call to <a href="../api_java/db_get.html">Db.get</a> or <a href="../api_java/dbc_get.html">Dbc.get</a> that used the
79
<a href="../api_java/dbc_get.html#DB_MULTIPLE_KEY">Db.DB_MULTIPLE_KEY</a> flag. The next() method takes two <a href="../api_java/dbt_class.html">Dbt</a>s,
80
one for a key and one for a data item, that will each be filled in with
81
a reference to a buffer, a size, and an offset that together yield the
82
next key or data item in the original bulk retrieval buffer. The record
83
number contained in the key item should be accessed using the
84
<a href="../api_java/dbt_class.html">Dbt.get_recno_key_data</a> method. The next() method returns false if no
85
more data are available, and true otherwise.
88
<table width="100%"><tr><td><br></td><td align=right>
89
<a href="../api_java/c_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
91
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>