BrightSide Workbench Full Report + Source Code
org.turro.financials.model.document.DocumentDefinitionWrapper Class Reference
Inheritance diagram for org.turro.financials.model.document.DocumentDefinitionWrapper:
Collaboration diagram for org.turro.financials.model.document.DocumentDefinitionWrapper:

Public Member Functions

 DocumentDefinitionWrapper (DocumentDefinition documentDefinition)
 
Collection< ContractgetRelatedStores (Contract contract)
 
Collection< ContractgetRelatedStores ()
 

Static Public Member Functions

static Collection< DocumentDefinitiongetDocumentDefinitions ()
 

Protected Attributes

DocumentDefinition documentDefinition
 

Detailed Description

Constructor & Destructor Documentation

◆ DocumentDefinitionWrapper()

Member Function Documentation

◆ getDocumentDefinitions()

static Collection<DocumentDefinition> org.turro.financials.model.document.DocumentDefinitionWrapper.getDocumentDefinitions ( )
static

Definition at line 72 of file bsfinancials-core/src/main/java/org/turro/financials/model/document/DocumentDefinitionWrapper.java.

72  {
73  return new FinancialsPU().getResultList(
74  "select docdef from DocumentDefinition as docdef " +
75  "order by docdef.name"
76  );
77  }
Here is the caller graph for this function:

◆ getRelatedStores() [1/2]

Collection<Contract> org.turro.financials.model.document.DocumentDefinitionWrapper.getRelatedStores ( )

Definition at line 54 of file bsfinancials-core/src/main/java/org/turro/financials/model/document/DocumentDefinitionWrapper.java.

54  {
55  if(documentDefinition != null) {
56  StringBuilder sb = new StringBuilder();
57  for(RelatedStoreDefinition rsd : documentDefinition.getRelatedStoreDefinitions()) {
58  if(sb.length() > 0) sb.append(",");
59  sb.append(rsd.getRelatedStore().getId());
60  }
61  return new FinancialsPU().getResultList(
62  "select ctc from Contract as ctc " +
63  "where ctc.contractDefinition.id in (" + sb.toString() + ") " +
64  "and ctc.active = TRUE " +
65  "and ctc.stock = TRUE " +
66  "order by ctc.contractDefinition.name, ctc.contractDefinition.id, ctc.id"
67  );
68  }
69  return new HashSet<Contract>();
70  }
Here is the call graph for this function:

◆ getRelatedStores() [2/2]

Collection<Contract> org.turro.financials.model.document.DocumentDefinitionWrapper.getRelatedStores ( Contract  contract)

Definition at line 40 of file bsfinancials-core/src/main/java/org/turro/financials/model/document/DocumentDefinitionWrapper.java.

40  {
41  HashSet<Contract> c = new HashSet<Contract>();
42  if(documentDefinition != null) {
43  if(contract != null) {
44  for(RelatedContractStore rcs : contract.getRelatedContractStores()) {
45  if(rcs.getStore() != null && rcs.getDocumentDefinition().getId() == documentDefinition.getId()) {
46  c.add(rcs.getStore());
47  }
48  }
49  }
50  }
51  return c;
52  }
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ documentDefinition

DocumentDefinition org.turro.financials.model.document.DocumentDefinitionWrapper.documentDefinition
protected

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