Interface Txn
- All Known Implementing Classes:
AbstractTxn,ParentTxn,SplitTxn
public interface Txn
-
Method Summary
Modifier and Type Method Description AccountgetAccount()Get the account associated with this transaction.intgetCheckNumAsInt()Get the check number as an integer (returns 0 if it's not an integer)java.lang.StringgetCheckNumber()Get the checknumber associated with this transaction.AbstractTxn.ClearedStatusgetClearedStatus()Get the status associated with this transaction.longgetDateEntered()Get the date that this transaction was entered.intgetDateInt()Get the date of this transactionjava.lang.StringgetDescription()Get the description associated with this transaction.java.util.List<java.lang.String>getKeywords()Get the list of tags or keywords associated with this transactionAbstractTxngetOtherTxn(int i)Get the transaction that make up the other side of this transaction at the specified index.intgetOtherTxnCount()Get the number of transactions from the "other side" of this transaction.java.lang.StringgetParameter(java.lang.String key)Get the value associated with the given key (if any) in this transaction's set of tags.java.lang.StringgetParameter(java.lang.String key, java.lang.String defaultVal)Get the value associated with the given key in this transactions set of tags.ParentTxngetParentTxn()bytegetStatus()Get the status associated with this transaction.chargetStatusChar()Get a character that indicates the status of this transactionintgetTaxDateInt()Get the date of this transaction for tax purposes.java.lang.StringgetTransferType()Get the type of transaction.longgetValue()Get the value of this transaction, in the currency assigned to the account for this transaction.booleanisNew()Returns whether or not this transaction should be considered "unread" since having been downloadedbooleanisTransferTo(Account acct)Check whether or not this transaction includes a transfer to the given account.voidsetClearedStatus(AbstractTxn.ClearedStatus newStatus)Set the status associated with this transaction.voidsetStatus(byte newStatus)Set the status associated with this transaction.
-
Method Details
-
getDateEntered
long getDateEntered()Get the date that this transaction was entered. -
getDateInt
int getDateInt()Get the date of this transaction -
getTaxDateInt
int getTaxDateInt()Get the date of this transaction for tax purposes. -
getValue
long getValue()Get the value of this transaction, in the currency assigned to the account for this transaction. -
getParentTxn
ParentTxn getParentTxn() -
getOtherTxnCount
int getOtherTxnCount()Get the number of transactions from the "other side" of this transaction. For splits, this will always be 1. For ParentTxns, this will be the number of splits. -
getOtherTxn
Get the transaction that make up the other side of this transaction at the specified index. For SplitTxns, this index should always be 0 because there is only one "other transaction". for ParentTxns, this will return the split at the specified index. -
isTransferTo
Check whether or not this transaction includes a transfer to the given account. -
getTransferType
java.lang.String getTransferType()Get the type of transaction. Usually only used in the investment register to differentiate between buy, sell, and stock split transactions. -
getAccount
Account getAccount()Get the account associated with this transaction. -
getKeywords
java.util.List<java.lang.String> getKeywords()Get the list of tags or keywords associated with this transaction -
getDescription
java.lang.String getDescription()Get the description associated with this transaction. -
getStatusChar
char getStatusChar()Get a character that indicates the status of this transaction -
getStatus
byte getStatus()Get the status associated with this transaction. -
getClearedStatus
AbstractTxn.ClearedStatus getClearedStatus()Get the status associated with this transaction. -
setClearedStatus
Set the status associated with this transaction. -
setStatus
void setStatus(byte newStatus)Set the status associated with this transaction. -
getCheckNumber
java.lang.String getCheckNumber()Get the checknumber associated with this transaction. -
getCheckNumAsInt
int getCheckNumAsInt()Get the check number as an integer (returns 0 if it's not an integer) -
isNew
boolean isNew()Returns whether or not this transaction should be considered "unread" since having been downloaded -
getParameter
java.lang.String getParameter(java.lang.String key)Get the value associated with the given key (if any) in this transaction's set of tags. -
getParameter
java.lang.String getParameter(java.lang.String key, java.lang.String defaultVal)Get the value associated with the given key in this transactions set of tags. If there is no value associated with the given key, return the given default value.
-