I created a small method that compares two arrays according to the findByCriteria(
String[]) specification.
I compare field by field, if one criterium is null, then assume the comparison is true. If the criterium is non-null then I compare them using the String.startsWith() method.
If all the field comparisons are true (either because the criterium is null or the criterium matches the field), then I add the field number into the long[] required by the findByCriteria() method..
Therefore If I pass an criteria[] that just contains nulll valuse I would get all the records back. On the other hand, I just provide one criterium in the criteria[] and not even one record matches, then the method findByCriteria should return an empty array.
[ July 31, 2006: Message edited by: Edwin Dalorzo ]