ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <erlend.bjo...@aftenposten.no>
Subject How to force Integer instead BigDecimal with queryForMap for the value part ?
Date Tue, 30 Aug 2005 11:51:43 GMT
Hi there!
 
I have a queryForMap like this:
 
HashMap codes = (HashMap) sqlMap.queryForMap("retrieveAdminUserAccessCodes", "testUser", "CODE",
"VALUE"));
 
And the query like this:
 
    <select id="retrieveAdminUserAccessCodes" resultClass="java.util.HashMap" parameterClass="String">
        select
          CODE,
          VALUE
        from ADMINUSERACCESS
        where ADMINUSERNAME = #value#
    </select>
 
 
VALUE is NUMBER(5) in a Oracle 9.2 database, when I get it back, codes, 
the VALUE part is of type BigDecimal, is it possible to get it as an Integer instead ? hmm
 
Or is it other ways to do this in a better way ?
 
 
Thanks!
Erlend

Mime
View raw message