Venice 0.7beta

org.mov.portfolio
Interface Account

All Known Implementing Classes:
AbstractAccount, CashAccount, ShareAccount

public interface Account

Generic interface for all financial account objects. This interface defines some generic properties that all accounts need to have such as name, type and value.

Author:
Andrew Leppard

Field Summary
static int CASH_ACCOUNT
          Account is a cash account (bank account, cash management account etc)
static int SHARE_ACCOUNT
          Account is a share trading account which contains a list of shares
 
Method Summary
 Currency getCurrency()
          Return the currency of the account.
 java.lang.String getName()
          Return the name of this account.
 int getType()
          Return the type of this account.
 Money getValue(EODQuoteBundle quoteBundle, int dateOffset)
          Return the value of this account on the given day.
 Money getValue(EODQuoteBundle quoteBundle, TradingDate date)
          Return the value of this account on the given day.
 void removeAllTransactions()
          Remove all transactions from account.
 void transaction(Transaction transaction)
          Perform a transaction on this account.
 

Field Detail

CASH_ACCOUNT

static final int CASH_ACCOUNT
Account is a cash account (bank account, cash management account etc)

See Also:
Constant Field Values

SHARE_ACCOUNT

static final int SHARE_ACCOUNT
Account is a share trading account which contains a list of shares

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
Return the name of this account.

Returns:
name of the account

getType

int getType()
Return the type of this account.

Returns:
type of the account, either CASH_ACCOUNT or SHARE_ACCOUNT

getValue

Money getValue(EODQuoteBundle quoteBundle,
               int dateOffset)
               throws MissingQuoteException
Return the value of this account on the given day.

Parameters:
quoteBundle - the quote bundle
dateOffset - fast date offset
Throws:
MissingQuoteException

getValue

Money getValue(EODQuoteBundle quoteBundle,
               TradingDate date)
               throws MissingQuoteException
Return the value of this account on the given day.

Parameters:
quoteBundle - the quote bundle
date - the date
Throws:
MissingQuoteException

getCurrency

Currency getCurrency()
Return the currency of the account.

Returns:
default currency.

transaction

void transaction(Transaction transaction)
Perform a transaction on this account.

Parameters:
transaction - transaction to occur

removeAllTransactions

void removeAllTransactions()
Remove all transactions from account.


Venice 0.7beta