How to create query from HashMap?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7174987/how-can-i-obtain-values-of-key-value-pair-from-a-hashmap">How can I obtain values of key-value pair from a Hashmap?</a>  </p>
</blockquote>



<pre><code>QueryStats queryStats=new QueryStats();
Map parameterMap = request.getParameterMap()==null? null:new HashMap(request.getParameterMap());
System.out.println("Query2:" + parameterMap);

Collection newParamsValue=parameterMap.values();
Object newParams[]=newParamsValue.toArray();
StringBuffer strParam=new StringBuffer() ;
int l=newParams.length;
for(int i=0;i&lt;l;i++){
    strParam=strParam.append(newParams[i].toString());
}

output: Query2:{sortPrefix=[Ljava.lang.String;@1d66aa9, searsOnly=[Ljava.lang.String;@1f4bdca, globalPrefix=[Ljava.lang.String;@d81cda, indent=[Ljava.lang.String;@4e57ba, qt=[Ljava.lang.String;@1619137, wt=[Ljava.lang.String;@84c1f9, fq=[Ljava.lang.String;@1dae27f}
</code></pre>

<p>From this parameterMap, I want to create a query? How is it possible?</p>
