• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

delete and findByCriteria method

 
xi brian
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
* Returns an array of record numbers that match the specified
* criteria. Field n in the database file is described by
* criteria[n]. A null value in criteria[n] matches any field
* value. A non-null value in criteria[n] matches any field
* value that begins with criteria[n]. (For example, "Fred"
* matches "Fred" or "Freddy".)

public long[] findByCriteria(String[] criteria)

if my criteria[0] = "abc", in my record, i have 2 fields from 2 records

1. abcedf
2. eeeabce

i believe that the first one is correct.

but how about "eeeabce", it does not match from beginning, so should i consider it as valid feild?


* Deletes a record, making the record number and associated disk
* storage available for reuse.
* Throws SecurityException if the record is locked with a cookie
* other than lockCookie.
public void deleteRecord(long recNo, long lockCookie)throws RecordNotFoundException, SecurityException

so delete method actually does not delete the record info, but it overwrite the 00 by using 0x800. the record file is retrievable!

am i right?

thank you
 
mohamed sulibi
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi;

NO
YES

please search in the forum about more than this issues...

best regards.
Mohamed Darim.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic