Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 1080 invoked from network); 13 Apr 2007 11:41:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Apr 2007 11:41:04 -0000 Received: (qmail 12679 invoked by uid 500); 13 Apr 2007 11:41:07 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 12669 invoked by uid 500); 13 Apr 2007 11:41:07 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 12658 invoked by uid 99); 13 Apr 2007 11:41:07 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2007 04:41:07 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [83.103.62.70] (HELO mailgateway.ads.it) (83.103.62.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2007 04:40:59 -0700 Received: from mailgateway.ads.it (unknown [127.0.0.1]) by mailgateway.ads.it (Symantec Mail Security) with ESMTP id B6F61398010 for ; Fri, 13 Apr 2007 13:40:36 +0200 (CEST) X-AuditID: 0a61fe14-9f0c9bb000000b75-c2-461f6c34d4fd Received: from mail.ads.it (mercurio.finmatica.local [10.97.30.5]) by mailgateway.ads.it (Symantec Mail Security) with ESMTP id 9090242400B for ; Fri, 13 Apr 2007 13:40:36 +0200 (CEST) Subject: queryForMap AND TypeHandler To: user-java@ibatis.apache.org X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: c.zecca@ads.it Date: Fri, 13 Apr 2007 13:40:21 +0200 X-MIMETrack: Serialize by Router on Mercurio/Minosse(Release 6.5.5|November 30, 2005) at 13/04/2007 13.40.21 MIME-Version: 1.0 Content-type: multipart/alternative; Boundary="0__=4EBBF82FDFAD1EF98f9e8a93df938690918c4EBBF82FDFAD1EF9" Content-Disposition: inline X-Brightmail-Tracker: AAAAAA== X-Virus-Checked: Checked by ClamAV on apache.org --0__=4EBBF82FDFAD1EF98f9e8a93df938690918c4EBBF82FDFAD1EF9 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable I need to load a Map whose value type is an Integer key type is basically a String (VARCHAR2) with some syntactic rul= es. It's corresponding o-o type is NomeGruppo.java. NomeGruppoTypeHandlerCallback is it's type handler that loads VARCHAR2 fields into well-formed objects of NomeGruppo type. The following code works fine with String keys ... Map lResult; try { lResult =3D (Map) lSqlMapClient.queryForMa= p( " selectGruppiRadice" , null , "NOME"= , "GRUPPO_ID" ); } catch (SQLException pException) { ... I would like to load a Map instead, using queryFor= Map along with the NomeGruppoTypeHandlerCallback . Is it possible? Any hint? Thanks in advance ciao Cesare= --0__=4EBBF82FDFAD1EF98f9e8a93df938690918c4EBBF82FDFAD1EF9 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable

I need to load a Map whose

    • value type is an Integer
    • key type is basically a String (VARCHAR2) with some syntactic rules. It's corresponding o-o type is <= font size=3D"2">NomeGruppo.java.

NomeGruppoTypeHandlerCallback is it's = type handler that loads VARCHAR2 fields into well-formed objects of Nom= eGruppo type.

The following code works fine with String keys

<select id=3D"selectGruppiRadice&qu= ot; resultClass=3D"java.util.HashMap">
select
NOME,
GRUPPO_ID
from IDENTIFICATORI_GRUPPO
where IDENTIFICATORE_DATO.IS_NOME_OK( NOME= ) =3D AFC_ERROR.OK
</select>


...
Map<String, Integer> lResult;        try
       {
        lResult =3D (Map<<= /font>String, Integer>) lSqlMapClient.queryForMap( "= selectGruppiRadice&qu= ot;
          , nul= l
          , "NOME"
    , "GRUPPO_ID"
          );
       }
       catch (SQLException pEx= ception)
       {
...


I would like to load a Map<<= font size=3D"2" color=3D"#000080">NomeGruppo
, Integer> instead, using queryForMap along with the NomeGruppo= TypeHandlerCallback .

Is it possible?
Any hint?

Thanks in advance
ciao

Cesare
= --0__=4EBBF82FDFAD1EF98f9e8a93df938690918c4EBBF82FDFAD1EF9--