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

Public Member Functions

 AccountItem (RegisterView view, Account account, double balance)
 
 AccountItem (long idView, String idAccount, double balance)
 
boolean equals (Object obj)
 
int hashCode ()
 
int compareTo (AccountItem o)
 

Static Public Member Functions

static AccountItem createAccountItem (RegisterView view, Account account, double balance)
 

Public Attributes

RegisterView view
 
Account account
 
double balance
 

Detailed Description

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

Definition at line 31 of file AccountItem.java.

Constructor & Destructor Documentation

◆ AccountItem() [1/2]

org.turro.financials.model.register.AccountItem.AccountItem ( RegisterView  view,
Account  account,
double  balance 
)

Definition at line 44 of file AccountItem.java.

Here is the caller graph for this function:

◆ AccountItem() [2/2]

org.turro.financials.model.register.AccountItem.AccountItem ( long  idView,
String  idAccount,
double  balance 
)

Definition at line 50 of file AccountItem.java.

50  {
51  Dao dao = new FinancialsPU();
52  this.view = dao.find(RegisterView.class, idView);
53  this.account = dao.find(Account.class, idAccount);
54  this.balance = balance;
55  }

Member Function Documentation

◆ compareTo()

int org.turro.financials.model.register.AccountItem.compareTo ( AccountItem  o)

Definition at line 88 of file AccountItem.java.

88  {
89  int result = CompareUtil.compare(view.getId(), o.view.getId());
90  if(result == 0) {
91  result = CompareUtil.compare(account.getId(), o.account.getId());
92  }
93  if(result == 0) {
94  result = CompareUtil.compare(balance, o.balance);
95  }
96  return result;
97  }
Here is the call graph for this function:

◆ createAccountItem()

static AccountItem org.turro.financials.model.register.AccountItem.createAccountItem ( RegisterView  view,
Account  account,
double  balance 
)
static

Definition at line 37 of file AccountItem.java.

37  {
38  if(!Zero.near(balance, 2)) {
39  return new AccountItem(view, account, balance);
40  }
41  return null;
42  }
AccountItem(RegisterView view, Account account, double balance)
Here is the call graph for this function:

◆ equals()

boolean org.turro.financials.model.register.AccountItem.equals ( Object  obj)

Definition at line 58 of file AccountItem.java.

58  {
59  if (obj == null) {
60  return false;
61  }
62  if (getClass() != obj.getClass()) {
63  return false;
64  }
65  final AccountItem other = (AccountItem) obj;
66  if (this.view != other.view && (this.view == null || !this.view.equals(other.view))) {
67  return false;
68  }
69  if (this.account != other.account && (this.account == null || !this.account.equals(other.account))) {
70  return false;
71  }
72  if (Double.doubleToLongBits(this.balance) != Double.doubleToLongBits(other.balance)) {
73  return false;
74  }
75  return true;
76  }
Here is the call graph for this function:

◆ hashCode()

int org.turro.financials.model.register.AccountItem.hashCode ( )

Definition at line 79 of file AccountItem.java.

79  {
80  int hash = 7;
81  hash = 19 * hash + (this.view != null ? this.view.hashCode() : 0);
82  hash = 19 * hash + (this.account != null ? this.account.hashCode() : 0);
83  hash = 19 * hash + (int) (Double.doubleToLongBits(this.balance) ^ (Double.doubleToLongBits(this.balance) >>> 32));
84  return hash;
85  }

Member Data Documentation

◆ account

Account org.turro.financials.model.register.AccountItem.account

Definition at line 34 of file AccountItem.java.

◆ balance

double org.turro.financials.model.register.AccountItem.balance

Definition at line 35 of file AccountItem.java.

◆ view

RegisterView org.turro.financials.model.register.AccountItem.view

Definition at line 33 of file AccountItem.java.


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