1 |
44995
|
panagiotis
|
package eu.dnetlib.goldoa.domain;
|
2 |
|
|
|
3 |
46463
|
panagiotis
|
import com.fasterxml.jackson.annotation.JsonBackReference;
|
4 |
|
|
|
5 |
44995
|
panagiotis
|
import java.io.Serializable;
|
6 |
|
|
import java.util.ArrayList;
|
7 |
|
|
import java.util.List;
|
8 |
|
|
|
9 |
|
|
import javax.persistence.*;
|
10 |
|
|
|
11 |
|
|
@Entity
|
12 |
45074
|
panagiotis
|
@Table(name="Publisher")
|
13 |
44995
|
panagiotis
|
public class Publisher implements Serializable {
|
14 |
|
|
private static final long serialVersionUID = 1L;
|
15 |
|
|
|
16 |
46705
|
panagiotis
|
@Id
|
17 |
|
|
@Column(columnDefinition = "text")
|
18 |
|
|
private String id;
|
19 |
|
|
@Column(columnDefinition = "float default 0")
|
20 |
44995
|
panagiotis
|
private float apc;
|
21 |
46138
|
panagiotis
|
@Column(columnDefinition = "float default 0")
|
22 |
46303
|
panagiotis
|
private double discount;
|
23 |
46138
|
panagiotis
|
@Column(columnDefinition = "text")
|
24 |
44995
|
panagiotis
|
private String email;
|
25 |
46138
|
panagiotis
|
@Column(columnDefinition = "text")
|
26 |
44995
|
panagiotis
|
private String name;
|
27 |
46138
|
panagiotis
|
@Column(columnDefinition = "text")
|
28 |
44995
|
panagiotis
|
private String source;
|
29 |
46738
|
panagiotis
|
|
30 |
46705
|
panagiotis
|
@Basic
|
31 |
|
|
@Convert( converter=CurrencyConverter.class )
|
32 |
|
|
private Currency apcCurrency;
|
33 |
44995
|
panagiotis
|
|
34 |
46738
|
panagiotis
|
@OneToOne(cascade = CascadeType.ALL)
|
35 |
45560
|
panagiotis
|
@JoinColumn(name = "bankAccount")
|
36 |
|
|
private BankAccount bankAccount;
|
37 |
45460
|
panagiotis
|
|
38 |
46463
|
panagiotis
|
@OneToMany(mappedBy = "pk.publisher", cascade=CascadeType.ALL,fetch = FetchType.LAZY)
|
39 |
|
|
@JsonBackReference
|
40 |
45560
|
panagiotis
|
private List<PublisherDiscount> publisherDiscount = new ArrayList<>();
|
41 |
45460
|
panagiotis
|
|
42 |
47067
|
panagiotis
|
@OneToMany( mappedBy = "publisher")
|
43 |
46705
|
panagiotis
|
@JsonBackReference(value = "contact")
|
44 |
47054
|
panagiotis
|
private List<User> contacts = new ArrayList<>();
|
45 |
44995
|
panagiotis
|
|
46 |
46915
|
panagiotis
|
@ManyToMany(fetch = FetchType.LAZY, mappedBy = "publishers")
|
47 |
|
|
@JsonBackReference(value = "budgets")
|
48 |
|
|
private List<Budget> budgets = new ArrayList<>();
|
49 |
46633
|
panagiotis
|
|
50 |
45560
|
panagiotis
|
public Publisher() {}
|
51 |
|
|
|
52 |
44995
|
panagiotis
|
public float getApc() {
|
53 |
|
|
return this.apc;
|
54 |
|
|
}
|
55 |
|
|
|
56 |
|
|
public void setApc(float apc) {
|
57 |
|
|
this.apc = apc;
|
58 |
|
|
}
|
59 |
|
|
|
60 |
45560
|
panagiotis
|
public Currency getApcCurrency() {
|
61 |
44995
|
panagiotis
|
return this.apcCurrency;
|
62 |
|
|
}
|
63 |
|
|
|
64 |
45560
|
panagiotis
|
public void setApcCurrency(Currency apcCurrency) {
|
65 |
44995
|
panagiotis
|
this.apcCurrency = apcCurrency;
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
|
69 |
|
|
|
70 |
46303
|
panagiotis
|
public double getDiscount() {
|
71 |
44995
|
panagiotis
|
return this.discount;
|
72 |
|
|
}
|
73 |
|
|
|
74 |
46303
|
panagiotis
|
public void setDiscount(double discount) {
|
75 |
44995
|
panagiotis
|
this.discount = discount;
|
76 |
|
|
}
|
77 |
|
|
|
78 |
|
|
public String getEmail() {
|
79 |
|
|
return this.email;
|
80 |
|
|
}
|
81 |
|
|
|
82 |
|
|
public void setEmail(String email) {
|
83 |
|
|
this.email = email;
|
84 |
|
|
}
|
85 |
|
|
|
86 |
|
|
public String getId() {
|
87 |
|
|
return this.id;
|
88 |
|
|
}
|
89 |
|
|
|
90 |
|
|
public void setId(String id) {
|
91 |
|
|
this.id = id;
|
92 |
|
|
}
|
93 |
|
|
|
94 |
|
|
public String getName() {
|
95 |
|
|
return this.name;
|
96 |
|
|
}
|
97 |
|
|
|
98 |
|
|
public void setName(String name) {
|
99 |
|
|
this.name = name;
|
100 |
|
|
}
|
101 |
|
|
|
102 |
|
|
public String getSource() {
|
103 |
|
|
return this.source;
|
104 |
|
|
}
|
105 |
|
|
|
106 |
|
|
public void setSource(String source) {
|
107 |
|
|
this.source = source;
|
108 |
|
|
}
|
109 |
|
|
|
110 |
45560
|
panagiotis
|
public BankAccount getBankAccount() {
|
111 |
|
|
return bankAccount;
|
112 |
45460
|
panagiotis
|
}
|
113 |
|
|
|
114 |
45560
|
panagiotis
|
public void setBankAccount(BankAccount bankAccount) {
|
115 |
|
|
this.bankAccount = bankAccount;
|
116 |
45460
|
panagiotis
|
}
|
117 |
45560
|
panagiotis
|
|
118 |
|
|
public List<PublisherDiscount> getPublisherDiscount() {
|
119 |
|
|
return publisherDiscount;
|
120 |
|
|
}
|
121 |
|
|
|
122 |
|
|
public void setPublisherDiscount(List<PublisherDiscount> publisherDiscount) {
|
123 |
|
|
this.publisherDiscount = publisherDiscount;
|
124 |
|
|
}
|
125 |
46633
|
panagiotis
|
|
126 |
46915
|
panagiotis
|
public List<Budget> getBudgets() {
|
127 |
|
|
return budgets;
|
128 |
46633
|
panagiotis
|
}
|
129 |
|
|
|
130 |
46915
|
panagiotis
|
public void setBudgets(List<Budget> budgets) {
|
131 |
|
|
this.budgets = budgets;
|
132 |
46633
|
panagiotis
|
}
|
133 |
47054
|
panagiotis
|
|
134 |
|
|
public List<User> getContacts() {
|
135 |
|
|
return contacts;
|
136 |
|
|
}
|
137 |
|
|
|
138 |
44995
|
panagiotis
|
}
|