BrightSide Workbench Full Report + Source Code
DocumentStub.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.financials.entity.Document;
25 import org.turro.reflection.stub.DefaultStub;
26 import org.turro.reflection.stub.StubSet;
27 
32 public class DocumentStub extends DefaultStub {
33 
34  private long id;
35  private DocumentDefinitionStubmin documentDefinition;
36  private ContractStubmin contract;
37  private String notes;
38  private Date receiptDate;
39  private Date documentDate;
40  private String documentNumber;
41  private Currency currency;
42  private double quote;
43  private boolean draft, noAncestors, noDescendants;
44  private String relatedPath;
45  private RegisterViewStub forcedView;
46  private Set<DocumentRelationStub> descendants = new StubSet<>(DocumentRelationStub.class);
47  private Set<RegisterStubmin> registers = new StubSet<>(RegisterStubmin.class);
48  private Set<DocumentLineStub> documentLines = new StubSet<>(DocumentLineStub.class);
49 
50  public DocumentStub(Document document) {
51  silentlyInitializeValues(document);
52  }
53 
54  public long getId() {
55  return id;
56  }
57 
58  public void setId(long id) {
59  this.id = id;
60  }
61 
63  return documentDefinition;
64  }
65 
66  public void setDocumentDefinition(DocumentDefinitionStubmin documentDefinition) {
67  this.documentDefinition = documentDefinition;
68  }
69 
71  return contract;
72  }
73 
74  public void setContract(ContractStubmin contract) {
75  this.contract = contract;
76  }
77 
78  public String getNotes() {
79  return notes;
80  }
81 
82  public void setNotes(String notes) {
83  this.notes = notes;
84  }
85 
86  public Date getReceiptDate() {
87  return receiptDate;
88  }
89 
90  public void setReceiptDate(Date receiptDate) {
91  this.receiptDate = receiptDate;
92  }
93 
94  public Date getDocumentDate() {
95  return documentDate;
96  }
97 
98  public void setDocumentDate(Date documentDate) {
99  this.documentDate = documentDate;
100  }
101 
102  public String getDocumentNumber() {
103  return documentNumber;
104  }
105 
106  public void setDocumentNumber(String documentNumber) {
107  this.documentNumber = documentNumber;
108  }
109 
110  public Currency getCurrency() {
111  return currency;
112  }
113 
114  public void setCurrency(Currency currency) {
115  this.currency = currency;
116  }
117 
118  public double getQuote() {
119  return quote;
120  }
121 
122  public void setQuote(double quote) {
123  this.quote = quote;
124  }
125 
126  public boolean isDraft() {
127  return draft;
128  }
129 
130  public void setDraft(boolean draft) {
131  this.draft = draft;
132  }
133 
134  public boolean isNoAncestors() {
135  return noAncestors;
136  }
137 
138  public void setNoAncestors(boolean noAncestors) {
139  this.noAncestors = noAncestors;
140  }
141 
142  public boolean isNoDescendants() {
143  return noDescendants;
144  }
145 
146  public void setNoDescendants(boolean noDescendants) {
147  this.noDescendants = noDescendants;
148  }
149 
150  public String getRelatedPath() {
151  return relatedPath;
152  }
153 
154  public void setRelatedPath(String relatedPath) {
155  this.relatedPath = relatedPath;
156  }
157 
159  return forcedView;
160  }
161 
162  public void setForcedView(RegisterViewStub forcedView) {
163  this.forcedView = forcedView;
164  }
165 
166  public Set<DocumentRelationStub> getDescendants() {
167  return descendants;
168  }
169 
170  public void setDescendants(Set<DocumentRelationStub> descendants) {
171  this.descendants = descendants;
172  }
173 
174  public Set<RegisterStubmin> getRegisters() {
175  return registers;
176  }
177 
178  public void setRegisters(Set<RegisterStubmin> registers) {
179  this.registers = registers;
180  }
181 
182  public Set<DocumentLineStub> getDocumentLines() {
183  return documentLines;
184  }
185 
186  public void setDocumentLines(Set<DocumentLineStub> documentLines) {
187  this.documentLines = documentLines;
188  }
189 
190 }
void setNoDescendants(boolean noDescendants)
void setReceiptDate(Date receiptDate)
void setRegisters(Set< RegisterStubmin > registers)
void setForcedView(RegisterViewStub forcedView)
Set< DocumentLineStub > getDocumentLines()
void setDocumentLines(Set< DocumentLineStub > documentLines)
void setDescendants(Set< DocumentRelationStub > descendants)
void setRelatedPath(String relatedPath)
void setDocumentNumber(String documentNumber)
void setNoAncestors(boolean noAncestors)
DocumentDefinitionStubmin getDocumentDefinition()
void setContract(ContractStubmin contract)
void setDocumentDefinition(DocumentDefinitionStubmin documentDefinition)
Set< DocumentRelationStub > getDescendants()
Set< RegisterStubmin > getRegisters()
void setDocumentDate(Date documentDate)