ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido García Bernardo <ggb...@tid.es>
Subject how to traverse a complete table using resultClass="java.util.HashMap" ?
Date Wed, 08 Mar 2006 18:29:56 GMT
Hello !

I can read in the ibatis SQL maps developer guide:

----
<statement id="getProductCount" resultClass="java.util.HashMap">
select * from PRODUCT
</statement>

The above would basically give you a Map representation of the returned 
ResultSet.
----

Could anyone elaborate on how exactly this Map represents the returned 
ResultSet?
In example, how could I traverse the following PRODUCT table using a Map?

id   name             stock    price
--   -------------     -----     ------
1    DVD player    80        30
2    CD player      10         20

Java code that dumps this table with no need to define a resultMap would 
be appreciated :)
Thank you,

-- 
Guido García Bernardo

Tfn. +34 983 54 89 08
ITDEUSTO - Valladolid


Mime
View raw message