com.x8ing.mc.bp
Class BalanceSheet

java.lang.Object
  extended by com.x8ing.mc.bp.BalanceSheet

public class BalanceSheet
extends java.lang.Object

Takes care of all Moneytransactions and calculates the balance (saldo).

Author:
Patrick Heusser

Constructor Summary
BalanceSheet()
           
 
Method Summary
 void addTransaction(MoneyTransaction moneyTransaction)
           
 void addTransaction(java.lang.String bookingDescription, double amount, java.util.Calendar date, BalanceAccount account)
           
 double calculateCurrentBalance()
          calculate grand overal balance.
 double calculateCurrentBalanceForAccounts(BalanceAccount[] accounts)
          calculates the balance only for the passed accounts
 BalanceAccount[] getAllUsedAccounts()
           
 java.lang.String getPrintBalanceSheetAccountOverview()
          for bean access.
 java.lang.String getPrintBalanceSheetByAccount()
          for bean access.
 java.lang.String getPrintBalanceSheetByDate()
          for bean access.
 java.lang.String printBalanceSheetAccountOverview()
           
 java.lang.String printBalanceSheetAccountOverview(BalanceAccount[] accounts)
           
 java.lang.String printBalanceSheetByAccount(boolean supressSameDates)
           
 java.lang.String printBalanceSheetByAccount(boolean supressSameDates, BalanceAccount[] accounts)
           
 java.lang.String printBalanceSheetByDate(boolean supressSameDates)
           
 java.util.List searchMoneyTransactionOfAccountTypes(BalanceAccount[] accounts)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BalanceSheet

public BalanceSheet()
Method Detail

addTransaction

public void addTransaction(MoneyTransaction moneyTransaction)

addTransaction

public void addTransaction(java.lang.String bookingDescription,
                           double amount,
                           java.util.Calendar date,
                           BalanceAccount account)

searchMoneyTransactionOfAccountTypes

public java.util.List searchMoneyTransactionOfAccountTypes(BalanceAccount[] accounts)
Parameters:
accounts -
Returns:
List with type MoneyTransaction

calculateCurrentBalanceForAccounts

public double calculateCurrentBalanceForAccounts(BalanceAccount[] accounts)
calculates the balance only for the passed accounts


calculateCurrentBalance

public double calculateCurrentBalance()
calculate grand overal balance.


getAllUsedAccounts

public BalanceAccount[] getAllUsedAccounts()

printBalanceSheetAccountOverview

public java.lang.String printBalanceSheetAccountOverview()

printBalanceSheetAccountOverview

public java.lang.String printBalanceSheetAccountOverview(BalanceAccount[] accounts)

printBalanceSheetByAccount

public java.lang.String printBalanceSheetByAccount(boolean supressSameDates)

printBalanceSheetByAccount

public java.lang.String printBalanceSheetByAccount(boolean supressSameDates,
                                                   BalanceAccount[] accounts)

printBalanceSheetByDate

public java.lang.String printBalanceSheetByDate(boolean supressSameDates)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPrintBalanceSheetByDate

public java.lang.String getPrintBalanceSheetByDate()
for bean access.


getPrintBalanceSheetByAccount

public java.lang.String getPrintBalanceSheetByAccount()
for bean access.


getPrintBalanceSheetAccountOverview

public java.lang.String getPrintBalanceSheetAccountOverview()
for bean access.



by Patrick Heusser