Hello Jack,
jack.tang wrote:
Quote:
I knew it can be done
PrimaryIndex primaryIndex = EntityStore....
EntityCursor<Ticket> items = primaryIndex.entities();
for (Ticket item : items) {
ret.add(item);
}
So how can i do the same thing using Cursor? Thanks. |
I'm not sure what you're asking. Are you asking how to iterate over
records using the Cursor class (in the base API)? If so, please see
the Getting Started Guide:
http://www.sleepycat.com/jedocs/Gett...ide/index.html
http://www.sleepycat.com/jedocs/Gett...e/Cursors.html
Or are you asking how to use the Java 5 "for each" loop with the Cursor
class? If so, that isn't possible because Cursor does not implement
the Iterable interface.
Does this answer your question?
Mark