public final class ParentTxn extends AbstractTxn implements com.infinitekind.tiksync.SyncableItem
AbstractTxn.ClearedStatus
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SYNCABLE_TYPE_VALUE |
BANK_TRANSACTION_TYPE, PRINT_CHECKNUM_PREFIX, PRINT_CHECKNUM_SUFFIX, SPLIT_TRANSACTION_TYPE, STATUS_CLEARED, STATUS_RECONCILING, STATUS_UNRECONCILED, syncID, 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
book, info
Constructor and Description |
---|
ParentTxn(AccountBook book) |
Modifier and Type | Method and Description |
---|---|
void |
addSplit(SplitTxn newSplit)
Add a "split" to this transaction.
|
ParentTxn |
duplicate()
Clone this transaction and all of its splits.
|
ParentTxn |
duplicateAsNew()
Create a new transaction with all of the same core fields as this transaction.
|
java.lang.String |
getCheckNumber()
Get the check number associated with this transaction.
|
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.
|
int |
getSplitCount()
Return the number of splits for this transaction.
|
java.lang.String |
getSyncItemType()
Subclasses should override this to return a static string identifying their type of object
|
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 |
isDirty()
Returns true if this transaction has been modified since
it was last saved.
|
boolean |
isTransferTo(Account acct)
Check whether or not this transaction includes a transfer
to the given account.
|
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 ParentTxn |
makeParentTxn(AccountBook book,
int date,
int taxDate,
long dateEntered,
java.lang.String checkNumber,
Account account,
java.lang.String description,
java.lang.String memo,
long id,
byte status)
Shortcut to create a ParentTxn object.
|
boolean |
removeSplit(int sTxnIdx)
Remove the split at the specified index.
|
boolean |
removeSplit(SplitTxn splitToRemove)
Remove the specified split.
|
void |
setCheckNumber(java.lang.String newCheckNumber)
Set the check number associated with this transaction.
|
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 |
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.
|
java.lang.String |
toMultilineString() |
java.lang.String |
toString() |
autoSyncsChanges, getAccount, getAddress, getAttachmentKeys, getAttachmentTag, getCheckNumAsInt, getClearedStatus, getDescription, getFIID, getFiTxnId, getOldTxnID, getStatus, getStatusChar, getTags, hasAttachments, isNew, loadFromStorage, needsToBePrinted, removeAttachmentTag, resetDirty, setAccount, setAttachmentTag, setClearedStatus, setDescription, setDirty, setFIID, setFiTxnId, setIsNew, setStatus, wasDownloaded
addParameters, addTags, decodeKeywordList, deleteItem, doesParameterExist, encodeKeywordList, equals, getAccountParameter, getAddressParameter, getBook, getBooleanParameter, getCurrencyParameter, getDoubleParameter, getIntParameter, getKeywords, getLongParameter, getParameter, getParameter, getParameterCount, getParameterKeys, getPreference, getPreferenceBoolean, getPreferenceDouble, getPreferenceInt, getPreferenceIntArray, getPreferenceLong, getPreferenceStringList, getPreferenceSublist, getPreferenceSubset, getSyncInfo, getSyncTimestamp, getUUID, hashCode, hasKeywordSubstring, initialize, isInEditingMode, isSyncable, itemWasUpdated, itemWillSync, makeSyncableItem, removeParameter, setAccountParameter, setAddress, setAddressParameter, setCurrencyParameter, setEditingMode, setKeywords, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameterNoNotify, setPreference, setPreference, setPreference, syncItem
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getSyncTimestamp, getUUID, itemWasUpdated, itemWillSync
getKeywords, getParameter, getParameter
public static final java.lang.String SYNCABLE_TYPE_VALUE
public ParentTxn(AccountBook book)
public void itemWasUpdated()
MoneydanceSyncableItem
itemWasUpdated
in class AbstractTxn
public void itemWillSync()
MoneydanceSyncableItem
itemWillSync
in class AbstractTxn
public final java.lang.String getSyncItemType()
MoneydanceSyncableItem
getSyncItemType
in interface com.infinitekind.tiksync.SyncableItem
getSyncItemType
in class MoneydanceSyncableItem
public final int getDateInt()
getDateInt
in interface Txn
getDateInt
in class AbstractTxn
public final void setDateInt(int newDate)
public final int getTaxDateInt()
getTaxDateInt
in interface Txn
getTaxDateInt
in class AbstractTxn
public final void setTaxDateInt(int newDate)
public final long getDateEntered()
getDateEntered
in interface Txn
getDateEntered
in class AbstractTxn
public final void setDateEntered(long newDateEntered)
public final int getOtherTxnCount()
getOtherTxnCount
in interface Txn
getOtherTxnCount
in class AbstractTxn
public final ParentTxn getParentTxn()
getParentTxn
in interface Txn
getParentTxn
in class AbstractTxn
public final AbstractTxn getOtherTxn(int i)
getOtherTxn
in interface Txn
getOtherTxn
in class AbstractTxn
public final boolean isTransferTo(Account acct)
isTransferTo
in interface Txn
isTransferTo
in class AbstractTxn
public final long getValue()
getValue
in interface Txn
getValue
in class AbstractTxn
public boolean isDirty()
isDirty
in class AbstractTxn
public final java.lang.String getCheckNumber()
getCheckNumber
in interface Txn
getCheckNumber
in class AbstractTxn
public 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 Txn
getTransferType
in class AbstractTxn
public 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 splitToRemove)
public final int indexOfSplit(SplitTxn sTxn)
public final ParentTxn duplicate()
duplicate
in class MoneydanceSyncableItem
public final ParentTxn duplicateAsNew()
public java.lang.String toMultilineString()
public java.lang.String toString()
toString
in class java.lang.Object
public static ParentTxn makeParentTxn(AccountBook book, int date, int taxDate, long dateEntered, java.lang.String checkNumber, Account account, java.lang.String description, java.lang.String memo, long id, byte status)