Class Account
java.lang.Object
com.infinitekind.moneydance.model.MoneydanceSyncableItem
com.infinitekind.moneydance.model.Account
- All Implemented Interfaces:
com.infinitekind.tiksync.SyncableItem
public class Account extends MoneydanceSyncableItem
The base account class. All types of accounts will subclass this
object. This object maintains a list of sub-accounts, as well as
the standard attributes associated with an account (name, type,
currency, start balance, etc)
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Account.AccountType
static class
Account.BalanceType
static class
Account.DebtPaymentSpec
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MONEYBOT_ID_KEY
static java.lang.String
PARAM_INCLUDE_IN_NET_WORTH
static java.lang.String
PARAM_QIF_TXNID
static java.lang.String
PARAM_TAX_RELATED
static java.lang.String
PARAM_VAT_ACCT
static java.lang.String
PARAM_VAT_ACCTID
static java.lang.String
PARAM_VAT_APPLIES
static java.lang.String
PARAM_VAT_PCT
static int
SPLIT_ACCOUNT_ID
static java.lang.String
SYNCABLE_TYPE_VALUE
Fields inherited from class com.infinitekind.moneydance.model.MoneydanceSyncableItem
book, info, SECURITY_SUBTYPES_ITEM_TYPE
-
Constructor Summary
Constructors Constructor Description Account(AccountBook book)
-
Method Summary
Modifier and Type Method Description protected Account
_getAccountByName(java.lang.String name)
protected Account
_getAccountByName(java.lang.String name, Account.AccountType acctType)
void
adjustStartBalance(long adjustAmount)
Adjust the starting balance by the given amount.boolean
balanceIsNegated()
indicates whether or not amounts in this account should be negated when displaying to user (will be true for Income accounts)boolean
canDownloadTxns()
Returns true if transactions can be downloaded for this accountboolean
checkedInitialTransfer()
int
compareFullPathToAccount(Account account)
Compare the full path of this account to the full path of the given accountint
compareToAccount(Account acct)
Return an integer indicating whether this account is less than, equal to, or greater than the given account when sorting by type, name, and ID.void
downloadedTxnsUpdated()
void
dumpAccounts()
void
ensureAccountStructure()
make sure the account structure is correct and that the account's parent knows about it.Account
getAccountByName(java.lang.String name)
Account
getAccountByName(java.lang.String name, Account.AccountType acctType)
java.lang.String
getAccountDescription()
boolean
getAccountIsInactive()
Returns true if the account is no longer in use and should be hidden from account and category selectors as well as the home page.java.lang.String
getAccountName()
int
getAccountNum()
Deprecated.Please don't use this to identify accounts.boolean
getAccountOrParentIsInactive()
Returns true if the account or one of its ancestors is no longer in use and should be hidden from account and category selectors as well as the home page.Account.AccountType
getAccountType()
java.lang.String[]
getAllAccountNames()
Get an array of the account names between the root account and this account.long
getAnnualFee()
double
getAPR()
Holds coupon/interest rate for bonds, cd's, or interest rates for debt accounts.double
getAPRPercent()
long
getBalance()
long
getBalance(Account.BalanceType balanceType)
Get the specified kind of balance for this accountjava.lang.String
getBankAccountNumber()
OnlineService
getBankingFI()
Get the OFX connection information use for online banking in this account, if any.java.lang.String
getBankName()
OnlineService
getBillPayFI()
Get the OFX connection information use for online bill-payment in this account, if any.int
getBondType()
Holds a bond's type as an integer 0 - gov; 1 - municipal; 2 - corp; 3 - zero-couponjava.lang.String
getBroker()
java.lang.String
getBrokerPhone()
boolean
getCalcPmt()
int
getCardExpirationMonth()
int
getCardExpirationYear()
java.lang.String
getCardNumber()
CheckNumSettings
getCheckNumSettings()
Return the check number selection/popup settings for this account.CheckNumSettings
getCheckNumSettings(boolean returnDefaultIfNone)
Return the check number selection/popup settings for this account.java.lang.String[]
getCheckNumTags(java.lang.String deflt)
Deprecated.this is no longer used when populating check numbers popupslong
getClearedBalance()
Return the balance excluding any uncleared or reconciling transactionsjava.lang.String
getComment()
CompoundingType
getCompounding()
Returns the compounding period for a CD.long
getConfirmedBalance()
Return the balance excluding any unconfirmed transactions.long
getCreationDate()
Deprecated.deprecated as of build 1915.int
getCreationDateInt()
Gets the date that this account was opened/created encoded as an int.long
getCreditLimit()
java.lang.String
getCurrencyChoice()
Holds the currency in which this security is to be viewed.CurrencyType
getCurrencyType()
long
getCurrentBalance()
long
getDebtPaymentAmount()
Gets the value for payments made to this (credit card or loan) account.double
getDebtPaymentProportion()
Gets the percentage value (in the range 0-1) for payments made to this (credit card or loan) account.Account.DebtPaymentSpec
getDebtPaymentSpec()
Gets the payment plan used to pay off this account if it is a debt account (credit card, loan, etc).Account
getDefaultAccount(AcctFilter filter, java.lang.String accountIDKey)
Get the default account that was stored with the given account ID key, presuming the given filter applies to it.Account
getDefaultCategory()
Account
getDefaultTransferAccount()
int
getDepth()
Get this accounts depth in the account tree.long
getDividend()
Holds the dividend for a particular stock.OnlineTxnList
getDownloadedTxns()
Get the current list of downloaded transactions for thisboolean
getEscrow()
Account
getEscrowAccount()
long
getEscrowPayment()
java.lang.String
getExchange()
Holds a string representing the exchange the stock is traded on.long
getFaceValue()
Gets the face value of a bondlong
getFixedMonthlyPaymentAmount()
java.lang.String
getFullAccountName()
boolean
getHideOnHomePage()
java.lang.String
getIndentedName()
long
getInitialPrincipal()
Get the principal, excluding any transactions within Moneydance, for this loanAbstractTxn
getInitialTransfer()
Finds and returns the transaction that represents the initial transfer of funds from this loan account.java.lang.String
getInstitutionName()
Account
getInterestAccount()
double
getInterestRate()
java.lang.String
getInvestAccountNumber()
Account
getInvstCommissionAcct()
long
getMaturity()
Holds the maturity date for a bond as a Stringint
getMonth()
Holds the exercise month for the option as an int (0-11) options expire on the 3rd Friday of this monthint
getNextCheckNumber()
Use a fancy algorithm to calculate the next check number in the most recent series of checks.long
getNextCheckNumberLong()
Use a fancy algorithm to calculate the next check number in the most recent series of checks.int
getNumPayments()
int
getNumYears()
Holds # of years a CD is held for: zero is 6 months, all other integers represent the number of years.java.lang.String
getOFXAccountKey()
int
getOFXAccountMsgType()
java.lang.String
getOFXAccountNumber()
java.lang.String
getOFXAccountType()
java.lang.String
getOFXBankID()
Bank ID: used or not according to country: BEL Bank code CAN Routing and transit number CHE Clearing number DEU Bankleitzah ESP Entidad FRA Banque GBR Sort code ITA ABI NLD Not used (field contents ignored) USA Routing and transit numberjava.lang.String
getOFXBillPayAccountNumber()
Get the account number used for online bill payment.java.lang.String
getOFXBillPayAccountType()
Get the account type used for online bill payment.java.lang.String
getOFXBillPayBankID()
Get the icon_bank ID (aka routing number) used for online bill payment.java.lang.String
getOFXBranchID()
java.lang.String
getOFXBrokerID()
OnlinePayeeList
getOnlinePayees()
OnlinePaymentList
getOnlinePayments()
double
getOptionPrice()
Holds the price of an option.Account
getParentAccount()
Account
getParentAtDepth(int i)
Returns the parent (or this account) at the given depth.java.util.List<Account>
getPath()
Get an array of the accounts leading up to this account, starting at the RootAccount in position 0.PaymentSchedule
getPaymentSchedule()
int
getPaymentsPerYear()
double
getPermanentAPR()
Gets the permanent APR that is in use for this debt account after the rate change date.double
getPoints()
Return the percentage of the loan that was added as a fee to the principalboolean
getPreferredSortAscending(boolean defaultVal)
int
getPreferredSortOrder(int defaultOrder)
boolean
getPreferredTwoLines(boolean defaultVal)
boolean
getPut()
Holds whether an option is a put or a call true - put; false - callint
getRateChangeDate()
Gets the date that a debt account APR changes from it's initial value to it's permanent value.long
getReconcilingBalance()
long
getRecursiveBalance()
Gets the balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate.long
getRecursiveClearedBalance()
Gets the cleared balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate.long
getRecursiveCurrentBalance()
Gets the current balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate.long
getRecursiveReconcilingBalance()
Gets the reconciling balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate.long
getRecursiveStartBalance()
Gets the starting balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate.long
getRecursiveUserBalance()
Gets the balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate.long
getRecursiveUserClearedBalance()
Gets the cleared balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate.long
getRecursiveUserCurrentBalance()
Gets the current balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate.long
getRecursiveUserReconcilingBalance()
Gets the reconciling balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate.long
getRecursiveUserStartBalance()
Gets the starting balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate.boolean
getReminder()
Account
getRootAccount()
java.lang.String
getSecuritySubType()
SecurityType
getSecurityType()
long
getStartBalance()
long
getStrikePrice()
Holds the strike price of an optionAccount
getSubAccount(int i)
int
getSubAccountCount()
Get the number of sub-accounts in this account.java.util.List<Account>
getSubAccounts()
Return a list of all immediate sub-accounts to this account.java.util.List<Account>
getSubAccounts(AcctFilter search)
Return a list of all accounts under this account matching the given filter.java.lang.String
getSyncItemType()
Subclasses should override this to return a static string identifying their type of objectjava.lang.String
getTaxCategory()
Get the identifier that indicates which (if any) tax category this account is associated with.long
getTxnCount()
Get the number of transactions in this account.int
getUnconfirmedTxnCount()
Get the number of unconfirmed transactions in this account.long
getUserBalance()
long
getUserClearedBalance()
long
getUserConfirmedBalance()
long
getUserCurrentBalance()
long
getUserReconcilingBalance()
long
getUserStartBalance()
boolean
getUsesAverageCost()
Holds method of figuring cost basis: true is avg.boolean
hasExpiringRate()
Returns whether or not this debt account has an expiring rate (APR).int
indexOf(Account acct)
boolean
isAncestorOf(Account acct)
Returns true if the given account is equal to this account or if it is a direct or indirect sub-account of this account.boolean
isDeductible()
boolean
isDescendantOf(Account acct)
Returns true if this account is a descendant of the given account.boolean
isDirty()
Returns true if there has been changes to this account or any child accounts that hasn't been saved.boolean
isLeafNode()
boolean
isOnlineBankingCandidate()
Returns true if it is possible to online-enable this account.boolean
isOnlineBillpayCandidate()
Returns true if it is possible to online-enable this account.boolean
isOnlineEnabled()
Returns true if this account is configured for online access.boolean
isRegisterAccount()
boolean
isTaxable()
boolean
isTaxRelated()
void
itemWasUpdated()
This is called after an item is updated by calling itemWasUpdated(SyncRecord).void
itemWillSync()
This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called.static Account
makeAccount(AccountBook accountBook, Account.AccountType accountType, Account parent)
OnlineTxnList
migrateFromOldDownloadedTxns()
void
notifyAccountModified()
Notify all listeners that the account has been modified.protected void
resetDirtyFlags()
set the dirty flag for this account and all sub-accounts to a non-dirty state.void
setAccountDescription(java.lang.String description)
void
setAccountIsInactive(boolean isInactive)
Sets whether the account is no longer in use and should be hidden from account and category selectors as well as the home page.void
setAccountName(java.lang.String newAccountName)
void
setAccountType(Account.AccountType newAccountType)
Set or change the type of this account.void
setAnnualFee(long annualFee)
void
setAPR(double rate)
void
setAPRPercent(double apr)
void
setBankAccountNumber(java.lang.String str)
void
setBankingFI(OnlineService service)
Set the online banking connection information used for online banking (transaction download, etc) in this account.void
setBankName(java.lang.String str)
void
setBillPayFI(OnlineService service)
Set the online banking connection information used for online banking (transaction download, etc) in this account.void
setBondType(int type)
void
setBroker(java.lang.String str)
void
setBrokerPhone(java.lang.String brokerPhone)
void
setCalcPmt(boolean calc)
void
setCardExpirationMonth(int expMonth)
void
setCardExpirationYear(int expYear)
void
setCardNumber(java.lang.String str)
void
setCheckedInitialTransfer()
void
setCheckNumSettings(CheckNumSettings checkSettings)
Sets the check number selection options for this account.void
setCheckNumTags(java.lang.String[] checkTags)
Deprecated.this is no longer used when populating check numbers popupsvoid
setComment(java.lang.String comment)
void
setCompounding(CompoundingType cmp)
Returns the compounding period for a CD.void
setCreationDate(long date)
Deprecated.deprecated as of build 1915.void
setCreationDateInt(int date)
Set the creation date of this accountvoid
setCreditLimit(long limit)
void
setCurrencyChoice(java.lang.String curr)
void
setCurrencyType(CurrencyType newCurrencyType)
set the currency type.void
setDebtPaymentAmount(long newValue)
Sets the value for payments made to this (credit card or loan) account.void
setDebtPaymentProportion(double newValue)
Sets the percentage value (in the range 0-1) for payments made to this (credit card or loan) account.void
setDebtPaymentSpec(Account.DebtPaymentSpec newSpec)
Sets the payment plan used to pay off this account if it is a debt account (credit card, loan, etc).void
setDeductible(boolean deductible)
void
setDefaultAccount(java.lang.String accountIDKey, Account acct)
Store the given account as the default associated with the given account ID keyvoid
setDefaultCategory(Account acct)
void
setDefaultTransferAccount(Account acct)
void
setDirtyFlag()
set the dirty flag for this account.void
setDividend(long dividend)
void
setEscrow(boolean check)
void
setEscrowAccount(Account acct)
void
setEscrowPayment(long escrowPmt)
void
setExchange(java.lang.String exchange)
void
setFaceValue(long value)
Sets the face value of a bondvoid
setFixedMonthlyPaymentAmount(long mthPmt)
void
setHasExpiringRate(boolean rateExpires)
Sets whether or not this debt account has an expiring rate (APR).void
setHideOnHomePage(boolean hide)
void
setIncludeInNetWorth(boolean includeInNetWorth)
Set whether or not this account should be included in net worth calculations.void
setInitialPrincipal(long principalAmt)
Set the principal, excluding any transactions within Moneydance, for this loanvoid
setInitialTransfer(AbstractTxn txn)
Sets the given transaction as the initial transfer for this account.void
setInstitutionName(java.lang.String str)
void
setInterestAccount(Account acct)
void
setInterestRate(double rate)
void
setInvestAccountNumber(java.lang.String str)
void
setMaturity(long date)
void
setMonth(int month)
void
setNumPayments(int numPayments)
void
setNumYears(int yrs)
void
setOFXAccountKey(java.lang.String str)
void
setOFXAccountMsgType(int msgType)
void
setOFXAccountNumber(java.lang.String str)
void
setOFXAccountType(java.lang.String str)
void
setOFXBankID(java.lang.String bankId)
void
setOFXBillPayAccountNumber(java.lang.String str)
Set the account number used for online bill payment, if different from the regular account numbervoid
setOFXBillPayAccountType(java.lang.String str)
Set the account type used for online bill payment, if different from the regular account typevoid
setOFXBillPayBankID(java.lang.String str)
Set the icon_bank ID (aka routing number) used for online bill paymentvoid
setOFXBranchID(java.lang.String branchId)
void
setOFXBrokerID(java.lang.String brokerId)
void
setOnlinePayees(OnlinePayeeList payees)
Set the list of payees to associate with this account.void
setOnlinePayments(OnlinePaymentList payments)
Set the list of payments to associate with this account.void
setOptionPrice(double price)
void
setParentAccount(Account newParentAccount)
void
setPaymentsPerYear(int pmtsPerYear)
void
setPermanentAPR(double newPermanentRate)
Sets the permanent APR that should be used for this debt account after the rate change date.void
setPoints(double points)
Set the percentage of the loan that was added as a fee to the principalvoid
setPreferredSortAscending(boolean ascending)
void
setPreferredSortOrder(int newSortOrder)
void
setPreferredTwoLines(boolean twoLines)
void
setPut(boolean put)
void
setRateChangeDate(int newDateInt)
Sets the permanent APR for a debt account.void
setReminder(boolean reminder)
void
setSecuritySubType(java.lang.String subType)
void
setSecurityType(SecurityType newSecType)
void
setStartBalance(long newStartBalance)
Set the initial balance of this account.void
setStrikePrice(long strike)
void
setTaxable(boolean taxable)
void
setTaxCategory(java.lang.String taxCategory)
Set an identifier that indicates which (if any) tax category this account is associated with.void
setTaxRelated(boolean taxRelated)
void
setUsesAverageCost(boolean method)
Sets whether or not this security uses the average cost method of determining cost basis.boolean
shouldBeIncludedInNetWorth()
Return whether or not this account should be included in net worth calculations.void
sortAccounts()
java.lang.String
toString()
Methods inherited from class com.infinitekind.moneydance.model.MoneydanceSyncableItem
addParameters, addTags, autoSyncsChanges, decodeKeywordList, deleteItem, doesParameterExist, duplicate, encodeKeywordList, equals, getAccountParameter, getAddress, getAddressParameter, getBook, getBooleanParameter, getCurrencyParameter, getCurrencyParameter, getCurrencyParameter, getDoubleParameter, getIntParameter, getKeywords, getLongParameter, getOriginalItem, getParameter, getParameter, getParameterCount, getParameterKeys, getPreference, getPreferenceBoolean, getPreferenceDouble, getPreferenceInt, getPreferenceIntArray, getPreferenceLong, getPreferenceStringList, getPreferenceSublist, getPreferenceSubset, getStringListParameter, getSyncInfo, getSyncTimestamp, getUUID, hasBeenSynced, hashCode, hasKeywordSubstring, initialize, isInEditingMode, isSyncable, itemWasUpdated, itemWillSync, makeSyncableItem, removeParameter, setAccountParameter, setAddress, setAddressParameter, setCurrencyParameter, setCurrencyParameter, setCurrencyParameter, setDirty, setEditingMode, setKeywords, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterNoNotify, setPreference, setPreference, setPreference, syncItem
-
Field Details
-
SYNCABLE_TYPE_VALUE
public static final java.lang.String SYNCABLE_TYPE_VALUE- See Also:
- Constant Field Values
-
MONEYBOT_ID_KEY
public static final java.lang.String MONEYBOT_ID_KEY- See Also:
- Constant Field Values
-
SPLIT_ACCOUNT_ID
public static final int SPLIT_ACCOUNT_ID- See Also:
- Constant Field Values
-
PARAM_VAT_PCT
public static final java.lang.String PARAM_VAT_PCT- See Also:
- Constant Field Values
-
PARAM_VAT_ACCT
public static final java.lang.String PARAM_VAT_ACCT- See Also:
- Constant Field Values
-
PARAM_VAT_ACCTID
public static final java.lang.String PARAM_VAT_ACCTID- See Also:
- Constant Field Values
-
PARAM_VAT_APPLIES
public static final java.lang.String PARAM_VAT_APPLIES- See Also:
- Constant Field Values
-
PARAM_TAX_RELATED
public static final java.lang.String PARAM_TAX_RELATED- See Also:
- Constant Field Values
-
PARAM_QIF_TXNID
public static final java.lang.String PARAM_QIF_TXNID- See Also:
- Constant Field Values
-
PARAM_INCLUDE_IN_NET_WORTH
public static final java.lang.String PARAM_INCLUDE_IN_NET_WORTH- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
getRootAccount
-
itemWasUpdated
public void itemWasUpdated()Description copied from class:MoneydanceSyncableItem
This is called after an item is updated by calling itemWasUpdated(SyncRecord). This can occur from the syncing process or from being loaded locally. Override this method to be notified.- Overrides:
itemWasUpdated
in classMoneydanceSyncableItem
-
itemWillSync
public void itemWillSync()Description copied from class:MoneydanceSyncableItem
This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord) is called. Override this method to be notified or if you'd like to store anything into the info record to be synced.- Overrides:
itemWillSync
in classMoneydanceSyncableItem
-
getSyncItemType
public final java.lang.String getSyncItemType()Description copied from class:MoneydanceSyncableItem
Subclasses should override this to return a static string identifying their type of object- Specified by:
getSyncItemType
in interfacecom.infinitekind.tiksync.SyncableItem
- Overrides:
getSyncItemType
in classMoneydanceSyncableItem
-
isLeafNode
public final boolean isLeafNode() -
shouldBeIncludedInNetWorth
public boolean shouldBeIncludedInNetWorth()Return whether or not this account should be included in net worth calculations. This is only available as of build 754 -
setIncludeInNetWorth
public void setIncludeInNetWorth(boolean includeInNetWorth)Set whether or not this account should be included in net worth calculations. This is only available as of build 754 -
getCheckNumTags
public java.lang.String[] getCheckNumTags(java.lang.String deflt)Deprecated.this is no longer used when populating check numbers popupsGets a list of check numbers field strings associated with this account -
setCheckNumTags
public void setCheckNumTags(java.lang.String[] checkTags)Deprecated.this is no longer used when populating check numbers popupsSets a list of check numbers field strings associated with this account -
getCheckNumSettings
Return the check number selection/popup settings for this account. If this account has no specific settings, this returns the global settings which are associated with the root account. If the global account has no settings, this returns null and the default settings should be used.- Since:
- Moneydance 2020.0 (1916)
-
getCheckNumSettings
Return the check number selection/popup settings for this account. If this account has no specific settings, this returns the global settings which are associated with the root account if the returnDefaultIfNone flag is true. If the global account has no settings, this returns null and the default possibly-locale-specific settings should be used.- Since:
- Moneydance 2020.1 (1925)
-
setCheckNumSettings
Sets the check number selection options for this account. If you pass null then the check number settings are reset to the default entries.- Since:
- Moneydance 2020.0 (1916)
-
setCreationDate
public void setCreationDate(long date)Deprecated.deprecated as of build 1915. Please consider using setCreationDateInt()Sets the date that this account was opened. (this method only available as of build 253) -
getCreationDate
public long getCreationDate()Deprecated.deprecated as of build 1915. Please use getCreationDateInt() which has been around since 2014Gets the date that this account was opened/created (this method only available as of build 253) -
setCreationDateInt
public void setCreationDateInt(int date)Set the creation date of this account- Parameters:
date
- the date as an integer value of the form YYYYMMDD- Since:
- Moneydance build 1915
-
getCreationDateInt
public int getCreationDateInt()Gets the date that this account was opened/created encoded as an int. If no creation date has been set this will return zero. (this method only available as of build 407) -
getOFXAccountNumber
public java.lang.String getOFXAccountNumber() -
setOFXAccountNumber
public void setOFXAccountNumber(java.lang.String str) -
getOFXAccountKey
public java.lang.String getOFXAccountKey() -
setOFXAccountKey
public void setOFXAccountKey(java.lang.String str) -
setOFXAccountType
public void setOFXAccountType(java.lang.String str) -
getOFXAccountType
public java.lang.String getOFXAccountType() -
setOFXAccountMsgType
public void setOFXAccountMsgType(int msgType) -
getOFXAccountMsgType
public int getOFXAccountMsgType() -
setOFXBillPayBankID
public void setOFXBillPayBankID(java.lang.String str)Set the icon_bank ID (aka routing number) used for online bill payment -
getOFXBillPayBankID
public java.lang.String getOFXBillPayBankID()Get the icon_bank ID (aka routing number) used for online bill payment. If no bill payment-specific routing number has been set this will return the regular routing number. -
setOFXBillPayAccountNumber
public void setOFXBillPayAccountNumber(java.lang.String str)Set the account number used for online bill payment, if different from the regular account number -
getOFXBillPayAccountNumber
public java.lang.String getOFXBillPayAccountNumber()Get the account number used for online bill payment. If no bill payment-specific account number has been set this will return the regular account number. -
setOFXBillPayAccountType
public void setOFXBillPayAccountType(java.lang.String str)Set the account type used for online bill payment, if different from the regular account type -
getOFXBillPayAccountType
public java.lang.String getOFXBillPayAccountType()Get the account type used for online bill payment. If no bill payment-specific routing number has been set this will return the regular routing number. -
getOFXBankID
public java.lang.String getOFXBankID()Bank ID: used or not according to country: BEL Bank code CAN Routing and transit number CHE Clearing number DEU Bankleitzah ESP Entidad FRA Banque GBR Sort code ITA ABI NLD Not used (field contents ignored) USA Routing and transit number -
setOFXBankID
public void setOFXBankID(java.lang.String bankId) -
getOFXBranchID
public java.lang.String getOFXBranchID() -
setOFXBranchID
public void setOFXBranchID(java.lang.String branchId) -
getOFXBrokerID
public java.lang.String getOFXBrokerID() -
setOFXBrokerID
public void setOFXBrokerID(java.lang.String brokerId) -
isOnlineBankingCandidate
public boolean isOnlineBankingCandidate()Returns true if it is possible to online-enable this account. -
isOnlineBillpayCandidate
public boolean isOnlineBillpayCandidate()Returns true if it is possible to online-enable this account. -
isOnlineEnabled
public boolean isOnlineEnabled()Returns true if this account is configured for online access. -
canDownloadTxns
public boolean canDownloadTxns()Returns true if transactions can be downloaded for this account -
getBankingFI
Get the OFX connection information use for online banking in this account, if any. -
setBankingFI
Set the online banking connection information used for online banking (transaction download, etc) in this account. -
getBillPayFI
Get the OFX connection information use for online bill-payment in this account, if any. -
setBillPayFI
Set the online banking connection information used for online banking (transaction download, etc) in this account. -
getHideOnHomePage
public final boolean getHideOnHomePage() -
setHideOnHomePage
public final void setHideOnHomePage(boolean hide) -
getAccountIsInactive
public final boolean getAccountIsInactive()Returns true if the account is no longer in use and should be hidden from account and category selectors as well as the home page.- Since:
- build 780
-
getAccountOrParentIsInactive
public final boolean getAccountOrParentIsInactive()Returns true if the account or one of its ancestors is no longer in use and should be hidden from account and category selectors as well as the home page.- Since:
- build 780
-
setAccountIsInactive
public final void setAccountIsInactive(boolean isInactive)Sets whether the account is no longer in use and should be hidden from account and category selectors as well as the home page.- Since:
- build 780
-
migrateFromOldDownloadedTxns
-
getDownloadedTxns
Get the current list of downloaded transactions for this -
downloadedTxnsUpdated
public void downloadedTxnsUpdated() -
notifyAccountModified
public void notifyAccountModified()Notify all listeners that the account has been modified. -
getOnlinePayees
-
setOnlinePayees
Set the list of payees to associate with this account. Note: this shouldn't be used except for when loading data from older versions of Moneydance. -
getOnlinePayments
-
setOnlinePayments
Set the list of payments to associate with this account. Note: this shouldn't be used except for when loading data from older versions of Moneydance. -
getComment
public java.lang.String getComment() -
setComment
public void setComment(java.lang.String comment) -
getAllAccountNames
public java.lang.String[] getAllAccountNames()Get an array of the account names between the root account and this account. This is basically the accounts names that make up the "path" from the root. -
getFullAccountName
public java.lang.String getFullAccountName() -
adjustStartBalance
public void adjustStartBalance(long adjustAmount)Adjust the starting balance by the given amount. This will add the given amount to the starting balance. -
balanceIsNegated
public final boolean balanceIsNegated()indicates whether or not amounts in this account should be negated when displaying to user (will be true for Income accounts) -
getUserStartBalance
public final long getUserStartBalance() -
getUserCurrentBalance
public final long getUserCurrentBalance() -
getUserClearedBalance
public final long getUserClearedBalance() -
getUserReconcilingBalance
public final long getUserReconcilingBalance() -
getUserBalance
public final long getUserBalance() -
getUserConfirmedBalance
public final long getUserConfirmedBalance() -
getStartBalance
public final long getStartBalance() -
getRecursiveStartBalance
public long getRecursiveStartBalance()Gets the starting balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate. -
getRecursiveUserStartBalance
public long getRecursiveUserStartBalance()Gets the starting balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate. This negates the balance if the account is negated -
getCurrentBalance
public final long getCurrentBalance() -
getRecursiveCurrentBalance
public final long getRecursiveCurrentBalance()Gets the current balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate. Note: This is method only available since build #274 -
getRecursiveUserCurrentBalance
public long getRecursiveUserCurrentBalance()Gets the current balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate. This negates the balance if the account is negated -
getClearedBalance
public final long getClearedBalance()Return the balance excluding any uncleared or reconciling transactions -
getConfirmedBalance
public final long getConfirmedBalance()Return the balance excluding any unconfirmed transactions. -
getRecursiveClearedBalance
public final long getRecursiveClearedBalance()Gets the cleared balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate. Note: This is method only available since build #274 -
getRecursiveUserClearedBalance
public long getRecursiveUserClearedBalance()Gets the cleared balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate. This negates the balance if the account is negated -
getReconcilingBalance
public final long getReconcilingBalance() -
getRecursiveReconcilingBalance
public final long getRecursiveReconcilingBalance()Gets the reconciling balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate. Note: This is method only available since build #274 -
getRecursiveUserReconcilingBalance
public long getRecursiveUserReconcilingBalance()Gets the reconciling balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate. This negates the balance if the account is negated -
getBalance
Get the specified kind of balance for this account- Since:
- Moneydance 2017.3 build 1614
-
getBalance
public final long getBalance() -
getRecursiveBalance
public final long getRecursiveBalance()Gets the balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the current exchange rate. Note: This is method only available since build #274 -
getRecursiveUserBalance
public long getRecursiveUserBalance()Gets the balance for this account and all sub-accounts, converting the currencies of the sub-accounts at the appropriate exchange rate. This negates the balance if the account is negated -
getUnconfirmedTxnCount
public int getUnconfirmedTxnCount()Get the number of unconfirmed transactions in this account. Adding a balance listener will notify you if this number changes, even if none of the balances change. -
getTxnCount
public long getTxnCount()Get the number of transactions in this account. Adding a balance listener will notify you if this number changes, even if none of the balances change.- Since:
- Moneydance 2019.2 build 1861
-
setStartBalance
public void setStartBalance(long newStartBalance)Set the initial balance of this account. -
getCurrencyType
-
setCurrencyType
set the currency type. NOTE: This should *not* be changed if there are transactions in this account!!! -
getAccountName
public java.lang.String getAccountName() -
setAccountName
public void setAccountName(java.lang.String newAccountName) -
getAccountType
-
setAccountType
Set or change the type of this account. Please be very careful with this as the account type determines a lot of behaviour in Moneydance and setting an account to a type that doesn't match the account's transactions or location in the account hierarchy could be bad.- Since:
- build 1255
-
getPreferredTwoLines
public boolean getPreferredTwoLines(boolean defaultVal) -
getPreferredSortOrder
public int getPreferredSortOrder(int defaultOrder) -
getPreferredSortAscending
public boolean getPreferredSortAscending(boolean defaultVal) -
setPreferredSortOrder
public void setPreferredSortOrder(int newSortOrder) -
setPreferredSortAscending
public void setPreferredSortAscending(boolean ascending) -
setPreferredTwoLines
public void setPreferredTwoLines(boolean twoLines) -
getParentAtDepth
Returns the parent (or this account) at the given depth. If the depth (i) is more than the depth of this account or less than zero then it returns null.- Since:
- build 1189
-
getDepth
public final int getDepth()Get this accounts depth in the account tree. The root account will have depth 0. -
getPath
Get an array of the accounts leading up to this account, starting at the RootAccount in position 0. -
getSubAccountCount
public final int getSubAccountCount()Get the number of sub-accounts in this account. -
getSubAccounts
Return a list of all accounts under this account matching the given filter. This includes accounts not just direct children but all accounts under this one in the hierarchy. -
getSubAccount
-
indexOf
-
getSubAccounts
Return a list of all immediate sub-accounts to this account. -
getAccountNum
public final int getAccountNum()Deprecated.Please don't use this to identify accounts. It is old and stupid.Return the old account number. -
getAccountByName
-
_getAccountByName
-
getAccountByName
-
_getAccountByName
-
getParentAccount
-
setParentAccount
-
getDefaultCategory
-
setDefaultCategory
-
getDefaultTransferAccount
-
setDefaultTransferAccount
-
getNextCheckNumber
public final int getNextCheckNumber()Use a fancy algorithm to calculate the next check number in the most recent series of checks. -
getNextCheckNumberLong
public final long getNextCheckNumberLong()Use a fancy algorithm to calculate the next check number in the most recent series of checks. -
getTaxCategory
public java.lang.String getTaxCategory()Get the identifier that indicates which (if any) tax category this account is associated with. (this method is only available as of build 253) -
setTaxCategory
public void setTaxCategory(java.lang.String taxCategory)Set an identifier that indicates which (if any) tax category this account is associated with. (this method is only available as of build 253) -
getIndentedName
public final java.lang.String getIndentedName() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
isRegisterAccount
public final boolean isRegisterAccount() -
resetDirtyFlags
protected void resetDirtyFlags()set the dirty flag for this account and all sub-accounts to a non-dirty state. If an account is dirty, it means that it has been changed since the last time it was saved. -
setDirtyFlag
public void setDirtyFlag()set the dirty flag for this account. If an account is dirty, it means that it has been changed since the last time it was saved. This does NOT fire any events that indicate the account was modified. Note: only available since build 260. -
isDirty
public final boolean isDirty()Returns true if there has been changes to this account or any child accounts that hasn't been saved. -
ensureAccountStructure
public void ensureAccountStructure()make sure the account structure is correct and that the account's parent knows about it. This should only be called from the syncer or data loader upon the initial load -
sortAccounts
public final void sortAccounts() -
isAncestorOf
Returns true if the given account is equal to this account or if it is a direct or indirect sub-account of this account. -
isDescendantOf
Returns true if this account is a descendant of the given account. That is, the given account exists above this one in the account hierarchy. -
dumpAccounts
public void dumpAccounts() -
getDefaultAccount
Get the default account that was stored with the given account ID key, presuming the given filter applies to it. If there was no such account or the filter is not matched, return the first account that does match the given filter.- Parameters:
filter
- a filter that the saved account must matchaccountIDKey
- a string identifying the setting for a stored account- Returns:
- Since:
- Moneydance build 895
-
setDefaultAccount
Store the given account as the default associated with the given account ID key- Parameters:
accountIDKey
- a string identifying the setting for a stored account- Since:
- Moneydance build 895
-
getBankName
public java.lang.String getBankName() -
setBankName
public void setBankName(java.lang.String str) -
getBankAccountNumber
public java.lang.String getBankAccountNumber() -
setBankAccountNumber
public void setBankAccountNumber(java.lang.String str) -
setDeductible
public void setDeductible(boolean deductible) -
isDeductible
public boolean isDeductible() -
setTaxable
public void setTaxable(boolean taxable) -
isTaxable
public boolean isTaxable() -
setTaxRelated
public void setTaxRelated(boolean taxRelated) -
isTaxRelated
public boolean isTaxRelated() -
getInstitutionName
public java.lang.String getInstitutionName() -
setInstitutionName
public void setInstitutionName(java.lang.String str) -
getInvestAccountNumber
public java.lang.String getInvestAccountNumber() -
setInvestAccountNumber
public void setInvestAccountNumber(java.lang.String str) -
getAccountDescription
public java.lang.String getAccountDescription() -
setAccountDescription
public void setAccountDescription(java.lang.String description) -
getCardNumber
public java.lang.String getCardNumber() -
setCardNumber
public void setCardNumber(java.lang.String str) -
getCardExpirationMonth
public int getCardExpirationMonth() -
setCardExpirationMonth
public void setCardExpirationMonth(int expMonth) -
getCardExpirationYear
public int getCardExpirationYear() -
setCardExpirationYear
public void setCardExpirationYear(int expYear) -
getAPRPercent
public double getAPRPercent() -
setAPRPercent
public void setAPRPercent(double apr) -
getAnnualFee
public long getAnnualFee() -
setAnnualFee
public void setAnnualFee(long annualFee) -
getCreditLimit
public long getCreditLimit() -
setCreditLimit
public void setCreditLimit(long limit) -
getPoints
public double getPoints()Return the percentage of the loan that was added as a fee to the principal -
setPoints
public void setPoints(double points)Set the percentage of the loan that was added as a fee to the principal -
getInitialPrincipal
public long getInitialPrincipal()Get the principal, excluding any transactions within Moneydance, for this loan- Since:
- build 569
-
setInitialPrincipal
public void setInitialPrincipal(long principalAmt)Set the principal, excluding any transactions within Moneydance, for this loan- Since:
- build 569
-
setInterestRate
public void setInterestRate(double rate) -
getInterestRate
public double getInterestRate() -
setPaymentsPerYear
public void setPaymentsPerYear(int pmtsPerYear) -
getPaymentsPerYear
public int getPaymentsPerYear() -
setNumPayments
public void setNumPayments(int numPayments) -
getNumPayments
public int getNumPayments() -
getReminder
public boolean getReminder() -
setReminder
public void setReminder(boolean reminder) -
checkedInitialTransfer
public boolean checkedInitialTransfer() -
setCheckedInitialTransfer
public void setCheckedInitialTransfer() -
getInitialTransfer
Finds and returns the transaction that represents the initial transfer of funds from this loan account. If there is no initial transfer transaction then this returns null. -
setInitialTransfer
Sets the given transaction as the initial transfer for this account. This should only be called if there are not currently any other initial transfers for the account. -
getEscrow
public boolean getEscrow() -
setEscrow
public void setEscrow(boolean check) -
setEscrowPayment
public void setEscrowPayment(long escrowPmt) -
getEscrowPayment
public long getEscrowPayment() -
setCalcPmt
public void setCalcPmt(boolean calc) -
getCalcPmt
public boolean getCalcPmt() -
setFixedMonthlyPaymentAmount
public void setFixedMonthlyPaymentAmount(long mthPmt) -
getPaymentSchedule
-
getInterestAccount
-
setInterestAccount
-
getEscrowAccount
-
setEscrowAccount
-
getFixedMonthlyPaymentAmount
public long getFixedMonthlyPaymentAmount() -
getInvstCommissionAcct
-
getSecurityType
-
setSecurityType
-
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. -
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) -
getAPR
public double getAPR()Holds coupon/interest rate for bonds, cd's, or interest rates for debt accounts. -
setAPR
public void setAPR(double rate) -
hasExpiringRate
public boolean hasExpiringRate()Returns whether or not this debt account has an expiring rate (APR).- Since:
- 1191
-
setHasExpiringRate
public void setHasExpiringRate(boolean rateExpires)Sets whether or not this debt account has an expiring rate (APR).- Since:
- 1191
-
getRateChangeDate
public int getRateChangeDate()Gets the date that a debt account APR changes from it's initial value to it's permanent value. If the rate doesn't change this should return zero.- Since:
- 1191
-
setRateChangeDate
public void setRateChangeDate(int newDateInt)Sets the permanent APR for a debt account. Set to zero if the rate doesn't change from it's initial value.- Since:
- 1191
-
getPermanentAPR
public double getPermanentAPR()Gets the permanent APR that is in use for this debt account after the rate change date. If the rate doesn't change this should return zero.- Since:
- 1191
-
setPermanentAPR
public void setPermanentAPR(double newPermanentRate)Sets the permanent APR that should be used for this debt account after the rate change date. If the rate doesn't change this should be set to zero.- Since:
- 1191
-
getDebtPaymentProportion
public double getDebtPaymentProportion()Gets the percentage value (in the range 0-1) for payments made to this (credit card or loan) account. This value is dependent upon this being a debt account and the DebtPaymentSpec that is used for the account.- Since:
- 1191
-
setDebtPaymentProportion
public void setDebtPaymentProportion(double newValue)Sets the percentage value (in the range 0-1) for payments made to this (credit card or loan) account. This value is dependent upon this being a debt account and the DebtPaymentSpec that is used for the account.- Since:
- 1191
-
getDebtPaymentAmount
public long getDebtPaymentAmount()Gets the value for payments made to this (credit card or loan) account. This value is dependent upon this being a debt account and the DebtPaymentSpec that is used for the account.- Since:
- 1191
-
setDebtPaymentAmount
public void setDebtPaymentAmount(long newValue)Sets the value for payments made to this (credit card or loan) account. This value is dependent upon this being a debt account and the DebtPaymentSpec that is used for the account.- Since:
- 1191
-
getDebtPaymentSpec
Gets the payment plan used to pay off this account if it is a debt account (credit card, loan, etc).- Since:
- 1191
-
setDebtPaymentSpec
Sets the payment plan used to pay off this account if it is a debt account (credit card, loan, etc).- Since:
- 1191
-
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
Returns the compounding period for a CD. -
setCompounding
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) -
compareFullPathToAccount
Compare the full path of this account to the full path of the given account- Since:
- build 781
-
compareToAccount
Return an integer indicating whether this account is less than, equal to, or greater than the given account when sorting by type, name, and ID. This method was added in build 600 (Moneydance 2008) -
makeAccount
public static Account makeAccount(AccountBook accountBook, Account.AccountType accountType, Account parent)
-