Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class Transaction

    Object
       |
       +--GrvObject
             |
             +--Transaction

class Transaction
extends GrvObject

DOMAIN-OBJECT: This class encapsulates a Account "transaction".
Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Defined in rats.js

Constructor Summary
`Transaction ()`

Method Summary
`String` | `action()` return our edit state translated to a broadcast message code
`void` | `addMe()` mark this transaction as being newly added
`String` | `asUpdateString( <Balance> parentBalance )` return a string of updates for this transaction formatted as
     "{key}~{action}~{sdate}~{ttype}~{ccode}~{balA}~{balB}~{balC}~{balD}"
     where the fields are defined as follows...
`Transaction` | `clone()` return a clone of this object
`void` | `deleteMe()` mark this transaction as deleted
`String` | `dump()` return the debug details of "this"
`void` | `editMe()` mark this record as having been edited
`String` | `getEditRule( <String> optBalanceID )` return the edit/validation rule for the specified balance.
`Float` | `getTotal()` return sum of balances for this transaction
`String` | `getValidity(<String> ID)` return the validity "code" of the specified attribute
`boolean` | `inactive()` return whether this transaction needs to update server
`boolean` | `inEdit()` return whether this transaction has been changed since last save
`boolean` | `isComplex()` return whether this transaction is a complex type
`boolean` | `isValid()` return whether this transaction has validated data
`String` | `isViewable()` return whether this transaction can be viewed if desired
`void` | `konstructor( <String> complexCode, <String> transType, <Float> amountA, <Float> amountB, <Float> amountC, <Float> amountD, <String> editDate, <String> editUser, <int> theKey, <int> optEditStatus )`
`void` | `setValidity(<String> ID,<String> v)` set the validity code of the specified attribute
`String` | `state()` return the formatted version of our edit state
`void` | `undeleteMe()` restore this transaction to its pre-deleted state
`void` | `uneditMe()` restore this record to its pre-edited state

Methods inherited from class GrvObject
`souper`

Constructor Detail

### Transaction

    Transaction()

Version: 2.0
Author: Bruce Wallace (PolyGlotInc.com)
See:

- konstructor()

Method Detail

### action

    String action()

return our edit state translated to a broadcast message code

### addMe

    void addMe()

mark this transaction as being newly added

### asUpdateString

    String asUpdateString( <Balance> parentBalance )

return a string of updates for this transaction formatted as

     "{key}~{action}~{sdate}~{ttype}~{ccode}~{balA}~{balB}~{balC}~{balD}"
     where the fields are defined as follows...
         {key}    = the transaction's unique key number
         {action} = the transaction's action code
     (encode as strings 'C','D', and 'U' for values create, delete, and update.)
         {sdate}  = the transaction's parent balance date
         {ttype}  = the transaction's new transaction Type
         {ccode}  = the transaction's new complex code
         {balA}   = the transaction's new balance A
         {balB}   = the transaction's new balance B
         {balC}   = the transaction's new balance C
         {balD}   = the transaction's new balance D

Parameters:

`parentBalance` - balance "this" is attached to

### clone

    Transaction clone()

return a clone of this object

### deleteMe

    void deleteMe()

mark this transaction as deleted

### dump

    String dump()

return the debug details of "this"

### editMe

    void editMe()

mark this record as having been edited

### getEditRule

    String getEditRule( <String> optBalanceID )

return the edit/validation rule for the specified balance. If no balance is specified then return entire set of rules for the transaction type that "this" is currently set to.

Parameters:

`optBalanceID` - optional object element name specifying desired balance

### getTotal

    Float getTotal()

return sum of balances for this transaction

### getValidity

    String getValidity(<String> ID)

return the validity "code" of the specified attribute

Parameters:

`ID` - transaction attribute name

### inactive

    boolean inactive()

return whether this transaction needs to update server

Returns:

true if NO UPDATE is needed

### inEdit

    boolean inEdit()

return whether this transaction has been changed since last save

### isComplex

    boolean isComplex()

return whether this transaction is a complex type

### isValid

    boolean isValid()

return whether this transaction has validated data

### isViewable

    String isViewable()

return whether this transaction can be viewed if desired

### konstructor

    void konstructor( <String> complexCode, <String> transType, <Float> amountA, <Float> amountB, <Float> amountC, <Float> amountD, <String> editDate, <String> editUser, <int> theKey, <int> optEditStatus )

Parameters:

`complexCode` - complex code

`transType` - "transaction type" code

`amountA` - balance A

`amountB` - balance B

`amountC` - balance C

`amountD` - balance D

`editDate` - date of last edit

`editUser` - ID of last user to edit

`theKey` - Oracle primary key of this record

`optEditStatus` - optional edit status where the status codes are: 0=no-change; 1=delete; 2=create; 3=hidden; 4=update

### setValidity

    void setValidity(<String> ID,<String> v)

set the validity code of the specified attribute

Parameters:

`ID` - transaction attribute name

`v` - validity "code" (actually an error message or null)

### state

    String state()

return the formatted version of our edit state

### undeleteMe

    void undeleteMe()

restore this transaction to its pre-deleted state

### uneditMe

    void uneditMe()

restore this record to its pre-edited state

Overview | File | Class | Tree | Index | Help
| The Gravey Framework and RATS RIA
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Documentation generated by JSDoc on Sun Feb 11 13:31:25 2007