2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.mailreaderjpa;
18
19 import java.io.Serializable;
20 import java.sql.Timestamp;
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.GeneratedValue;
24 import javax.persistence.GenerationType;
25 import javax.persistence.Id;
26 import javax.persistence.NamedQueries;
27 import javax.persistence.NamedQuery;
28 import javax.persistence.Version;
29
30 /***
31 * <p>JPA entity class for the <code>MAILREADER_PROTOCOLS</code> table.</p>
32 */
33 @Entity(name="mailreader_protocols")
34 @NamedQueries({
35 @NamedQuery(name="Protocol.findAll", query="SELECT p FROM mailreader_protocols p")
36 })
37 public class Protocol implements Serializable {
38
39 @Id
40 @Column(name="protocol_id")
41 @GeneratedValue(strategy = GenerationType.AUTO)
42 private Integer id;
43
44 /*** Creates a new instance of Protocol */
45 public Protocol() {
46 }
47
48 public Integer getId() {
49 return id;
50 }
51
52 public void setId(Integer id) {
53 this.id = id;
54 }
55
56 public int hashCode() {
57 if (getId() != null) {
58 return getId().intValue();
59 } else {
60 return super.hashCode();
61 }
62 }
63
64 public boolean equals(Object obj) {
65 if ((obj instanceof Protocol)
66 && (getId() != null)) {
67 return getId().equals(((Protocol) obj).getId());
68 } else {
69 return false;
70 }
71 }
72
73 public String toString() {
74 return "org.apache.mailreaderjpa.Protocol[id=" + id + "]";
75 }
76
77 @Column(nullable=false)
78 private String description;
79 @Column(name="last_update")
80 @Version()
81 private Timestamp lastUpdate;
82
83 public String getDescription() {
84 return description;
85 }
86
87 public void setDescription(String description) {
88 this.description = description;
89 }
90
91 public Timestamp getLastUpdate() {
92 return lastUpdate;
93 }
94
95 public void setLastUpdate(Timestamp lastUpdate) {
96 this.lastUpdate = lastUpdate;
97 }
98
99 }