Apache Commons Beanutils package provides convenient methods to help you copy data between java beans.
To copy properties between beans you can use:
where target and source are both java beans.
If type conversion is needed, then use BeanUtils.copyProperties instead.
Don't use nested classes for this. I had some problems using these utilities with my nested classes.