ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashanth Sukumaran <prashanthsukuma...@yahoo.com>
Subject Re: How come the float value does not get into my Bean
Date Wed, 19 Jan 2005 23:44:02 GMT
Sorry about that.

My mistake. Was looking at the wrong thing.

- Prashanth.



--- Prashanth Sukumaran <prashanthsukumaran@yahoo.com> wrote:

> Hi,
> 
> I am trying is very simple query.  How come the float values does not get into my bean.
> What is it that i am doing wrong here?
> 
> I am using p6spy to see the query and the result of the query.  This is the output i
am seeing.
> |resultset|select 38.01 avghlr, 4 yearId, 1406 shopId from dual 		   
> |shopId = 1406, yearId = 4
> 
> I am seeing shopId and yearId only and not the avghlr.
> 
> Thanks
> Prashanth.
> 
>   <typeAlias alias="avgHourlyLaborRateClass"
> type="com.wirelessmob.dataaccess.beans.pci.AvgHourlyLaborRate"/>
>   
>   <resultMap id="avgHourlyLaborRateResult" class="avgHourlyLaborRateClass">
> 		<result property="shopId" column="shopId"/>
> 		<result property="yearId" column="yearId"/>
> 		<result property="averageHourlyLaborRate" column="avghlr" javaType="float"/>
>   </resultMap>
> 
>   <select id="getAverageHourlyLaborRate" resultMap="avgHourlyLaborRateResult"
> parameterClass="map">
>   		select 38.01 avghlr, 4 yearId, 1406 shopId from dual
>   </select>
> 
> 
> 
> 
> /**
>  *
>  * @author Prashanth Sukumaran
>  * @version $Revision: 1.0 $ $Date: Jan 18, 2005 6:14:00 PM $
>  *
>  */
> public class AvgHourlyLaborRate {
> 	
>     private int yearId;
>     private int shopId;  
>     private float averageHourlyLaborRate;
>     
>     
> 	/**
> 	 * @return Returns the averageHourlyLaborRate.
> 	 */
> 	public float getAverageHourlyLaborRate() {
> 		return averageHourlyLaborRate;
> 	}
> 	/**
> 	 * @param averageHourlyLaborRate The averageHourlyLaborRate to set.
> 	 */
> 	public void setAverageHourlyLaborRate(float averageHourlyLaborRate) {
> 		this.averageHourlyLaborRate = averageHourlyLaborRate;
> 	}
> 	/**
> 	 * @return Returns the shopId.
> 	 */
> 	public int getShopId() {
> 		return shopId;
> 	}
> 	/**
> 	 * @param shopId The shopId to set.
> 	 */
> 	public void setShopId(int shopId) {
> 		this.shopId = shopId;
> 	}
> 	/**
> 	 * @return Returns the yearId.
> 	 */
> 	public int getYearId() {
> 		return yearId;
> 	}
> 	/**
> 	 * @param yearId The yearId to set.
> 	 */
> 	public void setYearId(int yearId) {
> 		this.yearId = yearId;
> 	}
> }
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

Mime
View raw message