1 |
package dk.thoerup.bukkit.hoeruputils.message; |
2 |
|
3 |
import java.sql.Timestamp; |
4 |
|
5 |
import javax.persistence.Entity; |
6 |
import javax.persistence.GeneratedValue; |
7 |
import javax.persistence.Id; |
8 |
|
9 |
@Entity |
10 |
public class MessageBean { |
11 |
|
12 |
@Id |
13 |
@GeneratedValue |
14 |
int id; |
15 |
|
16 |
String player; |
17 |
String message; |
18 |
|
19 |
boolean isread; |
20 |
|
21 |
Timestamp createtime; |
22 |
|
23 |
public int getId() { |
24 |
return id; |
25 |
} |
26 |
|
27 |
public void setId(int id) { |
28 |
this.id = id; |
29 |
} |
30 |
|
31 |
public String getPlayer() { |
32 |
return player; |
33 |
} |
34 |
|
35 |
public void setPlayer(String player) { |
36 |
this.player = player; |
37 |
} |
38 |
|
39 |
public String getMessage() { |
40 |
return message; |
41 |
} |
42 |
|
43 |
public void setMessage(String message) { |
44 |
this.message = message; |
45 |
} |
46 |
|
47 |
public boolean isIsread() { |
48 |
return isread; |
49 |
} |
50 |
|
51 |
public void setIsread(boolean isread) { |
52 |
this.isread = isread; |
53 |
} |
54 |
|
55 |
public Timestamp getCreatetime() { |
56 |
return createtime; |
57 |
} |
58 |
|
59 |
public void setCreatetime(Timestamp createtime) { |
60 |
this.createtime = createtime; |
61 |
} |
62 |
|
63 |
public void setCreatetimeNow() { |
64 |
this.createtime = new Timestamp( System.currentTimeMillis() ) ; |
65 |
} |
66 |
|
67 |
} |