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

Public Member Functions

 MultiRegisterEntry (Register register)
 
 MultiRegisterEntry (RegisterEntry entry)
 
Account getAccount ()
 
void setAccount (Account account)
 
double getAccountBalance ()
 
void setAccountBalance (double accountBalance)
 
double getBalance ()
 
void setBalance (double balance)
 
String getConcept ()
 
void setConcept (String concept)
 
double getCredit ()
 
void setCredit (double credit)
 
Date getDate ()
 
void setDate (Date date)
 
double getDebit ()
 
void setDebit (double debit)
 
RegisterEntry getEntry ()
 
void setEntry (RegisterEntry entry)
 
boolean isNewRegister ()
 
void setNewRegister (boolean newRegister)
 
int getOrder ()
 
void setOrder (int order)
 
RegisterView getView ()
 
void setView (RegisterView view)
 
boolean isValid ()
 
void deleteEntry ()
 
void checkValues (int cellIndex)
 
boolean isSameRegister (MultiRegisterEntry newEntry)
 
int compareTo (MultiRegisterEntry o)
 

Detailed Description

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

Definition at line 32 of file MultiRegisterEntry.java.

Constructor & Destructor Documentation

◆ MultiRegisterEntry() [1/2]

org.turro.financials.model.register.MultiRegisterEntry.MultiRegisterEntry ( Register  register)

Definition at line 42 of file MultiRegisterEntry.java.

42  {
43  this((RegisterEntry) null);
44  if(register != null) {
45  entry.setRegister(register);
46  register.getRegisterEntries().add(entry);
47  date = register.getRegisterDate();
48  view = register.getView();
49  }
50  }
Here is the call graph for this function:

◆ MultiRegisterEntry() [2/2]

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

Definition at line 52 of file MultiRegisterEntry.java.

52  {
53  this.entry = entry;
54  if(this.entry == null) {
55  this.entry = new RegisterEntry();
56  }
57  if(this.entry.getRegister() != null) {
58  date = this.entry.getRegister().getRegisterDate();
59  view = this.entry.getRegister().getView();
60  }
61  }
Here is the call graph for this function:

Member Function Documentation

◆ checkValues()

void org.turro.financials.model.register.MultiRegisterEntry.checkValues ( int  cellIndex)

Definition at line 166 of file MultiRegisterEntry.java.

166  {
167  if(cellIndex == 5 && !Zero.near(getDebit(), 2)) {
168  setCredit(0);
169  } else if(cellIndex == 6 && !Zero.near(getCredit(), 2)) {
170  setDebit(0);
171  }
172  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compareTo()

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

Definition at line 181 of file MultiRegisterEntry.java.

181  {
182  int result = CompareUtil.compare(order, o.order);
183  if(result == 0) {
184  result = CompareUtil.compare(entry.getEntryOrder(), o.entry.getEntryOrder());
185  }
186  if(result == 0) {
187  result = CompareUtil.compare(date, o.date);
188  }
189  if(result == 0) {
190  result = CompareUtil.compare(view.getId(), o.view.getId());
191  }
192  if(result == 0 && getAccount() != null && o.getAccount() != null) {
193  result = CompareUtil.compare(getAccount().getId(), o.getAccount().getId());
194  }
195  if(result == 0) {
196  result = CompareUtil.compare(getConcept(), o.getConcept());
197  }
198  if(result == 0) {
199  result = CompareUtil.compare(getDebit(), o.getDebit());
200  }
201  if(result == 0) {
202  result = CompareUtil.compare(getCredit(), o.getCredit());
203  }
204  if(result == 0) {
205  result = CompareUtil.compare(entry.getId(), o.entry.getId());
206  }
207  return result;
208  }
Here is the call graph for this function:

◆ deleteEntry()

void org.turro.financials.model.register.MultiRegisterEntry.deleteEntry ( )

Definition at line 158 of file MultiRegisterEntry.java.

158  {
159  Register register = entry.getRegister();
160  if(register != null) {
161  register.getRegisterEntries().remove(entry);
162  entry.setRegister(null);
163  }
164  }
Set< RegisterEntry > getRegisterEntries()
Definition: Register.java:135
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAccount()

Account org.turro.financials.model.register.MultiRegisterEntry.getAccount ( )

Definition at line 63 of file MultiRegisterEntry.java.

63  {
64  return entry.getAccount();
65  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAccountBalance()

double org.turro.financials.model.register.MultiRegisterEntry.getAccountBalance ( )

Definition at line 71 of file MultiRegisterEntry.java.

71  {
72  return accountBalance;
73  }

◆ getBalance()

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

Definition at line 79 of file MultiRegisterEntry.java.

79  {
80  return balance;
81  }

◆ getConcept()

String org.turro.financials.model.register.MultiRegisterEntry.getConcept ( )

Definition at line 87 of file MultiRegisterEntry.java.

87  {
88  return entry.getConcept();
89  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCredit()

double org.turro.financials.model.register.MultiRegisterEntry.getCredit ( )

Definition at line 95 of file MultiRegisterEntry.java.

95  {
96  return entry.getCredit();
97  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDate()

Date org.turro.financials.model.register.MultiRegisterEntry.getDate ( )

Definition at line 103 of file MultiRegisterEntry.java.

103  {
104  return date;
105  }
Here is the caller graph for this function:

◆ getDebit()

double org.turro.financials.model.register.MultiRegisterEntry.getDebit ( )

Definition at line 111 of file MultiRegisterEntry.java.

111  {
112  return entry.getDebit();
113  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEntry()

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

Definition at line 119 of file MultiRegisterEntry.java.

119  {
120  return entry;
121  }
Here is the caller graph for this function:

◆ getOrder()

int org.turro.financials.model.register.MultiRegisterEntry.getOrder ( )

Definition at line 135 of file MultiRegisterEntry.java.

135  {
136  return order;
137  }

◆ getView()

RegisterView org.turro.financials.model.register.MultiRegisterEntry.getView ( )

Definition at line 143 of file MultiRegisterEntry.java.

143  {
144  return view;
145  }
Here is the caller graph for this function:

◆ isNewRegister()

boolean org.turro.financials.model.register.MultiRegisterEntry.isNewRegister ( )

Definition at line 127 of file MultiRegisterEntry.java.

127  {
128  return newRegister;
129  }

◆ isSameRegister()

boolean org.turro.financials.model.register.MultiRegisterEntry.isSameRegister ( MultiRegisterEntry  newEntry)

Definition at line 174 of file MultiRegisterEntry.java.

174  {
175  return !newRegister &&
176  newEntry.getDate().equals(date) &&
177  newEntry.getView().getId() == view.getId();
178  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isValid()

boolean org.turro.financials.model.register.MultiRegisterEntry.isValid ( )

Definition at line 151 of file MultiRegisterEntry.java.

151  {
152  return view != null &&
153  date != null &&
154  entry != null &&
155  !entry.isEmpty();
156  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAccount()

void org.turro.financials.model.register.MultiRegisterEntry.setAccount ( Account  account)

Definition at line 67 of file MultiRegisterEntry.java.

67  {
68  this.entry.setAccount(account);
69  }
Here is the call graph for this function:

◆ setAccountBalance()

void org.turro.financials.model.register.MultiRegisterEntry.setAccountBalance ( double  accountBalance)

Definition at line 75 of file MultiRegisterEntry.java.

75  {
76  this.accountBalance = accountBalance;
77  }

◆ setBalance()

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

Definition at line 83 of file MultiRegisterEntry.java.

83  {
84  this.balance = balance;
85  }

◆ setConcept()

void org.turro.financials.model.register.MultiRegisterEntry.setConcept ( String  concept)

Definition at line 91 of file MultiRegisterEntry.java.

91  {
92  this.entry.setConcept(concept);
93  }
Here is the call graph for this function:

◆ setCredit()

void org.turro.financials.model.register.MultiRegisterEntry.setCredit ( double  credit)

Definition at line 99 of file MultiRegisterEntry.java.

99  {
100  this.entry.setCredit(credit);
101  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDate()

void org.turro.financials.model.register.MultiRegisterEntry.setDate ( Date  date)

Definition at line 107 of file MultiRegisterEntry.java.

107  {
108  this.date = date;
109  }
Here is the caller graph for this function:

◆ setDebit()

void org.turro.financials.model.register.MultiRegisterEntry.setDebit ( double  debit)

Definition at line 115 of file MultiRegisterEntry.java.

115  {
116  this.entry.setDebit(debit);
117  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEntry()

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

Definition at line 123 of file MultiRegisterEntry.java.

123  {
124  this.entry = entry;
125  }

◆ setNewRegister()

void org.turro.financials.model.register.MultiRegisterEntry.setNewRegister ( boolean  newRegister)

Definition at line 131 of file MultiRegisterEntry.java.

131  {
132  this.newRegister = newRegister;
133  }

◆ setOrder()

void org.turro.financials.model.register.MultiRegisterEntry.setOrder ( int  order)

Definition at line 139 of file MultiRegisterEntry.java.

139  {
140  this.order = order;
141  }

◆ setView()

void org.turro.financials.model.register.MultiRegisterEntry.setView ( RegisterView  view)

Definition at line 147 of file MultiRegisterEntry.java.

147  {
148  this.view = view;
149  }
Here is the caller graph for this function:

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