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

Public Member Functions

 EntryWrapper (RegisterEntry entry)
 
double getBalance ()
 
void setBalance (double balance)
 
RegisterEntry getEntry ()
 
void setEntry (RegisterEntry entry)
 
double getSingleBalance ()
 
boolean entryEquals (RegisterEntry re)
 
int compareTo (EntryWrapper o)
 
boolean equals (Object obj)
 
int hashCode ()
 

Detailed Description

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

Definition at line 27 of file EntryWrapper.java.

Constructor & Destructor Documentation

◆ EntryWrapper()

org.turro.financials.model.register.EntryWrapper.EntryWrapper ( RegisterEntry  entry)

Definition at line 32 of file EntryWrapper.java.

32  {
33  this.entry = entry;
34  }
Here is the caller graph for this function:

Member Function Documentation

◆ compareTo()

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

Definition at line 65 of file EntryWrapper.java.

65  {
66  int result = 0;
67  if(entry.getAccount() != null && o.getEntry().getAccount() != null) {
68  result = entry.getAccount().getId().compareTo(o.getEntry().getAccount().getId());
69  }
70  if(result == 0) {
71  result = CompareUtil.compare(entry.getConcept(), o.getEntry().getConcept());
72  }
73  if(result == 0) {
74  result = CompareUtil.compare(entry.getDebit(), o.getEntry().getDebit());
75  }
76  if(result == 0) {
77  result = CompareUtil.compare(entry.getCredit(), o.getEntry().getCredit());
78  }
79  if(result == 0) {
80  result = CompareUtil.compare(entry.getId(), o.getEntry().getId());
81  }
82  return result;
83  }
Here is the call graph for this function:

◆ entryEquals()

boolean org.turro.financials.model.register.EntryWrapper.entryEquals ( RegisterEntry  re)

Definition at line 56 of file EntryWrapper.java.

56  {
57  return entry.getAccount().getId().equals(re.getAccount().getId()) &&
58  entry.getConcept().equals(re.getConcept()) &&
59  ((entry.getCredit() != 0 && re.getCredit() != 0) ||
60  (entry.getDebit() != 0 && re.getDebit() != 0));
61 
62  }
Here is the call graph for this function:

◆ equals()

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

Definition at line 86 of file EntryWrapper.java.

86  {
87  if (obj == null) {
88  return false;
89  }
90  if (getClass() != obj.getClass()) {
91  return false;
92  }
93  final EntryWrapper other = (EntryWrapper) obj;
94  if(this.entry != other.entry && (this.entry == null || !(this.entry.getId() == other.entry.getId()))) {
95  return false;
96  }
97  return true;
98  }
Here is the call graph for this function:

◆ getBalance()

double org.turro.financials.model.register.EntryWrapper.getBalance ( )

Definition at line 36 of file EntryWrapper.java.

36  {
37  return balance;
38  }

◆ getEntry()

RegisterEntry org.turro.financials.model.register.EntryWrapper.getEntry ( )

Definition at line 44 of file EntryWrapper.java.

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

◆ getSingleBalance()

double org.turro.financials.model.register.EntryWrapper.getSingleBalance ( )

Definition at line 52 of file EntryWrapper.java.

52  {
53  return entry.getDebit() - entry.getCredit();
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hashCode()

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

Definition at line 101 of file EntryWrapper.java.

101  {
102  int hash = 3;
103  hash = 37 * hash + (this.entry != null ? this.entry.hashCode() : 0);
104  return hash;
105  }

◆ setBalance()

void org.turro.financials.model.register.EntryWrapper.setBalance ( double  balance)

Definition at line 40 of file EntryWrapper.java.

40  {
41  this.balance = balance;
42  }
Here is the caller graph for this function:

◆ setEntry()

void org.turro.financials.model.register.EntryWrapper.setEntry ( RegisterEntry  entry)

Definition at line 48 of file EntryWrapper.java.

48  {
49  this.entry = entry;
50  }

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