I want to copy an entire object which doesn't implement clone method.
The BeanUtils.copyProperties(obj1, obj2) does the copy however makes the process tedious as we need to register which are the value will be null.
ex:
ConvertUtils.register(new DateConverter(null), Date.class);
BeanUtils.copyProperties(emp1, emp2);
where the emp2 will have some date methods where the property might be null..
Assume there might be 100 of properties might be null and we need to just ignore the same..
I need the exact copy of the object.
Could someone suggest the best way or a utility to achieve this?
Thanks.