Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.pjsofts.eurobudget.util
Class AccountLib  view AccountLib download AccountLib.java

java.lang.Object
  extended bycom.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
 
Method Summary
static java.lang.Double[] balance(com.pjsofts.eurobudget.beans.Account account, java.util.Date targetDate, java.lang.Double targetAmount)
          prec params not null
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.
static java.util.Date getFirstOfAllDate(java.util.List list, boolean countCreationDate)
           
static java.util.Date getLastOfAllDate(java.util.List list)
           
static com.pjsofts.eurobudget.beans.Transaction getLastVerifiedTransaction(com.pjsofts.eurobudget.beans.Account account)
           
static java.lang.Double getSumAt(com.pjsofts.eurobudget.beans.Account account, java.util.Date targetDate)
           
static double[] getSums(com.pjsofts.eurobudget.beans.Account account)
          Basic balance sums ..
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)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccountLib

private AccountLib()
Creates a new instance of AccountLib can't be instanciated

Method Detail

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)