How to copy superclass object values to subclass object values?

If performance is not an issue here, you can copy all the properties from one class to the other making use of reflection.

Check this link to this other question that explains how to do it:

Copy all values from fields in one class to another through reflection

This other link will give you the code, without using BeanUtils:

http://blog.lexique-du-net.com/index.php?post/2010/04/08/Simple-properties-Mapper-by-reflection

I always make use of this kind of functions in my projects. Really usefull.

Tags:

Java