Interface Txn

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Account getAccount()
      Get the account associated with this transaction.
      int getCheckNumAsInt()
      Get the check number as an integer (returns 0 if it's not an integer)
      java.lang.String getCheckNumber()
      Get the checknumber associated with this transaction.
      AbstractTxn.ClearedStatus getClearedStatus()
      Get the status associated with this transaction.
      long getDateEntered()
      Get the date that this transaction was entered.
      int getDateInt()
      Get the date of this transaction
      java.lang.String getDescription()
      Get the description associated with this transaction.
      java.util.List<java.lang.String> getKeywords()
      Get the list of tags or keywords associated with this transaction
      AbstractTxn getOtherTxn​(int i)
      Get the transaction that make up the other side of this transaction at the specified index.
      int getOtherTxnCount()
      Get the number of transactions from the "other side" of this transaction.
      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.
      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.
      ParentTxn getParentTxn()  
      byte getStatus()
      Get the status associated with this transaction.
      char getStatusChar()
      Get a character that indicates the status of this transaction
      int getTaxDateInt()
      Get the date of this transaction for tax purposes.
      java.lang.String getTransferType()
      Get the type of transaction.
      long getValue()
      Get the value of this transaction, in the currency assigned to the account for this transaction.
      boolean isNew()
      Returns whether or not this transaction should be considered "unread" since having been downloaded
      boolean isTransferTo​(Account acct)
      Check whether or not this transaction includes a transfer to the given account.
      void setClearedStatus​(AbstractTxn.ClearedStatus newStatus)
      Set the status associated with this transaction.
      void setStatus​(byte newStatus)
      Set the status associated with this transaction.
    • Method Detail

      • 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.
      • 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

        AbstractTxn getOtherTxn​(int i)
        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

        boolean isTransferTo​(Account acct)
        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.
      • setClearedStatus

        void setClearedStatus​(AbstractTxn.ClearedStatus newStatus)
        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.