1 package org.lanyonm.playground.domain;
2
3 import java.io.Serializable;
4 import java.util.Date;
5
6
7
8
9 public class Todo implements Serializable {
10
11 private static final long serialVersionUID = 8865480730387267259L;
12 private long id;
13 private String title;
14 private Date dateCreated;
15 private Date dateModified;
16
17
18
19 public long getId() {
20 return id;
21 }
22
23
24
25 public void setId(long id) {
26 this.id = id;
27 }
28
29
30
31 public String getTitle() {
32 return title;
33 }
34
35
36
37 public void setTitle(String title) {
38 this.title = title;
39 }
40
41
42
43 public Date getDateCreated() {
44 return dateCreated;
45 }
46
47
48
49 public void setDateCreated(Date dateCreated) {
50 this.dateCreated = dateCreated;
51 }
52
53
54
55 public Date getDateModified() {
56 return dateModified;
57 }
58
59
60
61 public void setDateModified(Date dateModified) {
62 this.dateModified = dateModified;
63 }
64
65 public boolean equals(Object obj) {
66 if (obj == null) return false;
67 if (obj == this) return true;
68 return (obj instanceof Todo &&
69 ((Todo) obj).getId() == this.getId() &&
70 (this.getTitle() == null ? ((Todo) obj).getTitle() == null : this.getTitle().equals(((Todo) obj).getTitle())) &&
71 (this.getDateCreated() == null ? ((Todo) obj).getDateCreated() == null : this.getDateCreated().equals(((Todo) obj).getDateCreated())));
72 }
73
74 public String toString() {
75 return new StringBuilder("domain.Todo: title=\"").append(this.title)
76 .append("\", dateCreated=\"").append(this.dateCreated)
77 .append("\"").toString();
78 }
79 }