-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathStore.java
More file actions
76 lines (56 loc) · 1.3 KB
/
Copy pathStore.java
File metadata and controls
76 lines (56 loc) · 1.3 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
package jpa;
import com.fasterxml.jackson.annotation.JsonManagedReference;
import javax.persistence.*;
import java.util.Set;
@Entity
public class Store {
@Id
private int id;
@Column
private String name;
@Column
private String address;
@Column
private int owner;
@Column
private int creation_date;
@OneToMany(mappedBy = "store", fetch = FetchType.LAZY)
@JsonManagedReference
private Set<Product> products;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getOwner() {
return owner;
}
public void setOwner(int owner) {
this.owner = owner;
}
public int getCreation_date() {
return creation_date;
}
public void setCreation_date(int creation_date) {
this.creation_date = creation_date;
}
public Set<Product> getProducts() {
return products;
}
public void setProducts(Set<Product> products) {
this.products = products;
}
}