org.homeunix.thecave.buddi.plugin.api.model.impl
Class ImmutableTransactionImpl

java.lang.Object
  extended by org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableModelObjectImpl
      extended by org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableTransactionImpl
All Implemented Interfaces:
java.lang.Comparable<ImmutableModelObject>, ImmutableModelObject, ImmutableTransaction
Direct Known Subclasses:
ImmutableScheduledTransactionImpl

public class ImmutableTransactionImpl
extends ImmutableModelObjectImpl
implements ImmutableTransaction


Constructor Summary
ImmutableTransactionImpl(Transaction transaction)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 long getAmount()
          Returns the amouns associated with this transaction
 long getBalanceFrom()
          Returns the balance in the From account at the point in time of this transaction
 long getBalanceTo()
          Returns the balance in the To account at the point in time of this transaction
 java.util.Date getDate()
          Returns the date associated with this transaction
 java.lang.String getDescription()
          Returns the description associated with this transaction
 ImmutableSource getFrom()
          Returns the source associated with this transaction's From field
 java.lang.String getMemo()
          Returns the memo associated with this transaction
 java.lang.String getNumber()
          Returns the cheque number associated with this transaction
 ImmutableSource getTo()
          Returns the source associated with this transaction's To field
 Transaction getTransaction()
          Returns the wrapped object from the underlying data model.
 boolean isClearedFrom()
          Is this transaction marked as cleared?
 boolean isClearedTo()
          Is this transaction marked as cleared?
 boolean isDeleted()
          Is the transaction marked as deleted?
 boolean isInflow()
          Does this transacton represent an inflow of cash or an outflow?
 boolean isReconciledFrom()
          Is this transaction marked as reconciled?
 boolean isReconciledTo()
          Is this transaction marked as reconciled?
 boolean isScheduled()
          Was this transaction created through a scheduled transaction?
 
Methods inherited from class org.homeunix.thecave.buddi.plugin.api.model.impl.ImmutableModelObjectImpl
compareTo, getModified, getRaw, getUid, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.homeunix.thecave.buddi.plugin.api.model.ImmutableModelObject
getModified, getRaw, getUid
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ImmutableTransactionImpl

public ImmutableTransactionImpl(Transaction transaction)
Method Detail

getTransaction

public Transaction getTransaction()
Description copied from interface: ImmutableTransaction
Returns the wrapped object from the underlying data model. By accessing this method, you bypass all protection which the Buddi API gives you; it is not recommended to use this method unless you understand the risks associated with it.

Specified by:
getTransaction in interface ImmutableTransaction
Returns:

isClearedFrom

public boolean isClearedFrom()
Description copied from interface: ImmutableTransaction
Is this transaction marked as cleared?

Specified by:
isClearedFrom in interface ImmutableTransaction
Returns:

isClearedTo

public boolean isClearedTo()
Description copied from interface: ImmutableTransaction
Is this transaction marked as cleared?

Specified by:
isClearedTo in interface ImmutableTransaction
Returns:

getDate

public java.util.Date getDate()
Description copied from interface: ImmutableTransaction
Returns the date associated with this transaction

Specified by:
getDate in interface ImmutableTransaction
Returns:

getDescription

public java.lang.String getDescription()
Description copied from interface: ImmutableTransaction
Returns the description associated with this transaction

Specified by:
getDescription in interface ImmutableTransaction
Returns:

getMemo

public java.lang.String getMemo()
Description copied from interface: ImmutableTransaction
Returns the memo associated with this transaction

Specified by:
getMemo in interface ImmutableTransaction
Returns:

getNumber

public java.lang.String getNumber()
Description copied from interface: ImmutableTransaction
Returns the cheque number associated with this transaction

Specified by:
getNumber in interface ImmutableTransaction
Returns:

isReconciledFrom

public boolean isReconciledFrom()
Description copied from interface: ImmutableTransaction
Is this transaction marked as reconciled?

Specified by:
isReconciledFrom in interface ImmutableTransaction
Returns:

isReconciledTo

public boolean isReconciledTo()
Description copied from interface: ImmutableTransaction
Is this transaction marked as reconciled?

Specified by:
isReconciledTo in interface ImmutableTransaction
Returns:

isScheduled

public boolean isScheduled()
Description copied from interface: ImmutableTransaction
Was this transaction created through a scheduled transaction?

Specified by:
isScheduled in interface ImmutableTransaction
Returns:

getFrom

public ImmutableSource getFrom()
Description copied from interface: ImmutableTransaction
Returns the source associated with this transaction's From field

Specified by:
getFrom in interface ImmutableTransaction
Returns:

getTo

public ImmutableSource getTo()
Description copied from interface: ImmutableTransaction
Returns the source associated with this transaction's To field

Specified by:
getTo in interface ImmutableTransaction
Returns:

getBalanceFrom

public long getBalanceFrom()
Description copied from interface: ImmutableTransaction
Returns the balance in the From account at the point in time of this transaction

Specified by:
getBalanceFrom in interface ImmutableTransaction
Returns:

getBalanceTo

public long getBalanceTo()
Description copied from interface: ImmutableTransaction
Returns the balance in the To account at the point in time of this transaction

Specified by:
getBalanceTo in interface ImmutableTransaction
Returns:

isInflow

public boolean isInflow()
Description copied from interface: ImmutableTransaction
Does this transacton represent an inflow of cash or an outflow?

Specified by:
isInflow in interface ImmutableTransaction
Returns:

getAmount

public long getAmount()
Description copied from interface: ImmutableTransaction
Returns the amouns associated with this transaction

Specified by:
getAmount in interface ImmutableTransaction
Returns:

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class ImmutableModelObjectImpl

isDeleted

public boolean isDeleted()
Description copied from interface: ImmutableTransaction
Is the transaction marked as deleted?

Specified by:
isDeleted in interface ImmutableTransaction
Returns: