-
Notifications
You must be signed in to change notification settings - Fork 13
/
Client.java
87 lines (68 loc) · 1.79 KB
/
Client.java
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package com.mysticcoders.mysticpaste.model;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
* @author <a href="mailto:gcastro@mysticcoders.com">Guillermo Castro</a>
* @version $Revision$ $Date$
*/
@Entity
/*
@Table(name = "CLIENTS")
@NamedQueries({@NamedQuery(name = "client.id", query = "from Client c where c.id = :id"),
@NamedQuery(name = "client.findByToken", query = "from Client c where c.token = :token")})
*/
public class Client implements Serializable {
private static final long serialVersionUID = -7477330789867279559L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "CLIENT_ID")
private int id;
@Basic
@Column(name = "CLIENT_TOKEN")
private String token;
@Basic
@Column(name = "DESCR", nullable = true)
private String description;
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_TS")
private Date created;
@Basic
@Column(name = "VALID_FLG")
private boolean isValid;
public Client() {
}
public Client(String token) {
this.token = token;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public boolean isValid() {
return isValid;
}
public void setValid(boolean valid) {
isValid = valid;
}
}