java.lang.Object
com.pjsofts.eurobudget.util.AccountLib
- public abstract class AccountLib
- extends java.lang.Object
Regroup all computation, convenient methods related to account and transactions
Should not change data of account but just create new ones or transmit information.
(otherwhise notification on changes will not be done)
|
Constructor Summary |
private |
AccountLib()
Creates a new instance of AccountLib
can't be instanciated |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccountLib
private AccountLib()
- Creates a new instance of AccountLib
can't be instanciated
getTxns
public static java.util.List getTxns(com.pjsofts.eurobudget.beans.Account account,
java.util.Date start,
java.util.Date end)
- Get a list of transaction on a ranged period (optimize way to get txn when working in a period)
computeTotals
public static com.pjsofts.eurobudget.data.Totals computeTotals(com.pjsofts.eurobudget.beans.Account account,
java.util.Date startDate,
java.util.Date endDate)
- Compute many totals related to an account
Will count the original amount of account only if startDate is null.
getSums
public static double[] getSums(com.pjsofts.eurobudget.beans.Account account)
- Basic balance sums ..
Add initial balance of the account at the beginning
getSumAt
public static java.lang.Double getSumAt(com.pjsofts.eurobudget.beans.Account account,
java.util.Date targetDate)
balance
public static java.lang.Double[] balance(com.pjsofts.eurobudget.beans.Account account,
java.util.Date targetDate,
java.lang.Double targetAmount)
- prec params not null
getFirstOfAllDate
public static java.util.Date getFirstOfAllDate(java.util.List list,
boolean countCreationDate)
getLastOfAllDate
public static java.util.Date getLastOfAllDate(java.util.List list)
getLastVerifiedTransaction
public static com.pjsofts.eurobudget.beans.Transaction getLastVerifiedTransaction(com.pjsofts.eurobudget.beans.Account account)