public abstract class AbstractTxn extends MoneydanceSyncableItem implements Txn
Modifier and Type | Class and Description |
---|---|
static class |
AbstractTxn.ClearedStatus |
Modifier and Type | Field and Description |
---|---|
static int |
BANK_TRANSACTION_TYPE |
static java.lang.String |
PRINT_CHECKNUM_PREFIX |
static java.lang.String |
PRINT_CHECKNUM_SUFFIX |
static int |
SPLIT_TRANSACTION_TYPE |
static byte |
STATUS_CLEARED |
static byte |
STATUS_RECONCILING |
static byte |
STATUS_UNRECONCILED |
protected java.lang.String |
syncID |
static java.lang.String |
TAG_FI_ID |
static java.lang.String |
TAG_FITID_PREFIX |
static java.lang.String |
TAG_INVST_SPLIT_EXP |
static java.lang.String |
TAG_INVST_SPLIT_FEE |
static java.lang.String |
TAG_INVST_SPLIT_INC |
static java.lang.String |
TAG_INVST_SPLIT_SEC |
static java.lang.String |
TAG_INVST_SPLIT_TYPE |
static java.lang.String |
TAG_INVST_SPLIT_XFR |
static java.lang.String |
TAG_IS_NEW_TXN |
static java.lang.String |
TAG_ONLINE_PMT_ID |
static java.lang.String |
TAG_QIF_IMPORT_SESSION |
static java.lang.String |
TAG_QIF_INVST_ACTION |
static java.lang.String |
TAG_RECON_ASOFDT |
static java.lang.String |
TAG_RECON_DATE |
static java.lang.String |
TAG_SPLIT_ADDED |
static java.lang.String |
TAG_SPLIT_AMOUNT |
static java.lang.String |
TAG_SPLIT_CALC |
static java.lang.String |
TAG_SPLIT_PAIR |
static java.lang.String |
TRANSFER_TYPE_BANK |
static java.lang.String |
TRANSFER_TYPE_BUYSELL |
static java.lang.String |
TRANSFER_TYPE_BUYSELLXFR |
static java.lang.String |
TRANSFER_TYPE_DIVIDEND |
static java.lang.String |
TRANSFER_TYPE_DIVIDENDXFR |
static java.lang.String |
TRANSFER_TYPE_MISCINCEXP |
static java.lang.String |
TRANSFER_TYPE_SHORTCOVER |
book, info
Constructor and Description |
---|
AbstractTxn(AccountBook book)
Construct a transaction with the given account, description,
transaction ID (-1 for a new transaction) and status.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
autoSyncsChanges()
transactions are explicitly updated when recording a transaction
|
Account |
getAccount()
Get the account associated with this transaction.
|
AddressBookEntry |
getAddress()
Returns the address book entry (if any) that is associated
with this transaction.
|
java.util.List<java.lang.String> |
getAttachmentKeys()
Return a list of tag names for attachments to this object
|
java.lang.String |
getAttachmentTag(java.lang.String tagName)
Return the storage location, if any, that is associated with the given tag name.
|
int |
getCheckNumAsInt()
Get the check number as an integer (returns 0 if it's not an integer)
|
abstract java.lang.String |
getCheckNumber()
Get the checknumber associated with this transaction.
|
AbstractTxn.ClearedStatus |
getClearedStatus()
Get the status associated with this transaction.
|
abstract long |
getDateEntered()
Get the date that this transaction was entered.
|
abstract int |
getDateInt()
Get the date of this transaction
|
java.lang.String |
getDescription()
Get the description associated with this transaction.
|
java.lang.String |
getFIID()
Returns the identifier for the financial institution from which this
transaction was downloaded, or null if no financial institution information
has been provided.
|
java.lang.String |
getFiTxnId(int protocolId)
Return the ID that the financial institution uses to
identify this transaction.
|
long |
getOldTxnID() |
abstract AbstractTxn |
getOtherTxn(int i)
Get the transaction that make up the other side of this
transaction at the specified index.
|
abstract int |
getOtherTxnCount()
Get the number of transactions from the "other side" of this
transaction.
|
abstract ParentTxn |
getParentTxn()
Get the ParentTxn of this transfer.
|
byte |
getStatus()
Get the status associated with this transaction.
|
char |
getStatusChar()
Get a character that indicates the status of this transaction
|
com.infinitekind.tiksync.SyncRecord |
getTags() |
abstract int |
getTaxDateInt()
Get the date of this transaction for tax purposes.
|
abstract java.lang.String |
getTransferType()
Get the type of transaction.
|
abstract long |
getValue()
Get the value of this transaction, in the currency assigned
to the account for this transaction.
|
boolean |
hasAttachments()
Return true if if this transaction has any attachments
|
boolean |
isDirty()
Returns true if this transaction has been modified since
it was last saved.
|
boolean |
isNew()
Returns whether or not this transaction should be considered "unread" since having been downloaded
|
abstract boolean |
isTransferTo(Account acct)
Check whether or not this transaction includes a transfer
to the given account.
|
protected void |
itemWasUpdated()
This is called after an item is updated by calling itemWasUpdated(SyncRecord).
|
protected void |
itemWillSync()
This is called just before an item will be stored and/or synced when itemWillSync(SyncRecord)
is called.
|
void |
loadFromStorage(java.util.Map<java.lang.String,java.lang.String> newTags)
Set the TagSet associated with this object.
|
boolean |
needsToBePrinted()
Returns true if this transaction has been marked as
to-be-printed.
|
void |
removeAttachmentTag(java.lang.String tagName)
Remove the specified attachment tag, along with the file that it contains
|
void |
resetDirty()
Mark this transaction as unmodified.
|
void |
setAccount(Account newAccount)
Set the account associated with this transaction.
|
void |
setAttachmentTag(java.lang.String tagName,
java.io.File file)
Set the file that is associated with the given tag name, copying the file into the
data set's internal storage.
|
void |
setClearedStatus(AbstractTxn.ClearedStatus newStatus)
Set the status associated with this transaction.
|
void |
setDescription(java.lang.String newDescription)
Set the description associated with this transaction.
|
void |
setDirty()
Mark this transaction as modified, and needing to be saved.
|
void |
setFIID(java.lang.String fiID)
Sets the identifier for the financial institution from which this
transaction was downloaded.
|
void |
setFiTxnId(int protocolId,
java.lang.String fitid)
Set the ID that the financial institution uses to
identify this transaction.
|
void |
setIsNew(boolean isNew)
Sets whether or not this transaction should be considered "unread" since having been downloaded
|
void |
setStatus(byte newStatusByte)
Set the status associated with this transaction.
|
boolean |
wasDownloaded()
Return true iff this transaction has a FI transaction ID associated with it.
|
addParameters, addTags, decodeKeywordList, deleteItem, doesParameterExist, duplicate, 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, getSyncItemType, 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, toString, wait, wait, wait
getKeywords, getParameter, getParameter
public static final java.lang.String PRINT_CHECKNUM_PREFIX
public static final java.lang.String PRINT_CHECKNUM_SUFFIX
public static final byte STATUS_CLEARED
public static final byte STATUS_RECONCILING
public static final byte STATUS_UNRECONCILED
public static final int BANK_TRANSACTION_TYPE
public static final int SPLIT_TRANSACTION_TYPE
public static final java.lang.String TRANSFER_TYPE_BANK
public static final java.lang.String TRANSFER_TYPE_BUYSELL
public static final java.lang.String TRANSFER_TYPE_SHORTCOVER
public static final java.lang.String TRANSFER_TYPE_BUYSELLXFR
public static final java.lang.String TRANSFER_TYPE_DIVIDEND
public static final java.lang.String TRANSFER_TYPE_DIVIDENDXFR
public static final java.lang.String TRANSFER_TYPE_MISCINCEXP
public static final java.lang.String TAG_FITID_PREFIX
public static final java.lang.String TAG_FI_ID
public static final java.lang.String TAG_ONLINE_PMT_ID
public static final java.lang.String TAG_QIF_IMPORT_SESSION
public static final java.lang.String TAG_QIF_INVST_ACTION
public static final java.lang.String TAG_SPLIT_CALC
public static final java.lang.String TAG_SPLIT_ADDED
public static final java.lang.String TAG_SPLIT_AMOUNT
public static final java.lang.String TAG_SPLIT_PAIR
public static final java.lang.String TAG_IS_NEW_TXN
public static final java.lang.String TAG_INVST_SPLIT_TYPE
public static final java.lang.String TAG_INVST_SPLIT_FEE
public static final java.lang.String TAG_INVST_SPLIT_SEC
public static final java.lang.String TAG_INVST_SPLIT_XFR
public static final java.lang.String TAG_INVST_SPLIT_EXP
public static final java.lang.String TAG_INVST_SPLIT_INC
public static final java.lang.String TAG_RECON_DATE
public static final java.lang.String TAG_RECON_ASOFDT
protected java.lang.String syncID
public AbstractTxn(AccountBook book)
protected void itemWasUpdated()
MoneydanceSyncableItem
itemWasUpdated
in class MoneydanceSyncableItem
protected void itemWillSync()
MoneydanceSyncableItem
itemWillSync
in class MoneydanceSyncableItem
protected boolean autoSyncsChanges()
autoSyncsChanges
in class MoneydanceSyncableItem
public long getOldTxnID()
public abstract long getDateEntered()
getDateEntered
in interface Txn
public abstract int getDateInt()
getDateInt
in interface Txn
public abstract int getTaxDateInt()
getTaxDateInt
in interface Txn
public abstract long getValue()
public abstract ParentTxn getParentTxn()
getParentTxn
in interface Txn
public abstract int getOtherTxnCount()
getOtherTxnCount
in interface Txn
public abstract AbstractTxn getOtherTxn(int i)
getOtherTxn
in interface Txn
public abstract boolean isTransferTo(Account acct)
isTransferTo
in interface Txn
public abstract java.lang.String getTransferType()
getTransferType
in interface Txn
public final Account getAccount()
getAccount
in interface Txn
public final void setAccount(Account newAccount)
public final java.lang.String getDescription()
getDescription
in interface Txn
public final void setDescription(java.lang.String newDescription)
public final char getStatusChar()
getStatusChar
in interface Txn
public final byte getStatus()
public AbstractTxn.ClearedStatus getClearedStatus()
Txn
getClearedStatus
in interface Txn
public final void setClearedStatus(AbstractTxn.ClearedStatus newStatus)
setClearedStatus
in interface Txn
public final void setStatus(byte newStatusByte)
public abstract java.lang.String getCheckNumber()
getCheckNumber
in interface Txn
public int getCheckNumAsInt()
getCheckNumAsInt
in interface Txn
public final java.lang.String getFiTxnId(int protocolId)
public final void setFiTxnId(int protocolId, java.lang.String fitid)
public final java.lang.String getFIID()
public final void setFIID(java.lang.String fiID)
public final boolean wasDownloaded()
public boolean isNew()
public void setIsNew(boolean isNew)
public boolean isDirty()
public final void setDirty()
setDirty
in class MoneydanceSyncableItem
public final void resetDirty()
public final com.infinitekind.tiksync.SyncRecord getTags()
public final void loadFromStorage(java.util.Map<java.lang.String,java.lang.String> newTags)
public AddressBookEntry getAddress()
getAddress
in class MoneydanceSyncableItem
public final boolean needsToBePrinted()
public java.lang.String getAttachmentTag(java.lang.String tagName)
public void setAttachmentTag(java.lang.String tagName, java.io.File file) throws java.lang.Exception
java.lang.Exception
public void removeAttachmentTag(java.lang.String tagName)
public boolean hasAttachments()
public java.util.List<java.lang.String> getAttachmentKeys()