public class TransactionSet extends java.lang.Object implements java.lang.Iterable<AbstractTxn>
Constructor and Description |
---|
TransactionSet(AccountBook book) |
Modifier and Type | Method and Description |
---|---|
void |
addNewTxn(ParentTxn t)
Add a new transaction to the transaction set.
|
void |
addTransactionListener(TransactionListener listener)
Register an object that would like to receive notification
when transactions have been modified, added, or removed.
|
ParentTxn |
findBestMatch(java.lang.String payee,
long amount,
Account acct)
Find the most recent transaction that has the closest payee
to the given value.
|
TxnSet |
getAllTxns()
Return a TxnSet containing all of the transactions
|
java.util.List<Txn> |
getListOfTxnNodes(TxnSearch search)
Returns a list of Txn objects, which are the nodes that affect each account.
|
long |
getTransactionCount() |
TxnSet |
getTransactions(TxnSearch filter) |
TxnSet |
getTransactionsForAccount(Account acct)
Get all of the transactions that are in the specified account
|
AbstractTxn |
getTxnByID(java.lang.String txnID) |
AbstractTxn |
getTxnByLegacyID(long txnID) |
java.util.List<AbstractTxn> |
getTxnsForAccount(Account acct)
Get all of the transactions that are in the specified account
|
boolean |
hasTxnsForAccount(Account acct) |
boolean |
isDirty() |
java.lang.Iterable<AbstractTxn> |
iterableTxns()
Return a reference to an iterable list of transactions.
|
java.util.Iterator<AbstractTxn> |
iterator()
Return an Enumeration containing all of the transactions.
|
void |
loadTxn(ParentTxn t)
Add the specified transaction to the txn set.
|
ParentTxn[] |
matchPayee(Account account,
java.lang.String description,
boolean caseSensitive,
int numMatches)
Return the most recently entered 'numMatches' transactions that match
the given description.
|
SplitTxn[] |
matchSplitPayee(Account account,
java.lang.String description,
boolean caseSensitive,
int numMatches)
Return the most recently entered 'numMatches' split transactions that
match the given description.
|
void |
removeAll()
Good gravy, don't call this.
|
void |
removeTransactionListener(TransactionListener listener) |
void |
removeTxn(AbstractTxn txn)
Remove the specified transaction.
|
void |
resetDirtyFlags() |
void |
setDirty() |
void |
txnModified(AbstractTxn t)
Record that the specified transaction has been modified,
notifying all listeners that this txn and all of its splits
have been modified.
|
public TransactionSet(AccountBook book)
public void setDirty()
public boolean isDirty()
public void resetDirtyFlags()
public void loadTxn(ParentTxn t)
public void addNewTxn(ParentTxn t)
public void removeTxn(AbstractTxn txn)
public void txnModified(AbstractTxn t)
public void addTransactionListener(TransactionListener listener)
public void removeTransactionListener(TransactionListener listener)
public java.util.Iterator<AbstractTxn> iterator()
iterator
in interface java.lang.Iterable<AbstractTxn>
public java.lang.Iterable<AbstractTxn> iterableTxns()
public TxnSet getAllTxns()
public long getTransactionCount()
public ParentTxn findBestMatch(java.lang.String payee, long amount, Account acct)
public final AbstractTxn getTxnByID(java.lang.String txnID)
public final AbstractTxn getTxnByLegacyID(long txnID)
public final boolean hasTxnsForAccount(Account acct)
public TxnSet getTransactionsForAccount(Account acct)
public java.util.List<AbstractTxn> getTxnsForAccount(Account acct)
public SplitTxn[] matchSplitPayee(Account account, java.lang.String description, boolean caseSensitive, int numMatches)
public ParentTxn[] matchPayee(Account account, java.lang.String description, boolean caseSensitive, int numMatches)
public void removeAll()