com.carlosbcruz.account.dynamicmodel
Class AccountTransaction

java.lang.Object
  extended by com.carlosbcruz.account.dynamicmodel.AccountTransaction

public class AccountTransaction
extends java.lang.Object

Represents a transaction in an com.carlosbcruz.account.control. It can be a withdraw, deposit to a current com.carlosbcruz.account.control, deposit to a savings com.carlosbcruz.account.control or a move between current com.carlosbcruz.account.control and savings. A transaction also has a date, a value and a description.

Author:
Carlos Fernando Bella Cruz - pessoal@carlosbcruz.com

Field Summary
static int DEPOSIT_CURRENT_ACCOUNT
           
static int DEPOSIT_SAVINGS_ACCOUNT
           
static int MOVE_FROM_CURRENT_ACCOUNT_TO_SAVINGS
           
static int MOVE_FROM_SAVINGS_TO_CURRENT_ACCOUNT
           
static int WITHDRAW
           
 
Constructor Summary
AccountTransaction()
           
 
Method Summary
 int getDay()
          Returns the day.
 java.lang.String getDescription()
          Returns the description.
 int getMonth()
          Returns the month.
 int getType()
          Returns the type.
 float getValue()
          Returns the value.
 int getYear()
          Returns the year.
 void setDay(int day)
          Sets the day.
 void setDescription(java.lang.String description)
          Sets the description.
 void setMonth(int month)
          Sets the month.
 void setType(int type)
          Sets the type.
 void setValue(float value)
          Sets the value.
 void setYear(int year)
          Sets the year.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WITHDRAW

public static final int WITHDRAW
See Also:
Constant Field Values

DEPOSIT_CURRENT_ACCOUNT

public static final int DEPOSIT_CURRENT_ACCOUNT
See Also:
Constant Field Values

DEPOSIT_SAVINGS_ACCOUNT

public static final int DEPOSIT_SAVINGS_ACCOUNT
See Also:
Constant Field Values

MOVE_FROM_CURRENT_ACCOUNT_TO_SAVINGS

public static final int MOVE_FROM_CURRENT_ACCOUNT_TO_SAVINGS
See Also:
Constant Field Values

MOVE_FROM_SAVINGS_TO_CURRENT_ACCOUNT

public static final int MOVE_FROM_SAVINGS_TO_CURRENT_ACCOUNT
See Also:
Constant Field Values
Constructor Detail

AccountTransaction

public AccountTransaction()
Method Detail

getType

public int getType()
Returns the type.

Returns:
The transaction type

getValue

public float getValue()
Returns the value.

Returns:
The transaction value

setType

public void setType(int type)
Sets the type.

Parameters:
type - The type to set

getDay

public int getDay()
Returns the day.

Returns:
The transaction date

setDay

public void setDay(int day)
Sets the day.

Parameters:
day - The day to set

getMonth

public int getMonth()
Returns the month.

Returns:
The transction month

setMonth

public void setMonth(int month)
Sets the month.

Parameters:
month - The month to set

getYear

public int getYear()
Returns the year.

Returns:
The transaction year

setValue

public void setValue(float value)
Sets the value.

Parameters:
value - The value to set

setYear

public void setYear(int year)
Sets the year.

Parameters:
year - The year to set

getDescription

public java.lang.String getDescription()
Returns the description.

Returns:
The transaction description

setDescription

public void setDescription(java.lang.String description)
Sets the description.

Parameters:
description - The description to set