ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Qian" <daqiqi...@aol.com>
Subject RE: parameter map
Date Tue, 10 Jan 2006 18:06:56 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
<font face="Arial,sans-serif"><font size="2"><br>
<br>
<span type="cite">radha rukmani wrote on 1/9/2006, 11:04 AM:</span>
</font></font>
<p><font face="Arial,sans-serif" size="2"></font></p>
<blockquote type="cite"   style="border-left: thin solid blue; padding-left: 10px; margin-left:
0pt;"><font   face="Arial,sans-serif" size="2"></font>
  <div><font face="Arial,sans-serif" size="2">Thanks Beekman, </font></div>
  <font face="Arial,sans-serif" size="2"> </font>
  <div><font face="Arial,sans-serif" size="2">It works if it is set as
a String. </font></div>
  <font face="Arial,sans-serif" size="2"> </font></blockquote>
<font size="2"><font face="Arial,sans-serif">So, you can pass in more
than one parameters if you set the parameterClass="string". How so?<br>
<br>
thanks,<br>
Tony<br>
</font></font>
<blockquote type="cite"   style="border-left: thin solid blue; padding-left: 10px; margin-left:
0pt;">
  <div><font face="Arial,sans-serif" size="2">&nbsp;</font></div>
  <font face="Arial,sans-serif" size="2"> </font>
  <div><font face="Arial,sans-serif" size="2"><br>
  <b><i>Niels Beekman <a class="moz-txt-link-rfc2396E" href="mailto:n.beekman@wis.nl">&lt;n.beekman@wis.nl&gt;</a></i></b>
wrote:</font></div>
  <font face="Arial,sans-serif" size="2"> </font>
  <blockquote class="replbq"   style="border-left: 2px solid rgb(16, 16, 255); padding-left:
5px; margin-left: 5px;"><font   face="Arial,sans-serif" size="2"> <o:SmartTagType
name="PersonName"   namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType>
    </font>
    <meta content="Microsoft Word 11 (filtered medium)" name="Generator">
    <style><style>  v\:* {behavior:url(#default#VML);}  o\:* {behavior:url(#default#VML);}
 w\:* {behavior:url(#default#VML);}  .shape {behavior:url(#default#VML);}  </style></style>
    <style><style>  st1\:*{behavior:url(#default#ieooui) }  </style></style>
    <style><style>  <!--   /* Font Definitions */   @font-face   {font-family:Tahoma;
  panose-1:2 11 6 4 3 5 4 4 2 4;}   /* Style Definitions */   p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0cm;   margin-bottom:.0001pt;   font-size:12.

 0pt;  

 font-family:"Times New Roman";}  a:link, span.MsoHyperlink   {color:blue;   text-decoration:underline;}
 a:visited, span.MsoHyperlinkFollowed   {color:blue;   text-decoration:underline;}  p   {mso-margin-top-alt:auto;
  margin-right:0cm;   mso-margin-bottom-alt:auto;   margin-left:0cm;   font-size:12.0pt; 
 font-family:"Times New Roman";}  span.EmailStyle18   {mso-style-type:personal-reply;   font-family:Arial;
  color:navy;}  @page Section1   {size:612.0pt 792.0pt;   margin:72.0pt 90.0pt 72.0pt 90.0pt;}
 div.Section1   {page:Section1;}  -->  </style></style>
    <div class="Section1"><font face="Arial,sans-serif" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Arial"><font size="2"><font color="navy"><font color="navy">Try
setting resultClass to “String”, you told iBATIS already that you want
a List by using queryForList().<o:p></o:p></font></font></font></font></font></div>
    <font face="Arial,sans-serif" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Arial"><font size="2"><font color="navy"><font color="navy"><o:p>&nbsp;</o:p></font></font></font></font></font></div>
    <font face="Arial,sans-serif" size="2"></font><font face="Arial"   color="navy"
size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal" style="text-align: center;" align="center"><font   face="Arial"
color="navy" size="2"><font face="Times New Roman"   size="3"><span style="font-size:
12pt;">
    <hr tabindex="-1" align="center" width="100%" size="2"> </span></font></font></div>
    <font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><b><font
  face="Tahoma" size="2"><font face="Tahoma"><font size="2">From:</font></font></font></b><font
  face="Tahoma" size="2"><font face="Tahoma"><font size="2"> radha
rukmani [<a class="moz-txt-link-freetext" href="mailto:radharukmani@yahoo.com">mailto:radharukmani@yahoo.com</a>]
<br>
    <b><span style="font-weight: bold;">Sent:</span></b> maandag 9
januari 2006 16:35<br>
    <b><span style="font-weight: bold;">To:</span></b> <st1:PersonName
  w:st="on"><a class="moz-txt-link-abbreviated" href="mailto:user-java@ibatis.apache.org">user-java@ibatis.apache.org</a></st1:PersonName><br>
    <b><span style="font-weight: bold;">Subject:</span></b> parameter
map</font></font></font><o:p></o:p></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;"><o:p>&nbsp;</o:p></span></font></font></div>
    <font face="Arial" color="navy" size="2"> </font>
    <div id="RTEContent"><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi <o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">I am
trying to pass some parameters into the select&nbsp;statement. <o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">My
select statement in ibatis, is like this.<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" color="teal" size="2"><font size="2"><font   color="teal"><font
color="teal">&lt;</font></font></font></font><font   color="#3f7f7f"
size="2"><font size="2"><font color="#3f7f7f"><font   color="#3f7f7f">select
</font></font></font></font><font   color="#7f007f" size="2"><font
size="2"><font color="#7f007f"><font   color="#7f007f">id</font></font></font></font><font
size="2"><span   style="font-size: 10pt;">=<font color="#2a00ff"><font color="#2a00ff"><font
  color="#2a00ff">"getTransferPendingPlates" </font></font></font><font
  color="#7f007f"><font color="#7f007f"><font color="#7f007f">parameterClass</font></font></font>=<font
  color="#2a00ff"><font color="#2a00ff"><font color="#2a00ff">"java.util.Map"
    </font></font></font><font color="#7f007f"><font color="#7f007f"><font
  color="#7f007f">resultClass</font></font></font>=<font color="#2a00ff"><font
  color="#2a00ff"><font color="#2a00ff">"java.util.List"</font></font></font><font
  color="teal"><font color="teal"><font color="teal">&gt;<o:p></o:p></font></font></font></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="2"><span style="font-size: 10pt;">SELECT <o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="2"><span style="font-size: 10pt;">GBL_PLATE_BAR_CODE<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="2"><span style="font-size: 10pt;">FROM
GTN_FERT_PLATE <o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="2"><span style="font-size: 10pt;">WHERE
LOCATION_STATUS=#locationStatus#<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="2"><span style="font-size: 10pt;">AND <o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="2"><span style="font-size: 10pt;">TRANSFER_STATUS=#transferStatus#<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" color="teal" size="2"><font size="2"><font   color="teal"><font
color="teal">&lt;/</font></font></font></font><font   size="2"
3f7f7f=""><span style="font-size: 10pt;">select<font   color="teal"><font
color="teal"><font color="teal">&gt;</font></font></font></span></font><o:p></o:p></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" color="black" size="2"><font size="2"><font   color="black"><font
color="black">And i am calling this from the java
class, like this.</font></font></font></font><o:p></o:p></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" color="teal" size="2"><font size="2"><font   color="teal"><font
color="teal">&nbsp;&nbsp;parameterMap.put("transferStatus",TRANSFER_STATUS_PENDING);<br>
&nbsp;&nbsp;parameterMap.put("locationStatus",LOCATION_STATUS_PERMANENT);<br>
&nbsp;&nbsp;try{<br>
&nbsp;&nbsp;&nbsp;pendingPlates =
(List)sqlMap.queryForList("getTransferPendingPlates",parameterMap);<br>
&nbsp;&nbsp;}catch(Exception e)</font></font></font></font><o:p></o:p></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times    New   Roman" color="black" size="2"><font size="2"><font   color="black"><font
color="black">Now my pendingPlates list shows an
empty list of strings. but if i run the same query in oracle, i get
some result. What am i doing wrong. Could any one please help</font></font></font></font><o:p></o:p></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;<o:p></o:p></span></font></font></div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div><font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" color="black" size="2"><font size="2"><font   color="black"><font
color="black">Thanks.</font></font></font></font><font   color="teal"
size="2"><font size="2"><font color="teal"><font   color="teal"><o:p></o:p></font></font></font></font></font></div>
    </div>
    </div>
    <font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal" style="text-align: center;" align="center"><font   face="Arial"
color="navy" size="2"><font face="Times New Roman"   size="3"><span style="font-size:
12pt;">
    <hr align="center" width="100%" size="1"> </span></font></font></div>
    <font face="Arial" color="navy" size="2"> </font>
    <div class="MsoNormal"><font face="Arial" color="navy" size="2"><font 
 face="Times New Roman" size="3"><span style="font-size: 12pt;">Yahoo!
Photos<br>
Ring in the New Year with <a   href="http://us.rd.yahoo.com/mail_us/taglines/photos/*http:/pa.yahoo.com/*http:/us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http:/pg.photos.yahoo.com/ph/page?.file=calendar_splash.html&amp;.dir=">Photo
Calendars</a>. Add photos, events, holidays, whatever.<o:p></o:p></span></font></font></div>
    </div>
  </blockquote>
  <font face="Arial" color="navy" size="2"> </font>
  <div><font face="Arial" color="navy" size="2"><br>
  </font></div>
  <p><font face="Arial,sans-serif" size="2"></font><font face="Arial"
  color="navy" size="2"> </font></p>
  <hr size="1"><font face="Arial" color="navy" size="2">Yahoo! Photos<br>
Ring in the New Year with <a   href="http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pa.yahoo.com/*http://us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http://pg.photos.yahoo.com/ph//page?.file=calendar_splash.html&amp;.dir=">Photo
Calendars</a>. Add photos, events, holidays, whatever.
  </font></blockquote>
</body>
</html>

Mime
View raw message