Are there any published
patterns for data filtering?
What I need is a way to provide a generic filtering mechanism that can be applied to Value Objects.
A user could fill in a table on a form with selection criteria for selecting sales orders, for example.
In the simplest case, this information could be used to generate a query. However, because of the complexity of our environment, the simplest case is rare.
What would happen, is that some of the criteria entered can be used to generate the query. Other aspects would need to be applied to the returned data Value Objects to filter the data. (Value Objects VO's are used to isolate the business layer from the database layer)
one thought is a filter interface with some sort of factory object supplying to needed filters to the application.
The underlying goal, is to have a generic way of doing this so that we don't have to re-invent the wheel for each application that requires the ability to do filtering of data. We also want to make sure that whatever we doesn't require the users to know the underlying structure of the data either.
Hope this made sense, and if so any ideas???