BrightSide Workbench Full Report + Source Code
org.turro.financials.entity.ContractDefinition Class Reference
Inheritance diagram for org.turro.financials.entity.ContractDefinition:
Collaboration diagram for org.turro.financials.entity.ContractDefinition:

Public Member Functions

String getAsCash ()
 
void setAsCash (String asCash)
 
String getAsContact ()
 
void setAsContact (String asContact)
 
boolean isCash ()
 
void setCash (boolean cash)
 
Set< ContractPreferencegetContractPreferences ()
 
void setContractPreferences (Set< ContractPreference > contractPreferences)
 
Set< DocumentWorkflowgetDocumentWorkflows ()
 
void setDocumentWorkflows (Set< DocumentWorkflow > documentWorkflows)
 
long getId ()
 
void setId (long id)
 
String getName ()
 
void setName (String name)
 
Set< RelatedDocumentgetRelatedDocuments ()
 
void setRelatedDocuments (Set< RelatedDocument > relatedDocuments)
 
boolean isStock ()
 
void setStock (boolean stock)
 
boolean isUseContractorCode ()
 
void setUseContractorCode (boolean useContractorCode)
 
Object entityId ()
 
boolean isEmpty ()
 
ContractPreference getDefaultContractPreference ()
 
String getDescription ()
 
ContractDefinitionNotes getNotes ()
 
List< DocumentDefinitiongetWorkflow ()
 
- Public Member Functions inherited from org.turro.jpa.entity.IDaoEntity
default boolean isNew ()
 
default void prepareSave ()
 
default void prepareDelete ()
 
default void removeEmpties ()
 
default Collection< Collection > collections ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 36 of file ContractDefinition.java.

Member Function Documentation

◆ entityId()

Object org.turro.financials.entity.ContractDefinition.entityId ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 197 of file ContractDefinition.java.

197  {
198  return id;
199  }

◆ getAsCash()

String org.turro.financials.entity.ContractDefinition.getAsCash ( )

Definition at line 62 of file ContractDefinition.java.

62  {
63  return asCash;
64  }
Here is the caller graph for this function:

◆ getAsContact()

String org.turro.financials.entity.ContractDefinition.getAsContact ( )

Definition at line 70 of file ContractDefinition.java.

70  {
71  return asContact;
72  }
Here is the caller graph for this function:

◆ getContractPreferences()

Set<ContractPreference> org.turro.financials.entity.ContractDefinition.getContractPreferences ( )

Definition at line 102 of file ContractDefinition.java.

102  {
103  Dao dao = new FinancialsPU();
104  if(id > 0 && dao.isNotLoaded(contractPreferences)) {
105  contractPreferences = dao.lazyLoader(ContractDefinition.class, this, "contractPreferences").contractPreferences;
106  }
107  return contractPreferences;
108  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDefaultContractPreference()

ContractPreference org.turro.financials.entity.ContractDefinition.getDefaultContractPreference ( )

Definition at line 208 of file ContractDefinition.java.

208  {
209  ContractPreference result = null;
210  for(ContractPreference cp : getContractPreferences()) {
211  if(cp.getName().contentEquals("#")) {
212  result = cp;
213  break;
214  }
215  if(result == null) {
216  result = cp;
217  }
218  }
219  return result;
220  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDescription()

String org.turro.financials.entity.ContractDefinition.getDescription ( )

Definition at line 222 of file ContractDefinition.java.

222  {
223  PhraseBuilder pb = new PhraseBuilder(name);
224  pb.addWord("[");
225 // if(contactPreference != null) {
226 // pb.addPendingSeparator(",");
227 // pb.addWord("c:" + contactPreference);
228 // }
229 // if(operatingPreference != null) {
230 // pb.addPendingSeparator(",");
231 // pb.addWord("e:" + operatingPreference);
232 // }
233 // if(cashPreference != null) {
234 // pb.addPendingSeparator(",");
235 // pb.addWord("d:" + cashPreference);
236 // }
237 // if(taxPreference != null) {
238 // pb.addPendingSeparator(",");
239 // pb.addWord("t:" + taxPreference);
240 // }
241 // if(retentionPreference != null) {
242 // pb.addPendingSeparator(",");
243 // pb.addWord("r:" + retentionPreference);
244 // }
245  if(asContact != null) {
246  pb.addPendingSeparator(",");
247  pb.addWord("c:" + asContact);
248  }
249  if(asCash != null) {
250  pb.addPendingSeparator(",");
251  pb.addWord("d:" + asCash);
252  }
253  pb.addWord("]");
254  return pb.toString();
255  }

◆ getDocumentWorkflows()

Set<DocumentWorkflow> org.turro.financials.entity.ContractDefinition.getDocumentWorkflows ( )

Definition at line 114 of file ContractDefinition.java.

114  {
115  Dao dao = new FinancialsPU();
116  if(id > 0 && dao.isNotLoaded(documentWorkflows)) {
117  documentWorkflows = dao.lazyLoader(ContractDefinition.class, this, "documentWorkflows").documentWorkflows;
118  }
119  return documentWorkflows;
120  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getId()

long org.turro.financials.entity.ContractDefinition.getId ( )

Definition at line 126 of file ContractDefinition.java.

126  {
127  return id;
128  }
Here is the caller graph for this function:

◆ getName()

String org.turro.financials.entity.ContractDefinition.getName ( )

Definition at line 134 of file ContractDefinition.java.

134  {
135  return name;
136  }
Here is the caller graph for this function:

◆ getNotes()

ContractDefinitionNotes org.turro.financials.entity.ContractDefinition.getNotes ( )

Definition at line 259 of file ContractDefinition.java.

259  {
260  if(notes == null) {
261  Dao dao = new FinancialsPU();
262  notes = (ContractDefinitionNotes) dao.getSingleResultOrNull(
263  "select cdn from ContractDefinitionNotes cdn " +
264  "where cdn.contractDefinition = ?",
265  new Object[] { this });
266  }
267  return notes;
268  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRelatedDocuments()

Set<RelatedDocument> org.turro.financials.entity.ContractDefinition.getRelatedDocuments ( )

Definition at line 150 of file ContractDefinition.java.

150  {
151  Dao dao = new FinancialsPU();
152  if(id > 0 && dao.isNotLoaded(relatedDocuments)) {
153  relatedDocuments = dao.lazyLoader(ContractDefinition.class, this, "relatedDocuments").relatedDocuments;
154  }
155  return relatedDocuments;
156  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWorkflow()

List<DocumentDefinition> org.turro.financials.entity.ContractDefinition.getWorkflow ( )

Definition at line 270 of file ContractDefinition.java.

270  {
271  ArrayList<DocumentDefinition> v = new ArrayList<DocumentDefinition>();
272  for(DocumentWorkflow dw : getDocumentWorkflows()) {
273  int pos1 = getPosition(v, dw.getAncestor());
274  int pos2 = getPosition(v, dw.getDescendant());
275  if(pos1 == -1) {
276  v.add(0, dw.getAncestor());
277  }
278  if(pos2 == -1) {
279  if(pos1 + 1 >= v.size()) {
280  v.add(dw.getDescendant());
281  } else {
282  v.add(pos1 + 1, dw.getDescendant());
283  }
284  }
285  }
286  for(DocumentWorkflow dw : getDocumentWorkflows()) {
287  int pos1 = getPosition(v, dw.getAncestor());
288  int pos2 = getPosition(v, dw.getDescendant());
289  if(pos2 < pos1) {
290  v.set(pos1, dw.getDescendant());
291  v.set(pos2, dw.getAncestor());
292  }
293  }
294  return v;
295  }
Here is the caller graph for this function:

◆ isCash()

boolean org.turro.financials.entity.ContractDefinition.isCash ( )

Definition at line 78 of file ContractDefinition.java.

78  {
79  return cash;
80  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.financials.entity.ContractDefinition.isEmpty ( )

Implements org.turro.jpa.entity.IDaoEntity.

Definition at line 202 of file ContractDefinition.java.

202  {
203  return Strings.isBlank(name);
204  }

◆ isStock()

boolean org.turro.financials.entity.ContractDefinition.isStock ( )

Definition at line 170 of file ContractDefinition.java.

170  {
171  return stock;
172  }
Here is the caller graph for this function:

◆ isUseContractorCode()

boolean org.turro.financials.entity.ContractDefinition.isUseContractorCode ( )

Definition at line 186 of file ContractDefinition.java.

186  {
187  return useContractorCode;
188  }
Here is the caller graph for this function:

◆ setAsCash()

void org.turro.financials.entity.ContractDefinition.setAsCash ( String  asCash)

Definition at line 66 of file ContractDefinition.java.

66  {
67  this.asCash = asCash;
68  }

◆ setAsContact()

void org.turro.financials.entity.ContractDefinition.setAsContact ( String  asContact)

Definition at line 74 of file ContractDefinition.java.

74  {
75  this.asContact = asContact;
76  }

◆ setCash()

void org.turro.financials.entity.ContractDefinition.setCash ( boolean  cash)

Definition at line 82 of file ContractDefinition.java.

82  {
83  this.cash = cash;
84  }

◆ setContractPreferences()

void org.turro.financials.entity.ContractDefinition.setContractPreferences ( Set< ContractPreference contractPreferences)

Definition at line 110 of file ContractDefinition.java.

110  {
111  this.contractPreferences = contractPreferences;
112  }

◆ setDocumentWorkflows()

void org.turro.financials.entity.ContractDefinition.setDocumentWorkflows ( Set< DocumentWorkflow documentWorkflows)

Definition at line 122 of file ContractDefinition.java.

122  {
123  this.documentWorkflows = documentWorkflows;
124  }

◆ setId()

void org.turro.financials.entity.ContractDefinition.setId ( long  id)

Definition at line 130 of file ContractDefinition.java.

130  {
131  this.id = id;
132  }

◆ setName()

void org.turro.financials.entity.ContractDefinition.setName ( String  name)

Definition at line 138 of file ContractDefinition.java.

138  {
139  this.name = name;
140  }

◆ setRelatedDocuments()

void org.turro.financials.entity.ContractDefinition.setRelatedDocuments ( Set< RelatedDocument relatedDocuments)

Definition at line 158 of file ContractDefinition.java.

158  {
159  this.relatedDocuments = relatedDocuments;
160  }

◆ setStock()

void org.turro.financials.entity.ContractDefinition.setStock ( boolean  stock)

Definition at line 174 of file ContractDefinition.java.

174  {
175  this.stock = stock;
176  }

◆ setUseContractorCode()

void org.turro.financials.entity.ContractDefinition.setUseContractorCode ( boolean  useContractorCode)

Definition at line 190 of file ContractDefinition.java.

190  {
191  this.useContractorCode = useContractorCode;
192  }

The documentation for this class was generated from the following file: