Created
January 16, 2015 19:15
-
-
Save shekibobo/92f15c03b571fe9a42cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyModel newModel = getNewModel(); | |
MyModel oldModel = getOldModel(); | |
String newValue = null; | |
newValue = newModel.getName(); | |
if (newValue != null) { | |
oldModel.setName(newValue); | |
} | |
newValue = newModel.getEmail(); | |
if (newValue != null) { | |
oldModel.setEmail(newValue); | |
} | |
newValue = newModel.getAddress(); | |
if (newValue != null) { | |
oldModel.setAddress(newValue); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment