Coverage Report - org.homeunix.thecave.buddi.plugin.api.model.ImmutableTransaction
 
Classes in this File Line Coverage Branch Coverage Complexity
ImmutableTransaction
N/A
N/A
1
 
 1  
 /*
 2  
  * Created on Aug 12, 2007 by wyatt
 3  
  */
 4  
 package org.homeunix.thecave.buddi.plugin.api.model;
 5  
 
 6  
 import java.util.Date;
 7  
 import java.util.List;
 8  
 
 9  
 import org.homeunix.thecave.buddi.model.Transaction;
 10  
 
 11  
 public interface ImmutableTransaction extends ImmutableModelObject {
 12  
         
 13  
         /**
 14  
          * Returns the amouns associated with this transaction
 15  
          * @return
 16  
          */
 17  
         public long getAmount();
 18  
         
 19  
         /**
 20  
          * Returns the balance from the given account at the point in time of this transaction
 21  
          * @return
 22  
          */
 23  
         public long getBalance(ImmutableSource source);
 24  
 
 25  
         /**
 26  
          * Returns the date associated with this transaction
 27  
          * @return
 28  
          */
 29  
         public Date getDate();
 30  
         
 31  
         /**
 32  
          * Returns the description associated with this transaction
 33  
          * @return
 34  
          */
 35  
         public String getDescription();
 36  
         
 37  
         /**
 38  
          * Returns the source associated with this transaction's From field
 39  
          * @return
 40  
          */
 41  
         public ImmutableSource getFrom();
 42  
         
 43  
         /**
 44  
          * Returns the memo associated with this transaction
 45  
          * @return
 46  
          */
 47  
         public String getMemo();
 48  
         
 49  
         /**
 50  
          * Returns the cheque number associated with this transaction
 51  
          * @return
 52  
          */
 53  
         public String getNumber();
 54  
 
 55  
         /**
 56  
          * Returns the source associated with this transaction's To field
 57  
          * @return
 58  
          */
 59  
         public ImmutableSource getTo();
 60  
         
 61  
         /**
 62  
          * Returns a list of from splits
 63  
          * @return
 64  
          */
 65  
         public List<ImmutableTransactionSplit> getImmutableFromSplits();
 66  
 
 67  
         /**
 68  
          * Returns a list of to splits
 69  
          * @return
 70  
          */
 71  
         public List<ImmutableTransactionSplit> getImmutableToSplits();
 72  
         
 73  
         /**
 74  
          * Returns the wrapped object from the underlying data model.  By 
 75  
          * accessing this method, you bypass all protection which the Buddi API
 76  
          * gives you; it is not recommended to use this method unless you understand
 77  
          * the risks associated with it. 
 78  
          * @return
 79  
          */
 80  
         public Transaction getTransaction();
 81  
         
 82  
         /**
 83  
          * Is this transaction marked as cleared?
 84  
          * @return
 85  
          */
 86  
         public boolean isClearedFrom();
 87  
         
 88  
         /**
 89  
          * Is this transaction marked as cleared?
 90  
          * @return
 91  
          */
 92  
         public boolean isClearedTo();
 93  
         
 94  
         /**
 95  
          * Does this transacton represent an inflow of cash or an outflow?
 96  
          * @return
 97  
          */
 98  
         public boolean isInflow();
 99  
         
 100  
         /**
 101  
          * Is this transaction marked as reconciled?
 102  
          * @return
 103  
          */
 104  
         public boolean isReconciledFrom();
 105  
         
 106  
         /**
 107  
          * Is this transaction marked as reconciled?
 108  
          * @return
 109  
          */
 110  
         public boolean isReconciledTo();
 111  
         
 112  
         /**
 113  
          * Was this transaction created through a scheduled transaction?
 114  
          * @return
 115  
          */
 116  
         public boolean isScheduled();
 117  
         
 118  
         /**
 119  
          * Is the transaction marked as deleted?
 120  
          * @return
 121  
          */
 122  
         public boolean isDeleted();
 123  
 }