ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Tim" <Tim.C...@NielsenMedia.com>
Subject RE: parameter map
Date Tue, 10 Jan 2006 18:39:59 GMT
One has nothing to do with the other.
parameterClass = Map is for passing in more than one parameter.
resultClass = String is a suggestion to be able to get back the results
correctly

________________________________

From: Tony Qian [mailto:daqiqian2@aol.com] 
Sent: Tuesday, January 10, 2006 1:07 PM
To: user-java@ibatis.apache.org
Subject: RE: parameter map




radha rukmani wrote on 1/9/2006, 11:04 AM: 

	
	Thanks Beekman, 
	
	It works if it is set as a String. 
	

So, you can pass in more than one parameters if you set the
parameterClass="string". How so?

thanks,
Tony


	 
	
	
	Niels Beekman <n.beekman@wis.nl> <mailto:n.beekman@wis.nl>
wrote:
	

		
		
		Try setting resultClass to "String", you told iBATIS
already that you want a List by using queryForList().
		
		
		
		
		
________________________________

		
		From: radha rukmani [mailto:radharukmani@yahoo.com] 
		Sent: maandag 9 januari 2006 16:35
		To: user-java@ibatis.apache.org
		Subject: parameter map
		
		
		
		
		Hi 
		
		
		
		
		
		I am trying to pass some parameters into the select
statement. 
		
		
		
		
		
		My select statement in ibatis, is like this.
		
		
		
		<select id="getTransferPendingPlates"
parameterClass="java.util.Map" resultClass="java.util.List">
		
		
		SELECT 
		
		
		GBL_PLATE_BAR_CODE
		
		
		FROM GTN_FERT_PLATE 
		
		
		WHERE LOCATION_STATUS=#locationStatus#
		
		
		AND 
		
		
		TRANSFER_STATUS=#transferStatus#
		
		
		</select>
		
		
		
		
		
		And i am calling this from the java class, like this.
		
		
		
		
		
	
parameterMap.put("transferStatus",TRANSFER_STATUS_PENDING);
	
parameterMap.put("locationStatus",LOCATION_STATUS_PERMANENT);
		  try{
		   pendingPlates =
(List)sqlMap.queryForList("getTransferPendingPlates",parameterMap);
		  }catch(Exception e)
		
		
		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
		
		
		
		
		
		Thanks.
		
		
________________________________

		
		Yahoo! Photos
		Ring in the New Year with Photo Calendars
<http://us.rd.yahoo.com/mail_us/taglines/photos/*http:/pa.yahoo.com/*htt
p:/us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http:/pg.photos.ya
hoo.com/ph/page?.file=calendar_splash.html&.dir=> . Add photos, events,
holidays, whatever.

	
	
	

	

________________________________

	Yahoo! Photos
	Ring in the New Year with Photo Calendars
<http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pa.yahoo.com/*ht
tp://us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http://pg.photos
.yahoo.com/ph//page?.file=calendar_splash.html&.dir=> . Add photos,
events, holidays, whatever. 


Mime
View raw message