[ http://issues.apache.org/jira/browse/BEANUTILS-197?page=all ]

Henri Yandell updated BEANUTILS-197:
------------------------------------

      Bugzilla Id:   (was: 32642)
    Fix Version/s: LATER THAN 1.8.0

> [beanutils] Copy Specific Properties
> ------------------------------------
>
>                 Key: BEANUTILS-197
>                 URL: http://issues.apache.org/jira/browse/BEANUTILS-197
>             Project: Commons BeanUtils
>          Issue Type: Improvement
>          Components: Bean / Property Utils
>         Environment: Operating System: All
> Platform: All
>            Reporter: Charlie Jones
>            Priority: Minor
>             Fix For: LATER THAN 1.8.0
>
>
> In building an application my team came across a need to copy specific 
> properties only.  I realize this is a trivial enhancement however it would 
> save others who find the same need from coding a solution themselves.
> Below is an implementation ( The one we used ).
> ------------Code-------------
> public static void copyProperties(Object to, Object from, String[] 
> properties) 
> throws IllegalAccessException, 
>        InvocationTargetException,
>        NoSuchMethodException {
>     for (int idx = 0; idx < properties.length; idx++) {
>       copyProperty( to, 
>                       propertyNames[i], 
>                       getPropertyUtils().getProperty( from, 
> propertyNames[i]));
>     }
> }
> -------------Code---------------

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to