*
The moose likes Java in General and the fly likes need to query on list of map object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "need to query on list of map object " Watch "need to query on list of map object " New topic
Author

need to query on list of map object

sudheer kiran
Ranch Hand

Joined: Jun 26, 2008
Posts: 237

hi all i have a List<Map<String,String>>> tableRowsMap.

its a list of map.
each map consists column name as key and row value as value.

my question is :
can i query on this list.
i need to find our the row for which i will pass some parameters.
please suggest.

i have option to change List<Map<String,String>>> to any collection type also.

Sudheer
SCWCD, SCJP 5
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

You can just loop through the list, and inside that loop check if the map contains what you're looking for.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
Don't get me started about those stupid light bulbs.
 
subject: need to query on list of map object
 
Similar Threads
need to get column names in resultant table of sql query
How to retrieve metadata in ibatis
generics and maps
is object a list of string or only a string?
How to copy a SQL result into a Map