• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RecordEnumeration. nextRecordId()

 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fellas,

Once a Record Store has been enumerated, there are many methods provided under RecordEnumeration Interface to maniputlate the enumeration...

One such a couple is, int nextRecordId() and int previousRecordId()

I will take int nextRecordId() to convey my problem...

this when invoked on record enumeration, returns the Record ID as an int...
The interesting part is, it advances the pointer too, to the position indicated by the return record ID..

since there isn't a "public byte[] getRecord()" defined by RecordEnumeration interface.... what use do we establish by the getting the record ID of the next element at the cost of pointer advancement...

please state a few usages of the above in practice..

Thanks in advance
 
Punit Raizada
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its funny... Never really thought about the advantages... was a bit frustated by this myself but then moved on and implemented the reading logic the way its done in the tutorials available.
 
Eduardo Marques
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
RecordEnumeration does not provide a getRecord() operation,
but RecordStore does ...

You can do the following:



Of course RecordEnumeration provides nextRecord() too, but the code above is useful if you want to access in each iteration both the record data and its id.
[ January 28, 2007: Message edited by: Eduardo Marques ]
 
Deepan Devadasan
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thats why you need expert...

Thats a useful implementation point..

Thanks folks..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic