public final class ParentTxn extends AbstractTxn
BANK_TRANSACTION_TYPE, SPLIT_TRANSACTION_TYPE, STATUS_CLEARED, STATUS_RECONCILING, STATUS_UNRECONCILED, TAG_FI_ID, TAG_FITID_PREFIX, TAG_INVST_SPLIT_EXP, TAG_INVST_SPLIT_FEE, TAG_INVST_SPLIT_INC, TAG_INVST_SPLIT_SEC, TAG_INVST_SPLIT_TYPE, TAG_INVST_SPLIT_XFR, TAG_IS_NEW_TXN, TAG_ONLINE_PMT_ID, TAG_QIF_IMPORT_SESSION, TAG_QIF_INVST_ACTION, TAG_RECON_ASOFDT, TAG_RECON_DATE, TAG_SPLIT_ADDED, TAG_SPLIT_AMOUNT, TAG_SPLIT_CALC, TAG_SPLIT_PAIR, TRANSFER_TYPE_BANK, TRANSFER_TYPE_BUYSELL, TRANSFER_TYPE_BUYSELLXFR, TRANSFER_TYPE_DIVIDEND, TRANSFER_TYPE_DIVIDENDXFR, TRANSFER_TYPE_MISCINCEXP, TRANSFER_TYPE_SHORTCOVER| Constructor and Description |
|---|
ParentTxn(int date,
int taxDate,
long dateEntered,
java.lang.String checkNumber,
Account account,
java.lang.String description,
java.lang.String memo,
long id,
byte status)
Constructor as of build 350.
|
ParentTxn(long date,
long taxDate,
long dateEntered,
java.lang.String checkNumber,
Account account,
java.lang.String description,
java.lang.String memo,
long id,
byte status)
Deprecated.
Please use the constructor with int date parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSplit(SplitTxn newSplit)
Add a "split" to this transaction.
|
void |
clearTags()
Remove all the tags associated with this transaction, and any
of its splits.
|
ParentTxn |
createNew()
Create a new transaction with all of the same fields as this transaction.
|
ParentTxn |
duplicate()
Clone this transaction and all of its splits.
|
AddressBook.AddressEntry |
getAddress()
Returns the address book entry (if any) that is associated
with this transaction.
|
java.lang.String |
getCheckNumber()
Get the check number associated with this transaction.
|
long |
getDate()
Deprecated.
use getDateInt() instead
|
long |
getDateEntered()
Get the date that this transaction was entered.
|
int |
getDateInt()
Return the date encoded as an integer with decimal form YYYYMMDD
|
java.lang.String |
getMemo()
Get the memo associated with this transaction.
|
AbstractTxn |
getOtherTxn(int i)
Return the "other transaction" at the specified index.
|
int |
getOtherTxnCount()
Return the number of "other transactions".
|
ParentTxn |
getParentTxn()
Get the ParentTxn of this transfer.
|
SplitTxn |
getSplit(int i)
Return the split for this transaction at the given index.
|
SplitTxn |
getSplitByID(long id)
Get the SplitTxn with the given ID or return null if none of the
SplitTxns have the given ID.
|
int |
getSplitCount()
Return the number of splits for this transaction.
|
long |
getTaxDate()
Deprecated.
use getTaxDateInt() instead
|
int |
getTaxDateInt()
Return the tax date encoded as an integer with decimal form YYYYMMDD
|
java.lang.String |
getTransferType()
Get the type of transfer.
|
long |
getValue()
Get the value of this transaction in the currency assigned to
the account that is associated with this transaction.
|
int |
indexOfSplit(SplitTxn sTxn)
Get the index of the specified split, or -1 if the
split is not associated with this transaction.
|
boolean |
isTransferTo(Account acct)
Check whether or not this transaction includes a transfer
to the given account.
|
boolean |
removeSplit(int sTxnIdx)
Remove the split at the specified index.
|
boolean |
removeSplit(SplitTxn sTxn)
Remove the specified split.
|
void |
setAddress(AddressBook.AddressEntry newAddress)
This method is only to receive addresses already added to the address book.
|
void |
setCheckNumber(java.lang.String newCheckNumber)
Set the check number associated with this transaction.
|
void |
setDate(long newDate)
Deprecated.
use setDateInt(int) instead
|
void |
setDateEntered(long newDateEntered)
Set the date that this transaction was entered.
|
void |
setDateInt(int newDate)
Set the date (encoded as an int with decimal form YYYYMMDD)
associated with this transaction.
|
void |
setMemo(java.lang.String newMemo)
Set the memo associated with this transaction.
|
void |
setTaxDate(long newDate)
Deprecated.
use setTaxDateInt(int) instead
|
void |
setTaxDateInt(int newDate)
Set the tax date (encoded as an int with decimal form YYYYMMDD)
associated with this transaction.
|
void |
setTransferType(java.lang.String type)
Set the type of transfer.
|
void |
takeValuesFrom(ParentTxn otherTxn)
Copy all of the values from the given transaction into this transaction
|
java.lang.String |
toMultilineString() |
java.lang.String |
toString() |
getAccount, getCheckNumAsInt, getDescription, getFIID, getFiTxnId, getStatus, getStatusChar, getTag, getTag, getTags, getTxnId, isDirty, isNew, needsToBePrinted, removeTag, resetDirty, setAccount, setDescription, setDirty, setFIID, setFiTxnId, setIsNew, setStatus, setTag, setTags, wasDownloadedpublic ParentTxn(long date,
long taxDate,
long dateEntered,
java.lang.String checkNumber,
Account account,
java.lang.String description,
java.lang.String memo,
long id,
byte status)
public ParentTxn(int date,
int taxDate,
long dateEntered,
java.lang.String checkNumber,
Account account,
java.lang.String description,
java.lang.String memo,
long id,
byte status)
public final long getDate()
getDate in class AbstractTxnpublic final int getDateInt()
getDateInt in interface TxngetDateInt in class AbstractTxnpublic final void setDate(long newDate)
public final void setDateInt(int newDate)
public final long getTaxDate()
getTaxDate in class AbstractTxnpublic final int getTaxDateInt()
getTaxDateInt in interface TxngetTaxDateInt in class AbstractTxnpublic final void setTaxDate(long newDate)
public final void setTaxDateInt(int newDate)
public final void clearTags()
public AddressBook.AddressEntry getAddress()
public void setAddress(AddressBook.AddressEntry newAddress)
public final long getDateEntered()
getDateEntered in interface TxngetDateEntered in class AbstractTxnpublic final void setDateEntered(long newDateEntered)
public final int getOtherTxnCount()
getOtherTxnCount in interface TxngetOtherTxnCount in class AbstractTxnpublic final ParentTxn getParentTxn()
getParentTxn in interface TxngetParentTxn in class AbstractTxnpublic final AbstractTxn getOtherTxn(int i)
getOtherTxn in interface TxngetOtherTxn in class AbstractTxnpublic final boolean isTransferTo(Account acct)
isTransferTo in interface TxnisTransferTo in class AbstractTxnpublic final long getValue()
getValue in interface TxngetValue in class AbstractTxnpublic final java.lang.String getCheckNumber()
getCheckNumber in interface TxngetCheckNumber in class AbstractTxnpublic final void setCheckNumber(java.lang.String newCheckNumber)
public final java.lang.String getMemo()
public final void setMemo(java.lang.String newMemo)
public final java.lang.String getTransferType()
getTransferType in interface TxngetTransferType in class AbstractTxnpublic final void setTransferType(java.lang.String type)
public final void addSplit(SplitTxn newSplit)
public final SplitTxn getSplit(int i)
public final int getSplitCount()
public final boolean removeSplit(int sTxnIdx)
public final boolean removeSplit(SplitTxn sTxn)
public final int indexOfSplit(SplitTxn sTxn)
public final SplitTxn getSplitByID(long id)
public final ParentTxn duplicate()
public final void takeValuesFrom(ParentTxn otherTxn)
public final ParentTxn createNew()
public java.lang.String toMultilineString()
public java.lang.String toString()
toString in class java.lang.Object