Thanks for your reply.
I apologise for mis-spelling airport.
Originally posted by Michael Morris:
That's probably OK but may not be as efficient as verifying the field names first since you can short-circuit the search on the first invalid field. Also, how do you handle an ANY situation? It seems to me that yours is an additive method as opposed to the easier subtractive method of gathering the matching records.
Hi Michael, I am constructing HashMaps that maps field name with data value for both the criteria string and every record in DB and then comparing their entrySets(using containsAll()). (Not using the for loop for finding the record match)
I'm handling ANY condition like this :
I'm not adding the field to the criteria string if it has ANY value. If the criteria String is empty, then before constructing the Maps, it'll simply return getAllRecords()(method defined in Data which returns an array of DataInfo containg all records).
That's fine. That's exactly what I did. Since it is assumed that your program builds the criteria, that should always work.
Hope this helps,
Michael Morris
Thank you so much, Your advise & guidence really helps me a lot.
Thanks
Padmaja
[ September 27, 2002: Message edited by: Padmaja Prasad ]