Name
RecordEnumeration
Synopsis
RecordEnumeration is an interface that provides
method to enumerate, or iterate, through a set of records in a
RecordStore. The RecordEnumeration
may be constructed so that only a subset of the records appear. In
addition, it may also specify the order in which the records are presented.
Once the enumeration has been constructed, records may be traversed
either forwards or backwards, and the traversal direction may be changed at
any time.
A RecordEnumeration is obtained by calling the
RecordStore
enumerateRecords() method,
which accepts three parameters that determine the content and ordering of
the enumeration:
- filter
A
RecordFilterthat selects which records will appear in the enumeration. If this argument isnull, the enumeration will include all of the records.- comparator
A
RecordComparatorthat determines the order in which the records appear in the enumeration. If this parameter isnull, the record order is undefined.- keepUpdated
If this parameter has the value
false, the set of records that appears in the enumeration, as well as their order, is determined once and is thereafter fixed, even if the underlyingRecordStorecontent changes. If this parameter istrue, changes in theRecordStorewill be immediately visible in the enumeration. Note that setting this parameter totruecan be very expensive as each change to theRecordStorerequires a potentially time-consuming operation to rebuild the enumeration.
Once an enumeration has been created, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access