NetworkAssociation.java
2.33 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
package fi.codecrew.moya.model;
import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import fi.codecrew.moya.enums.NetworkAssociationStatus;
@Entity
@Table(name = "network_associations")
public class NetworkAssociation extends GenericEntity {
private static final long serialVersionUID = -7621152614442737756L;
@JoinColumn(name="event")
private LanEvent event;
@JoinColumn(name="event_user")
private EventUser eventUser;
@Column(name="ip")
private String ip;
@Column(name="mac")
private String mac;
@JoinColumn(name="place")
private Place place;
@Column(name = "create_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Calendar createTime = Calendar.getInstance();
@Column(name = "modify_time", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Calendar modifyTime = Calendar.getInstance();
@Column(name="status", nullable = false)
@Enumerated(EnumType.STRING)
private NetworkAssociationStatus status;
public LanEvent getEvent() {
return event;
}
public void setEvent(LanEvent event) {
this.event = event;
}
public EventUser getEventUser() {
return eventUser;
}
public void setEventUser(EventUser eventUser) {
this.eventUser = eventUser;
}
public String getIP() {
return ip;
}
public String getIp() {
return ip;
}
public void setIP(String ip) {
this.ip = ip;
}
public String getMAC() {
return mac;
}
public String getMac() {
return mac;
}
public void setMAC(String mac) {
this.mac = mac;
}
public Place getPlace() {
return place;
}
public void setPlace(Place place) {
this.place = place;
}
public Calendar getCreateTime() {
return createTime;
}
public void setCreateTime(Calendar createTime) {
this.createTime = createTime;
}
public Calendar getModifyTime() {
return modifyTime;
}
public void setModifyTime(Calendar modifyTime) {
this.modifyTime = modifyTime;
}
public NetworkAssociationStatus getStatus() {
return status;
}
public void setStatus(NetworkAssociationStatus status) {
this.status = status;
}
}