I have a collection, a List of Map, the map is Map<String, String>
. I need to query this collection with comparison, logical, like, not in operators. Something like SQL.
I will be populating the list from a database stored procedure, so I am not sure about the size. But, I guess the size should not be more than 10,000 records.
While posting this I am having a look at Apache functors, I don't know if they will help here.
Other way that I am thinking of is using the in-memory database Derby to achieve this.
Please let me know of any Java library or any other way of doing this.
The maps in the list will be like below:
Map<String, String> m1 = new Map<String, String>();
m1.put("name","Mark");
m1.put("age","21");
m1.put("city","some city");
Map<String, String> m1 = new Map<String, String>();
m1.put("name","David");
m1.put("age","25");
m1.put("city","other city");
I need to query the list to get Map which has:
name=Mark
name=Mark and age > 30
city not in "other city"