BrightSide Workbench Full Report + Source Code
org.turro.financials.register.AccountRI Class Reference

Public Member Functions

 AccountRI (Account account, BalanceFilter filter)
 
String getId ()
 
String getDescription ()
 
Double getDebitA ()
 
Double getCreditA ()
 
Double getBalanceA ()
 
Double getDebitB ()
 
Double getCreditB ()
 
Double getBalanceB ()
 
Double getDebit ()
 
Double getCredit ()
 
Double getBalance ()
 
String getParentId ()
 
AccountRI getAccountRI ()
 
String getMajorName (String major)
 

Detailed Description

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

Definition at line 29 of file AccountRI.java.

Constructor & Destructor Documentation

◆ AccountRI()

org.turro.financials.register.AccountRI.AccountRI ( Account  account,
BalanceFilter  filter 
)

Definition at line 36 of file AccountRI.java.

36  {
37  this.account = account;
38  this.filter = filter;
39  amountsA = filter.getAmountsA(account.getId());
40  amountsB = filter.getAmountsB(account.getId());
41  parentId = account.getParent().getAccount();
42  }
Here is the call graph for this function:

Member Function Documentation

◆ getAccountRI()

AccountRI org.turro.financials.register.AccountRI.getAccountRI ( )

Definition at line 92 of file AccountRI.java.

92  {
93  return this;
94  }

◆ getBalance()

Double org.turro.financials.register.AccountRI.getBalance ( )

Definition at line 84 of file AccountRI.java.

Here is the call graph for this function:

◆ getBalanceA()

Double org.turro.financials.register.AccountRI.getBalanceA ( )

Definition at line 60 of file AccountRI.java.

Here is the call graph for this function:

◆ getBalanceB()

Double org.turro.financials.register.AccountRI.getBalanceB ( )

Definition at line 72 of file AccountRI.java.

Here is the call graph for this function:

◆ getCredit()

Double org.turro.financials.register.AccountRI.getCredit ( )

Definition at line 80 of file AccountRI.java.

80  {
81  return amountsA[1] - amountsB[1];
82  }
Here is the caller graph for this function:

◆ getCreditA()

Double org.turro.financials.register.AccountRI.getCreditA ( )

Definition at line 56 of file AccountRI.java.

56  {
57  return amountsA[1];
58  }
Here is the caller graph for this function:

◆ getCreditB()

Double org.turro.financials.register.AccountRI.getCreditB ( )

Definition at line 68 of file AccountRI.java.

68  {
69  return amountsB[1];
70  }
Here is the caller graph for this function:

◆ getDebit()

Double org.turro.financials.register.AccountRI.getDebit ( )

Definition at line 76 of file AccountRI.java.

76  {
77  return amountsA[0] - amountsB[0];
78  }
Here is the caller graph for this function:

◆ getDebitA()

Double org.turro.financials.register.AccountRI.getDebitA ( )

Definition at line 52 of file AccountRI.java.

52  {
53  return amountsA[0];
54  }
Here is the caller graph for this function:

◆ getDebitB()

Double org.turro.financials.register.AccountRI.getDebitB ( )

Definition at line 64 of file AccountRI.java.

64  {
65  return amountsB[0];
66  }
Here is the caller graph for this function:

◆ getDescription()

String org.turro.financials.register.AccountRI.getDescription ( )

Definition at line 48 of file AccountRI.java.

48  {
49  return account.getDescription();
50  }
Here is the call graph for this function:

◆ getId()

String org.turro.financials.register.AccountRI.getId ( )

Definition at line 44 of file AccountRI.java.

44  {
45  return account.getId();
46  }
Here is the call graph for this function:

◆ getMajorName()

String org.turro.financials.register.AccountRI.getMajorName ( String  major)

Definition at line 96 of file AccountRI.java.

96  {
97  if(major != null && major.length() > 0) {
98  List l = new FinancialsPU().getResultList(
99  "select m from MajorAccount as m " +
100  "where m.account = '" + major + "' " +
101  "order by m.account desc");
102  if(!l.isEmpty()) {
103  return ((MajorAccount) l.get(0)).getDescription();
104  }
105  }
106  return null;
107  }

◆ getParentId()

String org.turro.financials.register.AccountRI.getParentId ( )

Definition at line 88 of file AccountRI.java.

88  {
89  return parentId;
90  }

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