Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class PhoneDto {
- private String objectId;
- private String value;
- private Date created;
- private Date updated;
- public PhoneDto() {
- }
- public PhoneDto(String objectId, String value, Date created, Date updated) {
- this.objectId = objectId;
- this.value = value;
- this.created = created;
- this.updated = updated;
- }
- public PhoneDto(@NonNull Phone phone) {
- this.objectId = phone.getId();
- this.value = phone.getValue();
- this.created = phone.getCreated();
- this.updated = phone.getUpdated();
- }
- @NonNull
- public Phone map() {
- final Phone phone = new Phone();
- phone.setId(objectId);
- phone.setValue(value);
- phone.setCreated(created);
- phone.setUpdated(updated);
- return phone;
- }
- public String getObjectId() {
- return objectId;
- }
- public void setObjectId(String objectId) {
- this.objectId = objectId;
- }
- public String getValue() {
- return value;
- }
- public void setValue(String value) {
- this.value = value;
- }
- public Date getCreated() {
- return created;
- }
- public void setCreated(Date created) {
- this.created = created;
- }
- public Date getUpdated() {
- return updated;
- }
- public void setUpdated(Date updated) {
- this.updated = updated;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement