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

Public Member Functions

Document getBatch ()
 
void setBatch (Document batch)
 
Set< DocumentgetDocuments ()
 
void setDocuments (Set< Document > documents)
 
long getId ()
 
void setId (long id)
 
BatchOfType getType ()
 
void setType (BatchOfType type)
 
Contract getStore ()
 
void setStore (Contract store)
 
void setDocumentDate (Date date)
 
void setReceiptDate (Date date)
 
boolean isValid ()
 

Static Public Member Functions

static Collection< BatchOfgetFrom (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 BatchOf.java.

Member Function Documentation

◆ getBatch()

Document org.turro.financials.entity.BatchOf.getBatch ( )

Definition at line 59 of file BatchOf.java.

59  {
60  return batch;
61  }
Here is the caller graph for this function:

◆ getDocuments()

Set<Document> org.turro.financials.entity.BatchOf.getDocuments ( )

Definition at line 67 of file BatchOf.java.

67  {
68  return documents;
69  }
Here is the caller graph for this function:

◆ getFrom()

static Collection<BatchOf> org.turro.financials.entity.BatchOf.getFrom ( Document  document)
static

Definition at line 135 of file BatchOf.java.

135  {
136  return (document == null || document.getId() == 0) ? Collections.EMPTY_LIST :
137  new FinancialsPU().getResultList(
138  "select batch from BatchOf as batch " +
139  "where batch.batch = ? " +
140  "or ? member of batch.documents",
141  new Object[] {
142  document, document
143  });
144  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getId()

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

Definition at line 75 of file BatchOf.java.

75  {
76  return id;
77  }
Here is the caller graph for this function:

◆ getStore()

Contract org.turro.financials.entity.BatchOf.getStore ( )

Definition at line 91 of file BatchOf.java.

91  {
92  return store;
93  }
Here is the caller graph for this function:

◆ getType()

BatchOfType org.turro.financials.entity.BatchOf.getType ( )

Definition at line 83 of file BatchOf.java.

83  {
84  return type;
85  }
Here is the caller graph for this function:

◆ isValid()

boolean org.turro.financials.entity.BatchOf.isValid ( )

Definition at line 128 of file BatchOf.java.

128  {
129  if(store == null || batch == null || !(batch.isValid())) {
130  return false;
131  }
132  return true;
133  }

◆ setBatch()

void org.turro.financials.entity.BatchOf.setBatch ( Document  batch)

Definition at line 63 of file BatchOf.java.

63  {
64  this.batch = batch;
65  }
Here is the caller graph for this function:

◆ setDocumentDate()

void org.turro.financials.entity.BatchOf.setDocumentDate ( Date  date)

Definition at line 104 of file BatchOf.java.

104  {
105  if(batch != null) {
106  batch.setDocumentDate(date);
107  }
108  for(Document doc : documents) {
109  if(!BatchOfType.BATCH_OF_DISCOUNTING.equals(type)) {
110  doc.setDocumentDate(date);
111  }
112  }
113  }
void setDocumentDate(Date documentDate)
Definition: Document.java:163

◆ setDocuments()

void org.turro.financials.entity.BatchOf.setDocuments ( Set< Document documents)

Definition at line 71 of file BatchOf.java.

71  {
72  this.documents = documents;
73  }
Here is the caller graph for this function:

◆ setId()

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

Definition at line 79 of file BatchOf.java.

79  {
80  this.id = id;
81  }

◆ setReceiptDate()

void org.turro.financials.entity.BatchOf.setReceiptDate ( Date  date)

Definition at line 115 of file BatchOf.java.

115  {
116  if(batch != null) {
117  batch.setReceiptDate(date);
118  }
119  for(Document doc : documents) {
120  if(!BatchOfType.BATCH_OF_DISCOUNTING.equals(type)) {
121  doc.setReceiptDate(date);
122  }
123  }
124  }
void setReceiptDate(Date receiptDate)
Definition: Document.java:256

◆ setStore()

void org.turro.financials.entity.BatchOf.setStore ( Contract  store)

Definition at line 95 of file BatchOf.java.

95  {
96  this.store = store;
97  for(Document d : documents) {
98  for(DocumentLine dl : d.getDocumentLines()) {
99  dl.setStore(store);
100  }
101  }
102  }
Here is the caller graph for this function:

◆ setType()

void org.turro.financials.entity.BatchOf.setType ( BatchOfType  type)

Definition at line 87 of file BatchOf.java.

87  {
88  this.type = type;
89  }

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