commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Konstantinov ...@iu6.ru>
Subject Re: [betwixt] Bean to Bean mapping
Date Mon, 09 Oct 2006 18:34:22 GMT
ConvertUtilsObjectStringConverter uses BeanConverter to map Date to  
String, but I want map Date to BeanDate in all classes.

On 09.10.2006, at 22:25, Sweetland, Jesse wrote:

> The DateBean class is pretty much as written below.  You would have  
> to add a
> getXXXDateBean method for every date property that you want to wrap.
>
> If you don't mind using deprecated APIs, you could also create a  
> custom
> org.apache.commons.betwixt.strategy.TypeBindingStrategy that returns
> COMPLEX_TYPE for Date.class and then create a java/util/ 
> Date.betwixt mapping
> file with the properties "day", "month", and "year" (java.util.Date  
> has
> getDay(), getMonth(), and getYear(), which are deprecated).  That  
> would save
> you from having to create a separate bean and add all the extra  
> getters and
> setters, but it would apply to *all* dates, which may not be  
> desirable.
>
>
> -----Original Message-----
> From: Peter Konstantinov [mailto:pa@iu6.ru]
> Sent: Monday, October 09, 2006 12:52 PM
> To: Jakarta Commons Users List
> Cc: Peter Konstantinov
> Subject: Re: [betwixt] Bean to Bean mapping
>
> Can you help to write DateBean.betwixt?
>
> Is it possible to do this without writing getMyDateBean method in all
> classes using Date?


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message