Hi,
See the following class
public class Parent {
private String name;
private int age;
private Date birthDate;
// getters and setters
}
Suppose i have created a parent object as follows
Parent parent = new Parent();
parent.setName("A meaningful name");
parent.setAge(20);
Notice according to code above birthDate property is null. Now i want to copy ONLY non null properties from parent object to another. Something like
SomeHelper.copyNonNullProperties(parent, anotherParent);
I need it because i want to update anotherParent object without overrides its non null with null values.
Do you know some helper like this one ?
I accept minimal code as answer whether no helper in mind
regards,