The first requirement is for the database layer. You have to implement a data access class implementing this interface. Therefore, you have to implement the methods as specified by the interface. The seoond requirement comes from the GUI or middle tier (depending on the design decision you choose). Therefore, these two do not have to match exactly. However, if you implement the method as specified in the interface your business method should not be a problem (as you stated yourself). My suggestion would be to thing in different tiers or layers and develop them independently of each other.
Thanks Thomas, I understand what you mean. The problem is that the database layer is more relaxed on the searching than the business layer. Even though I implement my business rule as exact match, when it comes to db layer, it will still return all the records that partially match the criteria. Unless I do some more checking on the returned result set.
...when it comes to db layer, it will still return all the records that partially match the criteria. Unless I do some more checking on the returned result set.
Agreed. In my opinion the extra checks are business logic and should be performed by a business layer. The database layer delivers all partial matches and the business layer restricts them to exact matches.