commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "usha rani" <usha_k...@hotmail.com>
Subject Re: copyproperties
Date Tue, 21 Jan 2003 02:48:28 GMT
Hi Craig

I wrongly mentioned the return datatype to int its actually java.sql.Date. 
can you tell me why the error is coming for me is there any thing i am doing 
wrong here.

Thanks
usha


>From: "Craig R. McClanahan" <craigmcc@apache.org>
>Reply-To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
>To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
>Subject: Re: copyproperties
>Date: Mon, 20 Jan 2003 17:29:48 -0800 (PST)
>
>
>
>On Mon, 20 Jan 2003, usha rani wrote:
>
> > Date: Mon, 20 Jan 2003 15:11:33 +0800
> > From: usha rani <usha_kaza@hotmail.com>
> > Reply-To: Jakarta Commons Users List <commons-user@jakarta.apache.org>
> > To: commons-user@jakarta.apache.org
> > Subject: Re: copyproperties
> >
> > Hi
> >
> > i am getting the following error
> >
> > my classes are
> >
> > public class OrigBean {
> >     ...
> >     public String getApplydate();
> >     public void setApplydate(String applydate);
> >     ...
> >   }
> >
> >   public class DestBean {
> >     ...
> >     public int getApplydate();
> >     public void setApplydate(java.sql.Date applydate);
> >     ...
> >   }
> >
>
>Your DestBean violates JavaBeans requirements for properties.  The data
>type returned by the getter has to match the data type of the setter
>parameter.  The JDK will think that DestBean does not have an "applydate"
>property at all, which will certainly lead to problems.
>
>It's also not legal to have two setApplydate() methods with different data
>types (even though such overloading is legal from a Java perspective).
>
>Craig
>
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:commons-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:commons-user-help@jakarta.apache.org>


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus


Mime
View raw message