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 java.lang.String[] EXCHANGE_CODES
           
 
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_HAVE_NEW_TXNS, PARAM_NEW_TXN_COUNT, PARAM_QIF_TXNID, PARAM_TAX_RELATED, PARAM_VAT_ACCT, PARAM_VAT_APPLIES, PARAM_VAT_PCT, PASSWD_CACHE_KEY, 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
 java.lang.String getAccountName()
           
 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()
           
 CompoundingType 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
 java.lang.String getSecuritySubType()
           
 SecurityType 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(CompoundingType 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 setSecuritySubType(java.lang.String subType)
           
 void setSecurityType(SecurityType 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, canDownloadTxns, cloneParameters, compareFullPathToAccount, compareToAccount, doesParameterExist, downloadedTxnsUpdated, dumpAccounts, ensureHasSubAccount, getAccountByName, getAccountByName, getAccountIsInactive, getAccountNum, getAccountOrParentIsInactive, getAccountType, getAllAccountNames, getBalance, getBankingFI, getBillPayFI, getBillpayTxns, getBooleanParameter, getBudgetAmount, getBudgetClass, getBudgetInterval, getCheckNumTags, getClearedBalance, getComment, getConfirmedBalance, getCreationDate, getCreationDateInt, getCurrencyType, getCurrentBalance, getDefaultCategory, getDepth, getDoubleParameter, getDownloadedTxns, getFullAccountName, getHideOnHomePage, getHighestAccountNum, getIndentedName, getIntParameter, getLongParameter, getNextCheckNumber, getOFXAccountKey, getOFXAccountMsgType, getOFXAccountNumber, getOFXAccountType, getOFXBankID, getOFXBillPayAccountNumber, getOFXBillPayAccountType, getOFXBillPayBankID, 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, getUserConfirmedBalance, getUserCurrentBalance, getUserReconcilingBalance, getUserStartBalance, hasOnlineAvailBalance, hasOnlineLedgerBalance, indexOf, isAncestorOf, isDeductible, isDescendantOf, isDirty, isLeafNode, isOnlineBankingCandidate, isOnlineBillpayCandidate, isOnlineEnabled, isRegisterAccount, isTaxable, isTaxRelated, makeAccount, notifyAccountAdded, notifyAccountDeleted, notifyAccountModified, notifyBalanceChanged, removeAccountListener, removeParameter, removeSubAccount, resetDirtyFlags, setAccountIsInactive, setAccountName, setBankingFI, setBillPayFI, setBudgetAmount, setBudgetClass, setBudgetInterval, setCheckNumTags, setComment, setCreationDate, setCurrencyType, setDeductible, setDefaultCategory, setDirtyFlag, setHideOnHomePage, setIncludeInNetWorth, setOFXAccountKey, setOFXAccountMsgType, setOFXAccountNumber, setOFXAccountType, setOFXBankID, setOFXBillPayAccountNumber, setOFXBillPayAccountType, setOFXBillPayBankID, setOFXBranchID, setOFXBrokerID, setOFXLastTxnUpdate, setOnlineAvailBalance, setOnlineLedgerBalance, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterNoNotify, setParentAccount, setPreference, setPreference, setPreference, setPreferredSortAscending, setPreferredSortOrder, setPreferredTwoLines, setStartBalance, setTaxable, setTaxCategory, setTaxRelated, setUserStartBalance, shouldBeIncludedInNetWorth, sortAccounts, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXCHANGE_CODES

public static final java.lang.String[] EXCHANGE_CODES
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

getAccountName

public java.lang.String getAccountName()
Overrides:
getAccountName in class Account

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 SecurityType getSecurityType()

setSecurityType

public void setSecurityType(SecurityType newSecType)

getSecuritySubType

public java.lang.String getSecuritySubType()

setSecuritySubType

public void setSecuritySubType(java.lang.String subType)

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 CompoundingType getCompounding()
Returns the compounding period for a CD.


setCompounding

public void setCompounding(CompoundingType 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)