com.moneydance.apps.md.model
Class SecurityAccount

java.lang.Object
  extended by com.moneydance.apps.md.model.Account
      extended by com.moneydance.apps.md.model.SecurityAccount

public class SecurityAccount
extends Account

An account representing a stock or security. SecurityAccounts must be children of the investment account to which they are attached.


Field Summary
static int COMPOUNDING_ANNUALLY
           
static int COMPOUNDING_DAILY
           
static int COMPOUNDING_MONTHLY
           
static int COMPOUNDING_QUARTERLY
           
static int COMPOUNDING_WEEKLY
           
static int SECURITY_TYPE_BOND
           
static int SECURITY_TYPE_CD
           
static int SECURITY_TYPE_MUTUAL
           
static int SECURITY_TYPE_OPTION
           
static int SECURITY_TYPE_STOCK
           
 
Fields inherited from class com.moneydance.apps.md.model.Account
ACCOUNT_TYPE_ASSET, ACCOUNT_TYPE_BANK, ACCOUNT_TYPE_CREDIT_CARD, ACCOUNT_TYPE_EXPENSE, ACCOUNT_TYPE_INCOME, ACCOUNT_TYPE_INVESTMENT, ACCOUNT_TYPE_LIABILITY, ACCOUNT_TYPE_LOAN, ACCOUNT_TYPE_ROOT, ACCOUNT_TYPE_SECURITY, BUDGET_CLASS_DISCRETIONARY, BUDGET_CLASS_INCOME, BUDGET_CLASS_MISC, BUDGET_CLASS_REQUIRED, BUDGET_INTERVAL_MONTHLY, BUDGET_INTERVAL_QUARTERLY, BUDGET_INTERVAL_WEEKLY, BUDGET_INTERVAL_YEARLY, MAX_BUDGETS, negate, PARAM_QIF_TXNID, PARAM_VAT_ACCT, PARAM_VAT_APPLIES, PARAM_VAT_PCT, SPLIT_ACCOUNT_ID
 
Constructor Summary
SecurityAccount(java.lang.String accountName, int accountID, CurrencyType stockID, java.util.Hashtable accountInfo, java.util.Vector subAccounts, Account parentAccount)
           
 
Method Summary
 double getAPR()
          Holds coupon/interest rate for bonds, cd's
 int getBondType()
          Holds a bond's type as an integer 0 - gov; 1 - municipal; 2 - corp; 3 - zero-coupon
 java.lang.String getBroker()
           
 java.lang.String getBrokerPhone()
           
 int getCompounding()
          Returns the compounding period for a CD.
 java.lang.String getCurrencyChoice()
          Holds the currency in which this security is to be viewed.
 long getDividend()
          Holds the dividend for a particular stock.
 java.lang.String getExchange()
          Holds a string representing the exchange the stock is traded on.
 long getFaceValue()
          Gets the face value of a bond
 long getMaturity()
          Holds the maturity date for a bond as a String
 int getMonth()
          Holds the exercise month for the option as an int (0-11) options expire on the 3rd Friday of this month
 int getNumYears()
          Holds # of years a CD is held for: zero is 6 months, all other integers represent the number of years.
 double getOptionPrice()
          Holds the price of an option.
 boolean getPut()
          Holds whether an option is a put or a call true - put; false - call
 int getSecurityType()
           
 long getStrikePrice()
          Holds the strike price of an option
 boolean getUsesAverageCost()
          Holds method of figuring cost basis: true is avg.
 void setAPR(double rate)
           
 void setBondType(int type)
           
 void setBroker(java.lang.String str)
           
 void setBrokerPhone(java.lang.String brokerPhone)
           
 void setCompounding(int cmp)
          Returns the compounding period for a CD.
 void setCurrencyChoice(java.lang.String curr)
           
 void setDividend(long dividend)
           
 void setExchange(java.lang.String exchange)
           
 void setFaceValue(long value)
          Sets the face value of a bond
 void setMaturity(long date)
           
 void setMonth(int month)
           
 void setNumYears(int yrs)
           
 void setOptionPrice(double price)
           
 void setPut(boolean put)
           
 void setSecurityType(int newSecType)
           
 void setStrikePrice(long strike)
           
 void setUsesAverageCost(boolean method)
          Sets whether or not this security uses the average cost method of determining cost basis.
 
Methods inherited from class com.moneydance.apps.md.model.Account
_getAccountByName, _getAccountByName, _removeSubAccount, addAccountListener, addSubAccount, adjustStartBalance, balanceIsNegated, billpayTxnsUpdated, cloneParameters, downloadedTxnsUpdated, dumpAccounts, ensureHasSubAccount, getAccountByName, getAccountByName, getAccountName, getAccountNum, getAccountType, getAllAccountNames, getBalance, getBankingFI, getBillPayFI, getBillpayTxns, getBooleanParameter, getBudgetAmount, getBudgetClass, getBudgetInterval, getCheckNumTags, getClearedBalance, getComment, getCreationDate, getCreationDateInt, getCurrencyType, getCurrentBalance, getDefaultCategory, getDepth, getDoubleParameter, getDownloadedTxns, getFullAccountName, getHideOnHomePage, getHighestAccountNum, getIndentedName, getIntParameter, getLongParameter, getNextCheckNumber, getOFXAccountKey, getOFXAccountNumber, getOFXAccountType, getOFXBankID, getOFXBranchID, getOFXBrokerID, getOFXLastTxnUpdate, getOnlineAvailBalance, getOnlineAvailBalanceDate, getOnlineLedgerBalance, getOnlineLedgerBalanceDate, getParameter, getParameter, getParameterCount, getParameterKeys, getParentAccount, getPath, getPreferredSortAscending, getPreferredSortOrder, getPreferredTwoLines, getReconcilingBalance, getRecursiveBalance, getRecursiveClearedBalance, getRecursiveCurrentBalance, getRecursiveReconcilingBalance, getRecursiveStartBalance, getRecursiveUserBalance, getRecursiveUserClearedBalance, getRecursiveUserCurrentBalance, getRecursiveUserReconcilingBalance, getRecursiveUserStartBalance, getRootAccount, getStartBalance, getSubAccount, getSubAccountCount, getSubAccounts, getTaxCategory, getUserBalance, getUserClearedBalance, getUserCurrentBalance, getUserReconcilingBalance, getUserStartBalance, hasOnlineAvailBalance, hasOnlineLedgerBalance, indexOf, isAncestorOf, isDescendantOf, isDirty, isLeafNode, isOnlineBankingCandidate, isOnlineBillpayCandidate, isOnlineEnabled, isRegisterAccount, makeAccount, notifyAccountAdded, notifyAccountDeleted, notifyAccountModified, notifyBalanceChanged, removeAccountListener, removeParameter, removeSubAccount, resetDirtyFlags, setAccountName, setBankingFI, setBillPayFI, setBudgetAmount, setBudgetClass, setBudgetInterval, setCheckNumTags, setComment, setCreationDate, setCurrencyType, setDefaultCategory, setDirtyFlag, setHideOnHomePage, setOFXAccountKey, setOFXAccountNumber, setOFXAccountType, setOFXBankID, setOFXBranchID, setOFXBrokerID, setOFXLastTxnUpdate, setOnlineAvailBalance, setOnlineLedgerBalance, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterNoNotify, setParentAccount, setPreference, setPreference, setPreference, setPreferredSortAscending, setPreferredSortOrder, setPreferredTwoLines, setStartBalance, setTaxCategory, setUserStartBalance, sortAccounts, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SECURITY_TYPE_CD

public static final int SECURITY_TYPE_CD
See Also:
Constant Field Values

SECURITY_TYPE_BOND

public static final int SECURITY_TYPE_BOND
See Also:
Constant Field Values

SECURITY_TYPE_MUTUAL

public static final int SECURITY_TYPE_MUTUAL
See Also:
Constant Field Values

SECURITY_TYPE_STOCK

public static final int SECURITY_TYPE_STOCK
See Also:
Constant Field Values

SECURITY_TYPE_OPTION

public static final int SECURITY_TYPE_OPTION
See Also:
Constant Field Values

COMPOUNDING_DAILY

public static final int COMPOUNDING_DAILY
See Also:
Constant Field Values

COMPOUNDING_WEEKLY

public static final int COMPOUNDING_WEEKLY
See Also:
Constant Field Values

COMPOUNDING_MONTHLY

public static final int COMPOUNDING_MONTHLY
See Also:
Constant Field Values

COMPOUNDING_ANNUALLY

public static final int COMPOUNDING_ANNUALLY
See Also:
Constant Field Values

COMPOUNDING_QUARTERLY

public static final int COMPOUNDING_QUARTERLY
See Also:
Constant Field Values
Constructor Detail

SecurityAccount

public SecurityAccount(java.lang.String accountName,
                       int accountID,
                       CurrencyType stockID,
                       java.util.Hashtable accountInfo,
                       java.util.Vector subAccounts,
                       Account parentAccount)
Method Detail

getBroker

public java.lang.String getBroker()

setBroker

public void setBroker(java.lang.String str)

getBrokerPhone

public java.lang.String getBrokerPhone()

setBrokerPhone

public void setBrokerPhone(java.lang.String brokerPhone)

getSecurityType

public int getSecurityType()

setSecurityType

public void setSecurityType(int newSecType)

getCurrencyChoice

public java.lang.String getCurrencyChoice()
Holds the currency in which this security is to be viewed.


setCurrencyChoice

public void setCurrencyChoice(java.lang.String curr)

getDividend

public long getDividend()
Holds the dividend for a particular stock.


setDividend

public void setDividend(long dividend)

getExchange

public java.lang.String getExchange()
Holds a string representing the exchange the stock is traded on.


setExchange

public void setExchange(java.lang.String exchange)

getUsesAverageCost

public boolean getUsesAverageCost()
Holds method of figuring cost basis: true is avg. cost, false is lot matching


setUsesAverageCost

public void setUsesAverageCost(boolean method)
Sets whether or not this security uses the average cost method of determining cost basis.


getAPR

public double getAPR()
Holds coupon/interest rate for bonds, cd's


setAPR

public void setAPR(double rate)

getNumYears

public int getNumYears()
Holds # of years a CD is held for: zero is 6 months, all other integers represent the number of years.


setNumYears

public void setNumYears(int yrs)

getCompounding

public int getCompounding()
Returns the compounding period for a CD.


setCompounding

public void setCompounding(int cmp)
Returns the compounding period for a CD.


getFaceValue

public long getFaceValue()
Gets the face value of a bond


setFaceValue

public void setFaceValue(long value)
Sets the face value of a bond


getMaturity

public long getMaturity()
Holds the maturity date for a bond as a String


setMaturity

public void setMaturity(long date)

getBondType

public int getBondType()
Holds a bond's type as an integer 0 - gov; 1 - municipal; 2 - corp; 3 - zero-coupon


setBondType

public void setBondType(int type)

getPut

public boolean getPut()
Holds whether an option is a put or a call true - put; false - call


setPut

public void setPut(boolean put)

getOptionPrice

public double getOptionPrice()
Holds the price of an option.


setOptionPrice

public void setOptionPrice(double price)

getStrikePrice

public long getStrikePrice()
Holds the strike price of an option


setStrikePrice

public void setStrikePrice(long strike)

getMonth

public int getMonth()
Holds the exercise month for the option as an int (0-11) options expire on the 3rd Friday of this month


setMonth

public void setMonth(int month)