-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCity.java
More file actions
46 lines (38 loc) · 773 Bytes
/
City.java
File metadata and controls
46 lines (38 loc) · 773 Bytes
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
package fsm.domain;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
public class City {
@Id
@GeneratedValue
@Column(name="id")
int id;
@ManyToOne
@JoinColumn(name="country_id")
int countryId;
@Column(name="name")
String name;
public City() {
super();
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getCountryId() {
return countryId;
}
public void setCountryId(int countryId) {
this.countryId = countryId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}