1
<!--$Id: dbt_bulk_class.html,v 1.1.2.1 2001/07/23 20:40:23 jbj Exp $-->
2
<!--Copyright 1997-2001 by Sleepycat Software, Inc.-->
3
<!--All rights reserved.-->
6
<title>Berkeley DB: DbMultipleDataIterator</title>
7
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
8
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
11
<a name="2"><!--meow--></a>
12
<table width="100%"><tr valign=top>
14
<h1>DbMultipleDataIterator</h1>
17
<a href="../api_java/java_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
22
import com.sleepycat.db.*;
24
public class DbMultipleDataIterator
26
public DbMultipleDataIterator(Dbt data);
28
public boolean next(Dbt data);
31
public class DbMultipleKeyDataIterator
33
public DbMultipleKeyDataIterator(Dbt data);
35
public boolean next(Dbt key, Dbt data);
38
public class DbMultipleRecnoDataIterator
40
public DbMultipleRecnoDataIterator(Dbt data);
42
public boolean next(Dbt key, Dbt data);
46
<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
47
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
48
<a href="../api_java/dbt_class.html">Dbt</a> returned by those interfaces will refer to a buffer that
49
is filled with data. Access to that data is through the following
51
<p>All instances of the bulk retrieval classes may be used only once,
52
and to traverse the bulk retrieval buffer in the forward direction
53
only. However, they are nondestructive, so multiple iterators can be
54
instantiated and used on the same returned data <a href="../api_java/dbt_class.html">Dbt</a>.
56
<p><dt>DbMultipleDataIterator<dd>This class is used to iterate through data returned using the
57
<a href="../api_java/dbc_get.html#DB_MULTIPLE">Db.DB_MULTIPLE</a> flag from a database belonging to any access method.
58
The constructor takes the data <a href="../api_java/dbt_class.html">Dbt</a> returned by the call to
59
<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>
60
flag. The next() method takes a <a href="../api_java/dbt_class.html">Dbt</a> that will be filled in with
61
a reference to a buffer, a size, and an offset that together yield the
62
next data item in the original bulk retrieval buffer. The next() method
63
returns false if no more data are available, and true otherwise.
64
<p><dt>DbMultipleKeyDataIterator<dd>This class is used to iterate through data returned using the
65
<a href="../api_java/dbc_get.html#DB_MULTIPLE_KEY">Db.DB_MULTIPLE_KEY</a> flag from a database belonging to the Btree or
66
Hash access methods. The constructor takes the data <a href="../api_java/dbt_class.html">Dbt</a>
67
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
68
<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,
69
one for a key and one for a data item, that will each be filled in with
70
a reference to a buffer, a size, and an offset that together yield the
71
next key or data item in the original bulk retrieval buffer. The next()
72
method returns false if no more data are available, and true
74
<p><dt>DbMultipleRecnoDataIterator<dd>This class is used to iterate through data returned using the
75
<a href="../api_java/dbc_get.html#DB_MULTIPLE_KEY">Db.DB_MULTIPLE_KEY</a> flag from a database belonging to the Recno or
76
Queue access methods. The constructor takes the data <a href="../api_java/dbt_class.html">Dbt</a>
77
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
78
<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,
79
one for a key and one for a data item, that will each be filled in with
80
a reference to a buffer, a size, and an offset that together yield the
81
next key or data item in the original bulk retrieval buffer. The record
82
number contained in the key item should be accessed using the
83
<a href="../api_java/dbt_class.html">Dbt.get_recno_key_data</a> method. The next() method returns false if no
84
more data are available, and true otherwise.
87
<table width="100%"><tr><td><br></td><td align=right>
88
<a href="../api_java/java_index.html"><img src="../images/api.gif" alt="API"></a><a href="../reftoc.html"><img src="../images/ref.gif" alt="Ref"></a>
90
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>