BrightSide Workbench Full Report + Source Code
org.turro.financials.treasury.m111.ModelEntry Class Reference
Inheritance diagram for org.turro.financials.treasury.m111.ModelEntry:
Collaboration diagram for org.turro.financials.treasury.m111.ModelEntry:

Public Member Functions

 ModelEntry (ModelSet set, ModelType type, double perCent)
 
double getPerCent ()
 
double getTaxable ()
 
ModelType getType ()
 
Map< Long, EntryContractgetContracts ()
 
double getRetention ()
 
Dao getDao ()
 
void addValue (long contractId, String contractName, long documentId, double retention, double taxable)
 
int compareTo (ModelEntry o)
 

Detailed Description

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

Definition at line 30 of file m111/ModelEntry.java.

Constructor & Destructor Documentation

◆ ModelEntry()

org.turro.financials.treasury.m111.ModelEntry.ModelEntry ( ModelSet  set,
ModelType  type,
double  perCent 
)

Definition at line 37 of file m111/ModelEntry.java.

37  {
38  this.set = set;
39  this.type = type;
40  this.perCent = new Round(perCent).decimals(2).value();
41  }
Here is the call graph for this function:

Member Function Documentation

◆ addValue()

void org.turro.financials.treasury.m111.ModelEntry.addValue ( long  contractId,
String  contractName,
long  documentId,
double  retention,
double  taxable 
)

Definition at line 76 of file m111/ModelEntry.java.

76  {
77  EntryContract ec = contracts.get(contractId);
78  if(ec == null) {
79  ec = new EntryContract(contractId, contractName);
80  contracts.put(contractId, ec);
81  }
82  ec.addDocument(documentId, retention, taxable);
83  //this.taxable += taxable;
84  }
Here is the call graph for this function:

◆ compareTo()

int org.turro.financials.treasury.m111.ModelEntry.compareTo ( ModelEntry  o)

Definition at line 87 of file m111/ModelEntry.java.

87  {
88  int result = CompareUtil.compare(type.getOrder(), o.type.getOrder());
89  if(result == 0) {
90  result = CompareUtil.compare(perCent, o.perCent);
91  }
92  return result;
93  }
Here is the call graph for this function:

◆ getContracts()

Map<Long, EntryContract> org.turro.financials.treasury.m111.ModelEntry.getContracts ( )

Definition at line 60 of file m111/ModelEntry.java.

60  {
61  return contracts;
62  }

◆ getDao()

Dao org.turro.financials.treasury.m111.ModelEntry.getDao ( )

Definition at line 72 of file m111/ModelEntry.java.

72  {
73  return set.getDao();
74  }

◆ getPerCent()

double org.turro.financials.treasury.m111.ModelEntry.getPerCent ( )

Definition at line 43 of file m111/ModelEntry.java.

43  {
44  return perCent;
45  }

◆ getRetention()

double org.turro.financials.treasury.m111.ModelEntry.getRetention ( )

Definition at line 64 of file m111/ModelEntry.java.

64  {
65  double total = 0.0;
66  for(EntryContract ec : contracts.values()) {
67  total += ec.getRetention();
68  }
69  return total;
70  }

◆ getTaxable()

double org.turro.financials.treasury.m111.ModelEntry.getTaxable ( )

Definition at line 47 of file m111/ModelEntry.java.

47  {
48  double total = 0.0;
49  for(EntryContract ec : contracts.values()) {
50  total += ec.getTaxable();
51  }
52  return total;
53  //return taxable;
54  }

◆ getType()

ModelType org.turro.financials.treasury.m111.ModelEntry.getType ( )

Definition at line 56 of file m111/ModelEntry.java.

56  {
57  return type;
58  }

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