Apache Commons Beanutils

Apache Commons Beanutils package provides convenient methods to help you copy data between java beans.

To copy properties between beans you can use:

    PropertyUtils.copyProperties(target, source);

where target and source are both java beans.

If type conversion is needed, then use BeanUtils.copyProperties instead.

Nested Classes

Don't use nested classes for this. I had some problems using these utilities with my nested classes.