Skip to content

Instantly share code, notes, and snippets.

@slmanju
Created January 3, 2018 04:10
Show Gist options
  • Save slmanju/b6c613b8297641d3a52d87b460f04e3c to your computer and use it in GitHub Desktop.
Save slmanju/b6c613b8297641d3a52d87b460f04e3c to your computer and use it in GitHub Desktop.
public TodoDto view() {
TodoDto dto = new TodoDto();
BeanUtils.copyProperties(this, dto);
return dto;
}
public static Todo valueOf(TodoDto dto) {
Todo todo = new Todo();
BeanUtils.copyProperties(dto, todo);
return todo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment