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

Public Member Functions

 AnnualTransaction (String view, String opKey, String contractor)
 
String getView ()
 
String getOpKey ()
 
double getOperationsAmount (int quarter)
 
void addOperationsAmount (int quarter, double operationsAmount)
 
double getOperationsAmountSum ()
 
Contact getContact ()
 
int compareTo (AnnualTransaction o)
 

Detailed Description

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

Definition at line 28 of file AnnualTransaction.java.

Constructor & Destructor Documentation

◆ AnnualTransaction()

org.turro.financials.model.document.AnnualTransaction.AnnualTransaction ( String  view,
String  opKey,
String  contractor 
)

Definition at line 33 of file AnnualTransaction.java.

33  {
34  this.view = view;
35  this.opKey = opKey;
36  this.contractor = contractor;
37  operationsAmount = new double[4];
38  }

Member Function Documentation

◆ addOperationsAmount()

void org.turro.financials.model.document.AnnualTransaction.addOperationsAmount ( int  quarter,
double  operationsAmount 
)

Definition at line 52 of file AnnualTransaction.java.

52  {
53  this.operationsAmount[quarter - 1] += operationsAmount;
54  }
Here is the caller graph for this function:

◆ compareTo()

int org.turro.financials.model.document.AnnualTransaction.compareTo ( AnnualTransaction  o)

Definition at line 69 of file AnnualTransaction.java.

69  {
70  int result = CompareUtil.compare(view, o.view);
71  if(result == 0) {
72  result = CompareUtil.compare(opKey, o.opKey);
73  }
74  if(result == 0) {
75  result = CompareUtil.compare(contractor, o.contractor);
76  }
77  return result;
78  }

◆ getContact()

Contact org.turro.financials.model.document.AnnualTransaction.getContact ( )

Definition at line 64 of file AnnualTransaction.java.

64  {
65  return new ContactsPU().find(Contact.class, contractor);
66  }
Here is the caller graph for this function:

◆ getOperationsAmount()

double org.turro.financials.model.document.AnnualTransaction.getOperationsAmount ( int  quarter)

Definition at line 48 of file AnnualTransaction.java.

48  {
49  return operationsAmount[quarter - 1];
50  }
Here is the caller graph for this function:

◆ getOperationsAmountSum()

double org.turro.financials.model.document.AnnualTransaction.getOperationsAmountSum ( )

Definition at line 56 of file AnnualTransaction.java.

56  {
57  double result = 0.0;
58  for(int i = 0; i < 4; i++) {
59  result += operationsAmount[i];
60  }
61  return result;
62  }
Here is the caller graph for this function:

◆ getOpKey()

String org.turro.financials.model.document.AnnualTransaction.getOpKey ( )

Definition at line 44 of file AnnualTransaction.java.

44  {
45  return opKey;
46  }
Here is the caller graph for this function:

◆ getView()

String org.turro.financials.model.document.AnnualTransaction.getView ( )

Definition at line 40 of file AnnualTransaction.java.

40  {
41  return view;
42  }
Here is the caller graph for this function:

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