org.homeunix.thecave.buddi.model
Interface Account

All Superinterfaces:
java.lang.Comparable<ModelObject>, ModelObject, Source
All Known Implementing Classes:
AccountImpl

public interface Account
extends Source


Method Summary
 AccountType getAccountType()
          Get the account type
 long getBalance()
          Returns the current balance.
 long getBalance(java.util.Date d)
          Returns the balance as of the given date.
 long getOverdraftCreditLimit()
          Returns the overdraft limit for Debit accounts, or Credit Limit for Credit accounts.
 java.util.Date getStartDate()
          Returns the starting date of this account.
 long getStartingBalance()
          Returns the starting balance associated with this account.
 void setAccountType(AccountType accountType)
          Sets the account type
 void setOverdraftCreditLimit(long overdraftLimit)
          Sets the overdraft limit for debit accounts, or the credit limit for credit accounts.
 void setStartDate(java.util.Date startDate)
          Sets the starting date of this account.
 void setStartingBalance(long startingBalance)
          Sets the starting balance
 void updateBalance()
          Updates the balance for this account, by navigating all associated transactions.
 
Methods inherited from interface org.homeunix.thecave.buddi.model.Source
getFullName, getName, getNotes, isDeleted, setDeleted, setName, setNotes
 
Methods inherited from interface org.homeunix.thecave.buddi.model.ModelObject
compareTo, getDocument, getModified, getUid, setChanged, setDocument
 

Method Detail

getAccountType

AccountType getAccountType()
Get the account type

Returns:

getBalance

long getBalance()
Returns the current balance. This is a volatile value, and is generated by calling updateBalance().

Returns:

getBalance

long getBalance(java.util.Date d)
Returns the balance as of the given date.

Parameters:
d -
Returns:

getStartDate

java.util.Date getStartDate()
Returns the starting date of this account.

Returns:

setStartDate

void setStartDate(java.util.Date startDate)
Sets the starting date of this account.

Parameters:
startDate -

getStartingBalance

long getStartingBalance()
Returns the starting balance associated with this account.

Returns:

setAccountType

void setAccountType(AccountType accountType)
                    throws InvalidValueException
Sets the account type

Parameters:
accountType -
Throws:
InvalidValueException

setStartingBalance

void setStartingBalance(long startingBalance)
                        throws InvalidValueException
Sets the starting balance

Parameters:
startingBalance -
Throws:
InvalidValueException

updateBalance

void updateBalance()
Updates the balance for this account, by navigating all associated transactions. Calling this will also update the balanceTo or balanceFrom fields in each transaction, representing the balance at the time of that transaction.


setOverdraftCreditLimit

void setOverdraftCreditLimit(long overdraftLimit)
                             throws InvalidValueException
Sets the overdraft limit for debit accounts, or the credit limit for credit accounts.

Parameters:
overdraftLimit -
Throws:
InvalidValueException

getOverdraftCreditLimit

long getOverdraftCreditLimit()
Returns the overdraft limit for Debit accounts, or Credit Limit for Credit accounts.

Returns: