893864f2cdd5a74352a026465525509bb5f9fbb4
[mir.git] / source / mir / core / model / Message.java
1 package mir.core.model;
2
3 import java.io.Serializable;
4
5 import org.apache.commons.lang.builder.EqualsBuilder;
6 import org.apache.commons.lang.builder.HashCodeBuilder;
7 import org.apache.commons.lang.builder.ToStringBuilder;
8
9 /** @author Hibernate CodeGenerator */
10 public class Message implements Serializable {
11
12     /** identifier field */
13     private Integer id;
14
15     /** nullable persistent field */
16     private String title;
17
18     /** persistent field */
19     private String description;
20
21     /** persistent field */
22     private String creator;
23
24     /** persistent field */
25     private java.util.Date webdbCreate;
26
27     /** full constructor */
28     public Message(java.lang.String title, java.lang.String description, java.lang.String creator, java.util.Date webdbCreate) {
29         this.title = title;
30         this.description = description;
31         this.creator = creator;
32         this.webdbCreate = webdbCreate;
33     }
34
35     /** default constructor */
36     public Message() {
37     }
38
39     /** minimal constructor */
40     public Message(java.lang.String description, java.lang.String creator, java.util.Date webdbCreate) {
41         this.description = description;
42         this.creator = creator;
43         this.webdbCreate = webdbCreate;
44     }
45
46     public java.lang.Integer getId() {
47         return this.id;
48     }
49
50     public void setId(java.lang.Integer id) {
51         this.id = id;
52     }
53
54     public java.lang.String getTitle() {
55         return this.title;
56     }
57
58     public void setTitle(java.lang.String title) {
59         this.title = title;
60     }
61
62     public java.lang.String getDescription() {
63         return this.description;
64     }
65
66     public void setDescription(java.lang.String description) {
67         this.description = description;
68     }
69
70     public java.lang.String getCreator() {
71         return this.creator;
72     }
73
74     public void setCreator(java.lang.String creator) {
75         this.creator = creator;
76     }
77
78     public java.util.Date getWebdbCreate() {
79         return this.webdbCreate;
80     }
81
82     public void setWebdbCreate(java.util.Date webdbCreate) {
83         this.webdbCreate = webdbCreate;
84     }
85
86     public String toString() {
87         return new ToStringBuilder(this)
88             .append("id", getId())
89             .toString();
90     }
91
92     public boolean equals(Object other) {
93         if ( !(other instanceof Message) ) return false;
94         Message castOther = (Message) other;
95         return new EqualsBuilder()
96             .append(this.getId(), castOther.getId())
97             .isEquals();
98     }
99
100     public int hashCode() {
101         return new HashCodeBuilder()
102             .append(getId())
103             .toHashCode();
104     }
105
106 }