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

Public Member Functions

void setDocumentDefinition (DocumentDefinition documentDefinition)
 
Collection< DocumentgetDocuments ()
 
void load (RelationMode mode, List< IFilterValue > values)
 
void addDocument (Document document, DocumentWorkflow workflow)
 
void checkGroup (Grid grid, Document document)
 

Detailed Description

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

Definition at line 41 of file PortfolioSet.java.

Member Function Documentation

◆ addDocument()

void org.turro.financials.portfolio.PortfolioSet.addDocument ( Document  document,
DocumentWorkflow  workflow 
)

Definition at line 72 of file PortfolioSet.java.

72  {
73  PortfolioItem item = getItem(document);
74  if(item == null) {
75  item = new PortfolioItem(document);
76  add(item);
77  }
78  if(workflow.getAncestor().getId() == document.getDocumentDefinition().getId()) {
79  item.addForward(workflow);
80  } else {
81  item.addBackward(workflow);
82  }
83  }
Here is the call graph for this function:

◆ checkGroup()

void org.turro.financials.portfolio.PortfolioSet.checkGroup ( Grid  grid,
Document  document 
)

Definition at line 85 of file PortfolioSet.java.

85  {
86  if((lastContract == 0 || lastContract != document.getContract().getId()) ||
87  (lastDocDef == 0 || lastDocDef != document.getDocumentDefinition().getId())) {
88  lastContract = document.getContract().getId();
89  lastDocDef = document.getDocumentDefinition().getId();
90  Group group = new GroupExtended(
91  document.getContract().getFullDescription() +
92  " - " +
93  document.getDocumentDefinition().getName());
94  group.setOpen(true);
95  grid.getRows().appendChild(group);
96  }
97  }
Here is the call graph for this function:

◆ getDocuments()

Collection<Document> org.turro.financials.portfolio.PortfolioSet.getDocuments ( )

Definition at line 50 of file PortfolioSet.java.

50  {
51  ArrayList<Document> docs = new ArrayList<Document>();
52  for(PortfolioItem item : this) {
53  docs.add(item.getDocument());
54  }
55  return docs;
56  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ load()

void org.turro.financials.portfolio.PortfolioSet.load ( RelationMode  mode,
List< IFilterValue values 
)

Definition at line 58 of file PortfolioSet.java.

58  {
59  clear();
60  lastContract = 0;
61  lastDocDef = 0;
62  Dao dao = new FinancialsPU();
63  IAcceptances acceptances = Plugins.loadImplementation(IAcceptances.class);
64  WhereClause wc = createCriteria(mode, values);
65  for(Object[] o : (List<Object[]>) dao.getResultList(wc)) {
66  if(acceptances.getStatusFor(FinancialsPU.getObjectPath(o[0])).isPass()) {
67  addDocument((Document) o[0], (DocumentWorkflow) o[1]);
68  }
69  }
70  }
void addDocument(Document document, DocumentWorkflow workflow)

◆ setDocumentDefinition()

void org.turro.financials.portfolio.PortfolioSet.setDocumentDefinition ( DocumentDefinition  documentDefinition)

Definition at line 46 of file PortfolioSet.java.

46  {
47  this.documentDefinition = documentDefinition;
48  }

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