net.sourceforge.eclipsetrader.core.db
Class Account
java.lang.Object
java.util.Observable
net.sourceforge.eclipsetrader.core.db.PersistentObject
net.sourceforge.eclipsetrader.core.db.Account
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- DefaultAccount
- public abstract class Account
- extends PersistentObject
- implements java.lang.Cloneable
Methods inherited from class java.util.Observable |
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Account
public Account()
Account
public Account(java.lang.Integer id)
getPluginId
public java.lang.String getPluginId()
setPluginId
public void setPluginId(java.lang.String serviceId)
getDescription
public java.lang.String getDescription()
setDescription
public void setDescription(java.lang.String description)
getCurrency
public java.util.Currency getCurrency()
setCurrency
public void setCurrency(java.util.Currency currency)
getInitialBalance
public double getInitialBalance()
setInitialBalance
public void setInitialBalance(double initbalance)
getGroup
public AccountGroup getGroup()
setGroup
public void setGroup(AccountGroup group)
getPreferenceStore
public PersistentPreferenceStore getPreferenceStore()
setPreferenceStore
public void setPreferenceStore(PersistentPreferenceStore preferenceStore)
getTransactions
public ObservableList getTransactions()
setTransactions
public void setTransactions(java.util.List transactions)
getBalance
public double getBalance()
- Gets the balance of the account
- Returns:
- the account's balance
getPosition
public int getPosition(Security security)
- Return the number of stocks held for the given security.
- Parameters:
security
- the security to search
- Returns:
- holded quantity
getPortfolio
public java.util.List getPortfolio()
getPortfolio
public PortfolioPosition getPortfolio(Security security)
getExpenses
public double getExpenses(Security security,
int quantity,
double price)
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Throws:
java.lang.CloneNotSupportedException