commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: BeanUtils.copyProperties() case sensitivity
Date Sun, 05 Oct 2003 16:52:41 GMT
Tamer Salama wrote:

>Hello Everyone:
>
>My very first message to any of these lists...
>
>I'm trying to use PropUtils.copyProperties() and
>BeanUtils.copyProperties() to copy from a DynaBean (from a
>ResultSetDynaClass) to a regular JavaBean.
>
>The JavaBean has getter/setter methods in the following form:
>getOrderNumber()/setOrderNumber(String on) (mixed Case - following
>JavaBeans specs)
>
>The corresponding property in the DynaBean is "ordernumber" (all lower
>case - as derived from a Table's column names).
>
>The copyProperties() do not copy the ordernumber property from the
>DynaBean to my JavaBean.
>
>First: I hope I'm wrong, but is this because my accessor methods have
>mixed case.
>Second: How to overcome this? Are there any other utility methods to
>copy beans that I'm not aware of? I'm starting to write my own method,
>but was just wondering if any are available.
>  
>
BeanUtils follows the naming conventions in the JavaBeans specification:

  http://java.sun.com/products/javabeans/docs/spec.html

so the proper property name would be "orderNumber" in this particular case.

>Kindest regards,
>
>Tamer Salama
>  
>
Craig



---------------------------------------------------------------------
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