org.geebis.books.model.transaction
Class Transaction

java.lang.Object
  extended by org.geebis.books.model.transaction.Transaction
All Implemented Interfaces:
java.io.Serializable

@Name(value="transaction")
public class Transaction
extends java.lang.Object
implements java.io.Serializable

The Transaction class represents a single transaction in the GeebisBooks system The total of Transactions in the system represent the audit log for GeebisBooks

See Also:
Serialized Form

Constructor Summary
Transaction()
           
Transaction(java.lang.String description, java.util.Date date, Account account, java.lang.Double amount)
           
 
Method Summary
 Account getAccount()
          Gets the Account that this transaction was posted to
 java.lang.Double getAmount()
          Gets the amount of the transaction.
 java.util.Date getDate()
          Gets the date that this transaction is for
 java.lang.String getDescription()
          Gets the description of this transaction
 java.lang.Long getId()
           
 java.util.Date getTimestamp()
          Gets the date when this transaction created
 java.lang.Integer getVersion()
           
 void setAccount(Account account)
          Sets the Account that this transaction was posted to
 void setAmount(java.lang.Double amount)
          Sets the amount of the transaction
 void setDate(java.util.Date date)
          Sets the date that this transaction is for
 void setDescription(java.lang.String description)
          Sets the description of this transaction
 void setId(java.lang.Long id)
           
 void setTimestamp(java.util.Date timestamp)
          Sets the date when this transaction was created
 void setVersion(java.lang.Integer version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transaction

public Transaction()

Transaction

public Transaction(java.lang.String description,
                   java.util.Date date,
                   Account account,
                   java.lang.Double amount)
Method Detail

getDescription

public java.lang.String getDescription()
Gets the description of this transaction

Returns:
the description of this transaction

setDescription

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

Parameters:
description - the new description for this transaction

getDate

public java.util.Date getDate()
Gets the date that this transaction is for

Returns:
the date that this transaction is for

setDate

public void setDate(java.util.Date date)
Sets the date that this transaction is for

Parameters:
date - the new date that this transaction is for

getTimestamp

public java.util.Date getTimestamp()
Gets the date when this transaction created

Returns:
the date when this transaction was created

setTimestamp

public void setTimestamp(java.util.Date timestamp)
Sets the date when this transaction was created

Parameters:
timestamp - the new date when this transaction was created

getAccount

public Account getAccount()
Gets the Account that this transaction was posted to

Returns:
the Account that this transaction was posted to

setAccount

public void setAccount(Account account)
Sets the Account that this transaction was posted to

Parameters:
account - the new Account that this transaction was posted to

getAmount

public java.lang.Double getAmount()
Gets the amount of the transaction. Positive values are debits and negative values are credits, 0 is a 0 dollar debit

Returns:
the amount of the transaction

setAmount

public void setAmount(java.lang.Double amount)
Sets the amount of the transaction

Parameters:
amount - the new amount for this transaction
See Also:
getAmount()

getVersion

public java.lang.Integer getVersion()

setVersion

public void setVersion(java.lang.Integer version)

getId

public java.lang.Long getId()

setId

public void setId(java.lang.Long id)