Originally posted by kaymen ji:
Hi,
thanks Mark and Edwin. Yes, I have those
In my Database class. So that means as long as I providing those methods in my Database class, I could do something a little bit different on GUI side, is what you mean Mark?
Well in my implementation I have a DataClient class with two methods bookRoom(id, recNo) and search(Room searchCriteria, boolean exactMatch, boolean caseSensitive).
The room object is just a wrapper for the record data. In my search method if I want to return all records I send an empty room object to the method. This way it is also very easy to add in addtional search fields in the future.
For example If I want an exact match on a name / location I call data.find() to return all similar records and then discard the one that don't exactly match.
For example if I searched the location "Clare"
And find method returned
"Clare"
"Claregalway"
"Claremorris"
If exact match flag is set to trueI return only "Clare" to the client.
If it is false I return all three to the client.
Hope this helps,
Mark