723d8d6801e45180cd823fd418fb48d730368ebf
[mir.git] / source / mir / core / model / BreakingNewsItem.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 BreakingNewsItem implements Serializable {
11
12     /** identifier field */
13     private Integer id;
14
15     /** persistent field */
16     private String text;
17
18     /** persistent field */
19     private java.util.Date webdbCreate;
20
21     /** full constructor */
22     public BreakingNewsItem(java.lang.String text, java.util.Date webdbCreate) {
23         this.text = text;
24         this.webdbCreate = webdbCreate;
25     }
26
27     /** default constructor */
28     public BreakingNewsItem() {
29     }
30
31     public java.lang.Integer getId() {
32         return this.id;
33     }
34
35     public void setId(java.lang.Integer id) {
36         this.id = id;
37     }
38
39     public java.lang.String getText() {
40         return this.text;
41     }
42
43     public void setText(java.lang.String text) {
44         this.text = text;
45     }
46
47     public java.util.Date getWebdbCreate() {
48         return this.webdbCreate;
49     }
50
51     public void setWebdbCreate(java.util.Date webdbCreate) {
52         this.webdbCreate = webdbCreate;
53     }
54
55     public String toString() {
56         return new ToStringBuilder(this)
57             .append("id", getId())
58             .toString();
59     }
60
61     public boolean equals(Object other) {
62         if ( !(other instanceof BreakingNewsItem) ) return false;
63         BreakingNewsItem castOther = (BreakingNewsItem) other;
64         return new EqualsBuilder()
65             .append(this.getId(), castOther.getId())
66             .isEquals();
67     }
68
69     public int hashCode() {
70         return new HashCodeBuilder()
71             .append(getId())
72             .toHashCode();
73     }
74
75 }