The Gravey Framework and RATS RIA

Class BalanceListModel

Object
   |
   +--GrvObject
         |
         +--MVCObserver
               |
               +--MVCModel
                     |
                     +--MVCListModel
                           |
                           +--BalanceListModel

class BalanceListModel
extends MVCListModel


DOMAIN-OBJECT: This class encapsulates the data model for the Balance list of a particular Account. This model subscribes to a AccountSelectionModel so that a new balance list can be downloaded whenever a new account is selected. Secondarily, this model implements the MVCBoolModel.isTrue() interface where the value reflects whether this model is "dirty".
Version: 2.0

Author: Bruce Wallace (PolyGlotInc.com)
See:

Defined in rats.js


Constructor Summary
BalanceListModel ()
           
 
Method Summary
 int appendTransaction( <int> sIndex )
           append a new blank transaction associated with the specified balance
 boolean canBalanceToggle(<int> i)
           return whether the specified balance can expand/collapse
 boolean canToggle( <boolean> doAllFlag, <int> si )
           return whether balance(s) can expand/collapse
 int createTransaction( <int> sIndex, <int> rIndex )
           insert a new blank transaction associated with the specified balance
 void deleteTransaction( <int> sIndex, <int> rIndex )
           delete the specified transaction
 void editTransaction( <int> sIndex, <int> rIndex )
           enable editing on the specified transaction
 Object getAccountKey()
           return opaque key of our Account
 Float getDiffA(<int> i)
           return unreconciled balance A for specified balance
 Float getDiffB(<int> i)
           return unreconciled balance B for specified balance
 Float getDiffC(<int> i)
           return unreconciled balance C for specified balance
 Float getDiffD(<int> i)
           return unreconciled balance D for specified balance
 Float getDiffTotal(<int> i)
           return total of unreconciled amount for specified balance
 Float getNetA()
           return unreconciled balance A for the whole Account
 Float getNetB()
           return unreconciled balance B for the whole Account
 Float getNetC()
           return unreconciled balance C for the whole Account
 Float getNetD()
           return unreconciled balance D for the whole Account
 Float getNetTotal()
           return total unreconciled balances for the whole Account
 Transaction getTransaction( <int> sIndex, <int> rIndex )
           return the specified transaction
 int getTransactionCount(<int> i)
           return how many transactions are associated with the specified balance
 boolean hasAllZeroDiff(<int> i)
           return true iff all unreconciled amounts for specified balance are zero
 boolean isAccountReconciled()
           is the whole Account (i.e.
 boolean isBalanceDirty(<int> i)
           return whether the specified balance is being reconciled
 boolean isBalanceExpanded(<int> i)
           return whether the specified balance is expanded
 boolean isBalanceOpen(<int> i)
           return whether the specified balance is collapsed or open
 boolean isBalanceReconciled(<int> i)
           return whether the specified balance is reconciled and update the balance todo flag as a side effect.
 boolean isDirty()
           return whether any transactions are changed for the whole Account
 boolean isTrue()
           MVCBoolModel API: return "I am modified" flag
 Float isValid()
           return whether all transactions are valid for the whole Account
 void konstructor( <AccountSelectionModel> accountSelectionModel )
          
 Transaction newTransaction()
           return a new blank transaction
 Transaction openTransaction( <int> sIndex, <int> rIndex )
           return the specified transaction with the intent to change its attributes
 void save()
           save all of the edits into the database via service layer
 void toggleOpen( <boolean> doAllFlag, <int> si )
           toggle the "open" flag of the specified balance.
 void undeleteTransaction( <int> sIndex, <int> rIndex )
           undelete the specified transaction
 void uneditTransaction( <int> sIndex, <int> rIndex )
           rollback edit on the specified transaction
 void update()
           handle update events from the Account Selection Model
 
Methods inherited from class MVCListModel
clone, dump, hash, _pop, _push, _del, _reset, reset, getCount, getItem, getItemStr, addItem, delItem, iterate, addBefore, getMemento, setMemento
   
Methods inherited from class MVCModel
dumpSubscribers, toString, dirty, clean, publish, GET, _SET, SET, updateStamp, BeginTransaction, EndTransaction, addObserver, delObserver, notifyObservers
   
Methods inherited from class MVCObserver
subscribe
   
Methods inherited from class GrvObject
souper
 

Constructor Detail

BalanceListModel

BalanceListModel()

Method Detail

appendTransaction

int appendTransaction( <int> sIndex )

canBalanceToggle

boolean canBalanceToggle(<int> i)

canToggle

boolean canToggle( <boolean> doAllFlag, <int> si )

createTransaction

int createTransaction( <int> sIndex, <int> rIndex )

deleteTransaction

void deleteTransaction( <int> sIndex, <int> rIndex )

editTransaction

void editTransaction( <int> sIndex, <int> rIndex )

getAccountKey

Object getAccountKey()

getDiffA

Float getDiffA(<int> i)

getDiffB

Float getDiffB(<int> i)

getDiffC

Float getDiffC(<int> i)

getDiffD

Float getDiffD(<int> i)

getDiffTotal

Float getDiffTotal(<int> i)

getNetA

Float getNetA()

getNetB

Float getNetB()

getNetC

Float getNetC()

getNetD

Float getNetD()

getNetTotal

Float getNetTotal()

getTransaction

Transaction getTransaction( <int> sIndex, <int> rIndex )

getTransactionCount

int getTransactionCount(<int> i)

hasAllZeroDiff

boolean hasAllZeroDiff(<int> i)

isAccountReconciled

boolean isAccountReconciled()

isBalanceDirty

boolean isBalanceDirty(<int> i)

isBalanceExpanded

boolean isBalanceExpanded(<int> i)

isBalanceOpen

boolean isBalanceOpen(<int> i)

isBalanceReconciled

boolean isBalanceReconciled(<int> i)

isDirty

boolean isDirty()

isTrue

boolean isTrue()

isValid

Float isValid()

konstructor

void konstructor( <AccountSelectionModel> accountSelectionModel )

newTransaction

Transaction newTransaction()

openTransaction

Transaction openTransaction( <int> sIndex, <int> rIndex )

save

void save()

toggleOpen

void toggleOpen( <boolean> doAllFlag, <int> si )

undeleteTransaction

void undeleteTransaction( <int> sIndex, <int> rIndex )

uneditTransaction

void uneditTransaction( <int> sIndex, <int> rIndex )

update

void update()

The Gravey Framework and RATS RIA

Documentation generated by JSDoc on Sat Dec 8 21:52:02 2007