ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject RE: New to iBatis
Date Fri, 15 Jun 2007 21:35:32 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META format="flowed" plain; text Content-Type:>
<META content="MSHTML 6.00.6000.16481" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=866213221-15062007>Yes. Using a Map is very simple and very flexible. 
There are downsides to it so you need to weigh your options closely. But in the 
given scenario that you gave a Map would be the best fit. You can use a Map as 
either a parameter class, a result class or both. The choice is yours. That's 
the beauty of iBatis. It allows you to decide the best way to implement the 
solution for your problem without imposing 
restrictions.</SPAN></FONT></DIV><FONT face=Arial color=#0000ff 
size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> "Vinay Singh" &lt;vinays84@hotmail.com&gt;

[mailto:"Vinay Singh" &lt;vinays84@hotmail.com&gt;] <BR><B>Sent:</B>
Friday, 
June 15, 2007 2:00 PM<BR><B>To:</B> 
Christopher.Mathrusse@sybase.com<BR><B>Subject:</B> RE: New to 
iBatis<BR></FONT><BR></DIV>
<DIV></DIV><BR>So the parameterClass would become java.util.Map? 
<BR><BR><BR>&gt;From: Christopher.Mathrusse@sybase.com <BR>&gt;To:

user-java@ibatis.apache.org, vinays84@hotmail.com <BR>&gt;Subject: RE: New to 
iBatis <BR>&gt;Date: Fri, 15 Jun 2007 12:20:04 -0700 <BR>&gt; <BR>&gt;
<BR>&gt; 
<BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;Yes, you can do
that or you can pass in a 
java.util.Map <BR>&gt;that contains your values. This is probably the simpler. 
<BR>&gt; <BR>&gt;java.util.Map map = new <BR>&gt;java.util.Hashmap();

<BR>&gt;map.put("value1", date1); <BR>&gt;map.put("value2", date2); <BR>&gt;

<BR>&gt; <BR>&gt; <BR>&gt;From: vinays84 
<VINAYS84@HOTMAIL.COM><BR>&gt;[mailto:vinays84 <VINAYS84@HOTMAIL.COM>]

<BR>&gt;Sent: Friday, June 15, <BR>&gt;2007 12:12 PM <BR>&gt;To:

user-java@ibatis.apache.org <BR>&gt;Subject: Re: <BR>&gt;New to iBatis
<BR>&gt; 
<BR>&gt; <BR>&gt; <BR>&gt;Just as only a single object can be
passed in for the 
return <BR>&gt;class, can only <BR>&gt;a single object be passed in for
a 
parameter class? Consider <BR>&gt;the query: <BR>&gt; <BR>&gt;SELECT
movie_name 
FROM movies WHERE release_date between <BR>&gt;#value1# AND <BR>&gt;#value2#

<BR>&gt; <BR>&gt;Could I pass in two dates as parameters, or <BR>&gt;would
I 
have to create a class <BR>&gt;containing value1 and value2 as properties. 
<BR>&gt;(this class obviously would be <BR>&gt;created solely for this
one 
query). <BR>&gt;-- <BR>&gt; <BR>&gt;View this message in context:

<BR>&gt;http://www.nabble.com/New-to-iBatis-tf3922862.html#a11145189 
<BR>&gt;Sent from the <BR>&gt;iBATIS - User - Java mailing list archive
at 
Nabble.com. <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt; <BR>&gt;

<BR><BR>_________________________________________________________________ 
<BR>Need a break? Find your escape route with Live Search Maps. 
<BR>http://maps.live.com/default.aspx?ss=Restaurants~Hotels~Amusement%20Park&amp;cp=33.832922~-117.915659&amp;style=r&amp;lvl=13&amp;tilt=-90&amp;dir=0&amp;alt=-1000&amp;scene=1118863&amp;encType=1&amp;FORM=MGAC01

<BR><BR><BR></BODY></HTML>


Mime
View raw message