I am writing a Java application which fires multiple SQL queries and builds a data structure. All the attributes of data structure can not be fetched in single query. So I have to fire multiple queries and then combine all resultsets to get data for attributes.
To achieve this, I am planning to keep a View object having all the attributes. I will populate this VO and add it in the collection.
But I also have to filter the collection based on user defined filters (for ex: all employees whose name starts with 'A'). These filters can be set on any of the attribute.
Is there any efficient way of doing this? Any suggestions? What type of collection I should use? How can I filter collection objects?