1
|
package eu.dnetlib.goldoa.domain;
|
2
|
|
3
|
import com.google.gwt.user.client.rpc.IsSerializable;
|
4
|
|
5
|
import java.util.Date;
|
6
|
|
7
|
/**
|
8
|
* Created by antleb on 3/8/15.
|
9
|
*/
|
10
|
public class Budget extends GoldBean implements IsSerializable {
|
11
|
|
12
|
public enum Status implements IsSerializable {
|
13
|
INCOMPLETE("Incomplete", 1),
|
14
|
SUBMITTED("Submitted", 2),
|
15
|
APPROVED("Approved", 4),
|
16
|
REJECTED("Rejected", 8),
|
17
|
EXPIRED("Expired", 16);
|
18
|
|
19
|
private String value;
|
20
|
private int code;
|
21
|
|
22
|
Status(String value, int code) {
|
23
|
this.value = value;
|
24
|
this.code = code;
|
25
|
}
|
26
|
|
27
|
public String getValue() {
|
28
|
return value;
|
29
|
}
|
30
|
|
31
|
public int getCode() {
|
32
|
return code;
|
33
|
}
|
34
|
}
|
35
|
|
36
|
private Date date;
|
37
|
private Date startDate;
|
38
|
private Date endDate;
|
39
|
private float amountRequested;
|
40
|
private float amountGranted;
|
41
|
private Currency currency;
|
42
|
private float remaining;
|
43
|
int statusCode;
|
44
|
private String user;
|
45
|
private String organisation;
|
46
|
private BankAccount bankAccount;
|
47
|
|
48
|
public Budget() {
|
49
|
}
|
50
|
|
51
|
public Budget(String budgetId) {
|
52
|
super(budgetId);
|
53
|
}
|
54
|
|
55
|
public Budget(String id, Date date, Date startDate, Date endDate, float amountRequested, float amountGranted, Currency currency, float remaining, int statusCode, String user, String organisation, BankAccount bankAccount) {
|
56
|
super(id);
|
57
|
this.date = date;
|
58
|
this.startDate = startDate;
|
59
|
this.endDate = endDate;
|
60
|
this.amountRequested = amountRequested;
|
61
|
this.amountGranted = amountGranted;
|
62
|
this.currency = currency;
|
63
|
this.remaining = remaining;
|
64
|
this.statusCode = statusCode;
|
65
|
this.user = user;
|
66
|
this.organisation = organisation;
|
67
|
this.bankAccount = bankAccount;
|
68
|
}
|
69
|
|
70
|
public Date getDate() {
|
71
|
return date;
|
72
|
}
|
73
|
|
74
|
public void setDate(Date date) {
|
75
|
this.date = date;
|
76
|
}
|
77
|
|
78
|
public float getAmountRequested() {
|
79
|
return amountRequested;
|
80
|
}
|
81
|
|
82
|
public void setAmountRequested(float amountRequested) {
|
83
|
this.amountRequested = amountRequested;
|
84
|
}
|
85
|
|
86
|
public float getAmountGranted() {
|
87
|
return amountGranted;
|
88
|
}
|
89
|
|
90
|
public void setAmountGranted(float amountGranted) {
|
91
|
this.amountGranted = amountGranted;
|
92
|
}
|
93
|
|
94
|
public Currency getCurrency() {
|
95
|
return currency;
|
96
|
}
|
97
|
|
98
|
public void setCurrency(Currency currency) {
|
99
|
this.currency = currency;
|
100
|
}
|
101
|
|
102
|
public BankAccount getBankAccount() {
|
103
|
return bankAccount;
|
104
|
}
|
105
|
|
106
|
public void setBankAccount(BankAccount bankAccount) {
|
107
|
this.bankAccount = bankAccount;
|
108
|
}
|
109
|
|
110
|
public float getRemaining() {
|
111
|
return remaining;
|
112
|
}
|
113
|
|
114
|
public void setRemaining(float remaining) {
|
115
|
this.remaining = remaining;
|
116
|
}
|
117
|
|
118
|
public int getStatusCode() {
|
119
|
return statusCode;
|
120
|
}
|
121
|
|
122
|
public void setStatusCode(int statusCode) {
|
123
|
this.statusCode = statusCode;
|
124
|
}
|
125
|
|
126
|
public String getUser() {
|
127
|
return user;
|
128
|
}
|
129
|
|
130
|
public void setUser(String user) {
|
131
|
this.user = user;
|
132
|
}
|
133
|
|
134
|
public String getOrganisation() {
|
135
|
return organisation;
|
136
|
}
|
137
|
|
138
|
public void setOrganisation(String organisation) {
|
139
|
this.organisation = organisation;
|
140
|
}
|
141
|
|
142
|
public Date getStartDate() {
|
143
|
return startDate;
|
144
|
}
|
145
|
|
146
|
public void setStartDate(Date startDate) {
|
147
|
this.startDate = startDate;
|
148
|
}
|
149
|
|
150
|
public Date getEndDate() {
|
151
|
return endDate;
|
152
|
}
|
153
|
|
154
|
public void setEndDate(Date endDate) {
|
155
|
this.endDate = endDate;
|
156
|
}
|
157
|
|
158
|
public String getStatus() {
|
159
|
// TODO know man!
|
160
|
return "I DONT KNOW MAN";
|
161
|
}
|
162
|
|
163
|
}
|