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

Public Member Functions

 BatchOfWrapper (BatchOf batchOf)
 
BatchOf getBatchOf ()
 
void keepRelations (Set< Document > docs)
 
boolean save (List< DocumentLine > lines)
 
boolean delete ()
 

Protected Attributes

BatchOf batchOf
 

Detailed Description

Constructor & Destructor Documentation

◆ BatchOfWrapper()

Member Function Documentation

◆ delete()

boolean org.turro.financials.model.document.BatchOfWrapper.delete ( )

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

66  {
67  new FinancialsPU().deleteObject(batchOf);
68  return true;
69  }
Here is the call graph for this function:

◆ getBatchOf()

BatchOf org.turro.financials.model.document.BatchOfWrapper.getBatchOf ( )

◆ keepRelations()

void org.turro.financials.model.document.BatchOfWrapper.keepRelations ( Set< Document docs)

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

45  {
46  batchOf.setDocuments(docs);
47  }
void setDocuments(Set< Document > documents)
Definition: BatchOf.java:71
Here is the call graph for this function:

◆ save()

boolean org.turro.financials.model.document.BatchOfWrapper.save ( List< DocumentLine lines)

Reimplemented in org.turro.financials.document.logic.BatchOfWrapper.

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

49  {
50  if(batchOf.getBatch() != null && !batchOf.getBatch().isEmpty()) {
51  batchOf.setBatch(new DocumentWrapper(batchOf.getBatch()).save(lines, null));
52  ArrayList<Document> al = new ArrayList<Document>();
53  for(Document d : batchOf.getDocuments()) {
54  if(!d.isEmpty()) {
55  // tricky: document lines are passed as to have relations saved
56  al.add(new DocumentWrapper(d).save(
57  new ArrayList(d.getDocumentLines()), null));
58  }
59  }
60  batchOf.setDocuments(new HashSet<Document>(al));
61  batchOf = new FinancialsPU().saveObject(batchOf);
62  }
63  return batchOf.getId() != 0;
64  }
void setBatch(Document batch)
Definition: BatchOf.java:63
Set< Document > getDocuments()
Definition: BatchOf.java:67
Here is the call graph for this function:

Member Data Documentation

◆ batchOf

BatchOf org.turro.financials.model.document.BatchOfWrapper.batchOf
protected

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