blob: 7475ba055add1ab1355147fa74297ac7c427b7e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
package lq;
import java.util.Date;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Quote {
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;
@Persistent
private Date timestamp;
@Persistent
private Boolean approved;
@Persistent
private Date quoteDate;
@Persistent
private String author;
@Persistent
private String content;
@Persistent
private String ip;
public Quote(Date quoteDate, String author, String content, String ip) {
this.quoteDate = quoteDate;
this.author = author;
this.content = content;
this.ip = ip;
this.timestamp = new Date();
}
public Long getId() { return id; }
public Date getTimestamp() { return timestamp; }
public Boolean getApproved() { return approved; }
public Date getQuoteDate() { return quoteDate; }
public String getAuthor() { return author; }
public String getContent() { return content; }
public String getIp() { return ip; }
public void setId(Long id) { this.id = id; }
public void setTimestamp(Date timestamp) { this.timestamp = timestamp; }
public void setApproved(Boolean approved) { this.approved = approved; }
public void setQuoteDate(Date quoteDate) { this.quoteDate = quoteDate; }
public void setAuthor(String author) { this.author = author; }
public void setContent(String content) { this.content = content; }
public void setIp(String ip) { this.ip = ip; }
}
|