BrightSide Workbench Full Report + Source Code
ContractStub.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2022 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 package org.turro.financials.stub;
20 
21 import java.util.Currency;
22 import java.util.Date;
23 import java.util.Set;
24 import org.turro.elephant.calendar.Periodicity;
25 import org.turro.financials.entity.Contract;
26 import org.turro.financials.entity.OperatingModifier;
27 import org.turro.reflection.stub.DefaultStub;
28 import org.turro.reflection.stub.StubSet;
29 
34 public class ContractStub extends DefaultStub {
35 
36  private long id;
37  private String globalId;
38  private String contractor;
39  private String name;
40  private boolean stock, cash, active, useContractorCode;
41  private OperatingModifier operatingModifier = OperatingModifier.OPMOD_NORMAL;
42  private String grouping;
43  private double fee;
44  private Periodicity periodicity = Periodicity.PUNCTUAL;
45  private DepartmentStubmin department;
46  private ServiceStubmin service;
47  private Date startDate;
48  private Date endDate;
49  private String notes;
50  private Currency currency;
51  private boolean equivalenceSurcharge;
52  private ContractDefinitionStubmin contractDefinition;
53  private Set<ContractPreferenceStubmin> contractPreferences = new StubSet<>(ContractPreferenceStubmin.class);
54  private Set<RelatedContractStoreStub> relatedContractStores = new StubSet<>(RelatedContractStoreStub.class);
55  private Set<ContractParticipantStub> participants = new StubSet<>(ContractParticipantStub.class);
56  private Set<ContractFlowStub> contractFlows = new StubSet<>(ContractFlowStub.class);
57  private Set<TaxStub> taxes = new StubSet<>(TaxStub.class);
58  private Set<ContractedStub> contracted = new StubSet<>(ContractedStub.class);
59 
60  public ContractStub(Contract contract) {
61  silentlyInitializeValues(contract);
62  }
63 
64  public long getId() {
65  return id;
66  }
67 
68  public void setId(long id) {
69  this.id = id;
70  }
71 
72  public String getGlobalId() {
73  return globalId;
74  }
75 
76  public void setGlobalId(String globalId) {
77  this.globalId = globalId;
78  }
79 
80  public String getContractor() {
81  return contractor;
82  }
83 
84  public void setContractor(String contractor) {
85  this.contractor = contractor;
86  }
87 
88  public String getName() {
89  return name;
90  }
91 
92  public void setName(String name) {
93  this.name = name;
94  }
95 
96  public boolean isStock() {
97  return stock;
98  }
99 
100  public void setStock(boolean stock) {
101  this.stock = stock;
102  }
103 
104  public boolean isCash() {
105  return cash;
106  }
107 
108  public void setCash(boolean cash) {
109  this.cash = cash;
110  }
111 
112  public boolean isActive() {
113  return active;
114  }
115 
116  public void setActive(boolean active) {
117  this.active = active;
118  }
119 
120  public boolean isUseContractorCode() {
121  return useContractorCode;
122  }
123 
124  public void setUseContractorCode(boolean useContractorCode) {
125  this.useContractorCode = useContractorCode;
126  }
127 
129  return operatingModifier;
130  }
131 
132  public void setOperatingModifier(OperatingModifier operatingModifier) {
133  this.operatingModifier = operatingModifier;
134  }
135 
136  public String getGrouping() {
137  return grouping;
138  }
139 
140  public void setGrouping(String grouping) {
141  this.grouping = grouping;
142  }
143 
144  public double getFee() {
145  return fee;
146  }
147 
148  public void setFee(double fee) {
149  this.fee = fee;
150  }
151 
153  return periodicity;
154  }
155 
156  public void setPeriodicity(Periodicity periodicity) {
157  this.periodicity = periodicity;
158  }
159 
161  return department;
162  }
163 
164  public void setDepartment(DepartmentStubmin department) {
165  this.department = department;
166  }
167 
169  return service;
170  }
171 
172  public void setService(ServiceStubmin service) {
173  this.service = service;
174  }
175 
176  public Date getStartDate() {
177  return startDate;
178  }
179 
180  public void setStartDate(Date startDate) {
181  this.startDate = startDate;
182  }
183 
184  public Date getEndDate() {
185  return endDate;
186  }
187 
188  public void setEndDate(Date endDate) {
189  this.endDate = endDate;
190  }
191 
192  public String getNotes() {
193  return notes;
194  }
195 
196  public void setNotes(String notes) {
197  this.notes = notes;
198  }
199 
200  public Currency getCurrency() {
201  return currency;
202  }
203 
204  public void setCurrency(Currency currency) {
205  this.currency = currency;
206  }
207 
208  public boolean isEquivalenceSurcharge() {
209  return equivalenceSurcharge;
210  }
211 
212  public void setEquivalenceSurcharge(boolean equivalenceSurcharge) {
213  this.equivalenceSurcharge = equivalenceSurcharge;
214  }
215 
217  return contractDefinition;
218  }
219 
220  public void setContractDefinition(ContractDefinitionStubmin contractDefinition) {
221  this.contractDefinition = contractDefinition;
222  }
223 
224  public Set<ContractPreferenceStubmin> getContractPreferences() {
225  return contractPreferences;
226  }
227 
228  public void setContractPreferences(Set<ContractPreferenceStubmin> contractPreferences) {
229  this.contractPreferences = contractPreferences;
230  }
231 
232  public Set<RelatedContractStoreStub> getRelatedContractStores() {
233  return relatedContractStores;
234  }
235 
236  public void setRelatedContractStores(Set<RelatedContractStoreStub> relatedContractStores) {
237  this.relatedContractStores = relatedContractStores;
238  }
239 
240  public Set<ContractParticipantStub> getParticipants() {
241  return participants;
242  }
243 
244  public void setParticipants(Set<ContractParticipantStub> participants) {
245  this.participants = participants;
246  }
247 
248  public Set<ContractFlowStub> getContractFlows() {
249  return contractFlows;
250  }
251 
252  public void setContractFlows(Set<ContractFlowStub> contractFlows) {
253  this.contractFlows = contractFlows;
254  }
255 
256  public Set<TaxStub> getTaxes() {
257  return taxes;
258  }
259 
260  public void setTaxes(Set<TaxStub> taxes) {
261  this.taxes = taxes;
262  }
263 
264  public Set<ContractedStub> getContracted() {
265  return contracted;
266  }
267 
268  public void setContracted(Set<ContractedStub> contracted) {
269  this.contracted = contracted;
270  }
271 
272 }
Set< ContractedStub > getContracted()
void setOperatingModifier(OperatingModifier operatingModifier)
void setDepartment(DepartmentStubmin department)
void setContractPreferences(Set< ContractPreferenceStubmin > contractPreferences)
void setTaxes(Set< TaxStub > taxes)
void setEquivalenceSurcharge(boolean equivalenceSurcharge)
void setRelatedContractStores(Set< RelatedContractStoreStub > relatedContractStores)
void setContractDefinition(ContractDefinitionStubmin contractDefinition)
void setParticipants(Set< ContractParticipantStub > participants)
Set< ContractFlowStub > getContractFlows()
void setContractFlows(Set< ContractFlowStub > contractFlows)
void setService(ServiceStubmin service)
Set< RelatedContractStoreStub > getRelatedContractStores()
void setUseContractorCode(boolean useContractorCode)
void setContractor(String contractor)
void setPeriodicity(Periodicity periodicity)
Set< ContractParticipantStub > getParticipants()
void setContracted(Set< ContractedStub > contracted)
Set< ContractPreferenceStubmin > getContractPreferences()
ContractDefinitionStubmin getContractDefinition()