gnu.qif
Class BankTransaction

java.lang.Object
  |
  +--gnu.qif.QIFRecord
        |
        +--gnu.qif.BankTransaction

public class BankTransaction
extends QIFRecord

Bank account transaction. Does not support splits yet.

Version:
$Id: BankTransaction.html,v 1.1 2001/11/17 07:42:49 nicolas Exp $
Author:
Nicolas Marchildon

Field Summary
protected  java.lang.String account
          The account from which the amount of the transaction was taken from.
protected  java.lang.String category
          The category from which the amount of the transaction was taken from.
protected  boolean cleared
          The C field represents the clearing/reconciliation state of the transaction.
protected  java.util.Date date
          The D tag denotes the date.
static java.lang.String FIELD_ACCOUNT_FOR_TRANSFER
           
static java.lang.String FIELD_ACTION
           
static java.lang.String FIELD_ADDRESS
           
static java.lang.String FIELD_AMOUNT_OF_SPLIT
           
static java.lang.String FIELD_AMOUNT_TRANSFERRED
           
static java.lang.String FIELD_CATEGORY
           
static java.lang.String FIELD_CLEARED_STATUS
           
static java.lang.String FIELD_COMMISSION
           
static java.lang.String FIELD_DATE
           
static java.lang.String FIELD_END_OF_ENTRY
           
static java.lang.String FIELD_MEMO
           
static java.lang.String FIELD_MEMO_IN_SPLIT
           
static java.lang.String FIELD_NUMBER
           
static java.lang.String FIELD_PAYEE
           
static java.lang.String FIELD_PRICE
           
static java.lang.String FIELD_QUANTITY
           
static java.lang.String FIELD_SECURITY
           
static java.lang.String FIELD_TOTAL
           
static java.lang.String FIELD_TRANSACTION_AMOUNT
           
protected  java.lang.String memo
          The M field is the transaction memo.
protected  java.lang.String number
          The N field is a "Number", which is usually a check number or some other identifying number for the transaction.
protected  java.lang.String payee
          The P field is the Payee.
protected  boolean reconciled
          The C field represents the clearing/reconciliation state of the transaction.
protected  float total
          The T field is the "Total" amount of the transaction.
 
Fields inherited from class gnu.qif.QIFRecord
RECORD_ACCOUNT, RECORD_END, RECORD_START, RECORD_TYPE, TYPE_ASSET, TYPE_BANK, TYPE_CASH, TYPE_CATEGORY_LIST, TYPE_CLASS_LIST, TYPE_CREDIT_CARD, TYPE_INVESTMENT, TYPE_LIABILITY, TYPE_MEMORIZED
 
Constructor Summary
BankTransaction()
          Constructs a blank TransactionRecord.
 
Method Summary
 java.lang.String getAccount()
          Returns the account from which the amount of the transaction was taken from.
 java.lang.String getCategory()
           
 java.util.Date getDate()
          Returns the date of the transaction.
 java.lang.String getMemo()
          Returns the transaction's memo, or null if none was set.
 java.lang.String getNumber()
          Returns the transaction's number, which is usually a check number or some other identifying number for the transaction.
 java.lang.String getPayee()
          Returns who's involved in the transaction, such as the name of a store where expenses took place.
 boolean isCleared()
          Returns whether the transaction is "cleared" or not.
 boolean isReconciled()
          Returns whether the transaction is "reconciled" or not.
 void setAccount(java.lang.String account)
          Sets the account from which the amount of the transaction was taken from.
 void setCategory(java.lang.String category)
          Sets the category from which the amount of the transaction was taken from.
 void setCleared(boolean cleared)
          Sets the "cleared" status.
 void setDate(java.util.Date date)
          Sets the date of the transaction.
 void setMemo(java.lang.String memo)
          Give the transaction a memo.
 void setNumber(java.lang.String number)
          Sets the transaction's number, which is usually a check number or some other identifying number for the transaction.
 void setPayee(java.lang.String payee)
          Sets who's involved in the transaction, such as the name of a store where expenses took place.
 void setReconciled(boolean reconciled)
          Sets the "reconciled" flag.
 void setTotal(float total)
          Sets the total amount of the transaction.
 java.lang.String toString()
          Returns the complete QIF record corresponding to the AccountRecord.
 
Methods inherited from class gnu.qif.QIFRecord
encodeDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIELD_DATE

public static final java.lang.String FIELD_DATE

FIELD_TOTAL

public static final java.lang.String FIELD_TOTAL

FIELD_CLEARED_STATUS

public static final java.lang.String FIELD_CLEARED_STATUS

FIELD_NUMBER

public static final java.lang.String FIELD_NUMBER

FIELD_PAYEE

public static final java.lang.String FIELD_PAYEE

FIELD_MEMO

public static final java.lang.String FIELD_MEMO

FIELD_ADDRESS

public static final java.lang.String FIELD_ADDRESS

FIELD_CATEGORY

public static final java.lang.String FIELD_CATEGORY

FIELD_MEMO_IN_SPLIT

public static final java.lang.String FIELD_MEMO_IN_SPLIT

FIELD_AMOUNT_OF_SPLIT

public static final java.lang.String FIELD_AMOUNT_OF_SPLIT

FIELD_END_OF_ENTRY

public static final java.lang.String FIELD_END_OF_ENTRY

FIELD_ACTION

public static final java.lang.String FIELD_ACTION

FIELD_SECURITY

public static final java.lang.String FIELD_SECURITY

FIELD_PRICE

public static final java.lang.String FIELD_PRICE

FIELD_QUANTITY

public static final java.lang.String FIELD_QUANTITY

FIELD_TRANSACTION_AMOUNT

public static final java.lang.String FIELD_TRANSACTION_AMOUNT

FIELD_COMMISSION

public static final java.lang.String FIELD_COMMISSION

FIELD_ACCOUNT_FOR_TRANSFER

public static final java.lang.String FIELD_ACCOUNT_FOR_TRANSFER

FIELD_AMOUNT_TRANSFERRED

public static final java.lang.String FIELD_AMOUNT_TRANSFERRED

date

protected java.util.Date date
The D tag denotes the date.

total

protected float total
The T field is the "Total" amount of the transaction. If there are splits, the sum of all the split amounts is in a T field. Money going out of the account is negative.

number

protected java.lang.String number
The N field is a "Number", which is usually a check number or some other identifying number for the transaction.

cleared

protected boolean cleared
The C field represents the clearing/reconciliation state of the transaction. An x or X in this field means the transaction is "Cleared", a * means the transaction is Reconciled.

reconciled

protected boolean reconciled
The C field represents the clearing/reconciliation state of the transaction. An x or X in this field means the transaction is "Cleared", a * means the transaction is Reconciled.

memo

protected java.lang.String memo
The M field is the transaction memo.

payee

protected java.lang.String payee
The P field is the Payee.

category

protected java.lang.String category
The category from which the amount of the transaction was taken from.

account

protected java.lang.String account
The account from which the amount of the transaction was taken from.
Constructor Detail

BankTransaction

public BankTransaction()
Constructs a blank TransactionRecord.
Method Detail

setDate

public void setDate(java.util.Date date)
Sets the date of the transaction.

getDate

public java.util.Date getDate()
Returns the date of the transaction.

setTotal

public void setTotal(float total)
Sets the total amount of the transaction.

setNumber

public void setNumber(java.lang.String number)
Sets the transaction's number, which is usually a check number or some other identifying number for the transaction.

getNumber

public java.lang.String getNumber()
Returns the transaction's number, which is usually a check number or some other identifying number for the transaction.

setCleared

public void setCleared(boolean cleared)
Sets the "cleared" status.

isCleared

public boolean isCleared()
Returns whether the transaction is "cleared" or not.

setReconciled

public void setReconciled(boolean reconciled)
Sets the "reconciled" flag.

isReconciled

public boolean isReconciled()
Returns whether the transaction is "reconciled" or not.

setMemo

public void setMemo(java.lang.String memo)
Give the transaction a memo.

getMemo

public java.lang.String getMemo()
Returns the transaction's memo, or null if none was set.

setPayee

public void setPayee(java.lang.String payee)
Sets who's involved in the transaction, such as the name of a store where expenses took place.

getPayee

public java.lang.String getPayee()
Returns who's involved in the transaction, such as the name of a store where expenses took place.

setCategory

public void setCategory(java.lang.String category)
Sets the category from which the amount of the transaction was taken from.

getCategory

public java.lang.String getCategory()

setAccount

public void setAccount(java.lang.String account)
Sets the account from which the amount of the transaction was taken from.

getAccount

public java.lang.String getAccount()
Returns the account from which the amount of the transaction was taken from.

toString

public java.lang.String toString()
Returns the complete QIF record corresponding to the AccountRecord. Values that were not explicitely set are not included in the result.
Overrides:
toString in class java.lang.Object