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