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

## Class AuctionModel

    Object
       |
       +--AuctionModel

class AuctionModel

This class encapsulates the data model of a particular Auction. This model subscribes to a AuctionSelectionModel so that new Lot lists can be downloaded whenever a new Auction is selected.

NOTE: Other parts of AIM assume that the lot lists will never be null; zero items is ok though.

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

- konstructor()

Defined in aimauctions.js

Constructor Summary
`AuctionModel ()`

Method Summary
`EDOIndex` | `_appendLot( <int> i, <EDO> edo )` append a new lot
`Auction` | `_getAuction( <int> i )` return the specified auction
`Lot` | `_getLot( <int> i )` return the specified lot
`void` | `_insertLot( xi )` insert a new lot
`EDOIndex` | `_newAuction( <int> i, auctionEDO )` create a new auction
`EDO` | `_newEDO(<EDOIndex> xi)` return a new blank EDO of the type implied by EDOIndex
`ListModel` | `_newLots()` get a new Lot list
`void` | `_resetEDOs( optAuction )` clear EDOs
`void` | `_setAuction(o)` set our Auction object but dont publish
`EDOIndex` | `appendEDO(<EDOIndex> xi)` create new EDO which is appended at end of EDO list
`EDOIndex` | `createEDO(<EDOIndex> xi)` create new EDO which is inserted after selected EDO
`EDOHolderSelectionItem` | `createSelectionItem()` create a new item for the selection list from current EDO
`String` | `dump()` return the debug details of "this"
`Object` | `getEDO(<ALIndex> xi)` return reference to the specified editable domain object
`String` | `getID()` return the parent Auction ID for this model
`Object` | `getUpdatedProperty()` return the updated properties from the current EDO needed for select list update
`boolean` | `hasEDO()` return whether there is currently an EDO
`boolean` | `isDirty()` return whether any EDOs are changed for this model
`boolean` | `isValid()` return whether all EDOs are valid for this model
`boolean` | `keysMatch(<EDOHolderSelectionItem> item)` return whether current EDO matches selection item "key"
`void` | `konstructor( <AuctionSelectionModel> auctionSelectionModel, <String> optName )`
`int` | `lotCount( lotnum )` return how many lots have the given lot number
`boolean` | `propMatch(<EDOHolderSelectionItem> item)` return whether current EDO matches selection item "properties"
`void` | `pushPosts( <Array> posts )` push into given array all AJAX SAVE Post params for this model
`void` | `toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )` toggle the "expanded" flag of the specified EDOs.

Constructor Detail

### AuctionModel

    AuctionModel()

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

- konstructor()

Method Detail

### _appendLot

    EDOIndex _appendLot( <int> i, <EDO> edo )

append a new lot

Parameters:

`i` - lot list index

`edo` - the lot

Returns:

EDOIndex of new EDO

### _getAuction

    Auction _getAuction( <int> i )

return the specified auction

Parameters:

`i` - index into auction list

### _getLot

    Lot _getLot( <int> i )

return the specified lot

Parameters:

`i` - index into lot list

### _insertLot

    void _insertLot( xi )

insert a new lot

Parameters:

`i` - lot list index

`edo` - the shipping

### _newAuction

    EDOIndex _newAuction( <int> i, auctionEDO )

create a new auction

Parameters:

`i` - auction list index

`edo` - the auction

Returns:

EDOIndex of new EDO

### _newEDO

    EDO _newEDO(<EDOIndex> xi)

return a new blank EDO of the type implied by EDOIndex

Parameters:

`xi` - edo index

### _newLots

    ListModel _newLots()

get a new Lot list

### _resetEDOs

    void _resetEDOs( optAuction )

clear EDOs

### _setAuction

    void _setAuction(o)

set our Auction object but dont publish

### appendEDO

    EDOIndex appendEDO(<EDOIndex> xi)

create new EDO which is appended at end of EDO list

Parameters:

`xi` - edo index

Returns:

EDOIndex of new EDO

### createEDO

    EDOIndex createEDO(<EDOIndex> xi)

create new EDO which is inserted after selected EDO

Parameters:

`xi` - edo index

Returns:

EDOIndex of new EDO

### createSelectionItem

    EDOHolderSelectionItem createSelectionItem()

create a new item for the selection list from current EDO

### dump

    String dump()

return the debug details of "this"

### getEDO

    Object getEDO(<ALIndex> xi)

return reference to the specified editable domain object

Parameters:

`xi` - edo index

### getID

    String getID()

return the parent Auction ID for this model

### getUpdatedProperty

    Object getUpdatedProperty()

return the updated properties from the current EDO needed for select list update

Returns:

arbitrary value as needed

### hasEDO

    boolean hasEDO()

return whether there is currently an EDO

### isDirty

    boolean isDirty()

return whether any EDOs are changed for this model

### isValid

    boolean isValid()

return whether all EDOs are valid for this model

### keysMatch

    boolean keysMatch(<EDOHolderSelectionItem> item)

return whether current EDO matches selection item "key"

Parameters:

`item` - selection menu item

### konstructor

    void konstructor( <AuctionSelectionModel> auctionSelectionModel, <String> optName )

Parameters:

`auctionSelectionModel` - model of which Auction is selected

`optName` - optional name of this instance

### lotCount

    int lotCount( lotnum )

return how many lots have the given lot number

### propMatch

    boolean propMatch(<EDOHolderSelectionItem> item)

return whether current EDO matches selection item "properties"

Parameters:

`item` - selection menu item

### pushPosts

    void pushPosts( <Array> posts )

push into given array all AJAX SAVE Post params for this model

Parameters:

`posts` - string array containing POST params

### toggleExpand

    void toggleExpand( <boolean> doAllFlag, <EDOIndex> xi )

toggle the "expanded" flag of the specified EDOs.

Parameters:

`doAllFlag` - if true, set all of the EDOs to new value

`xi` - edo index

Overview | File | Class | Tree | Index | Help
| The Gravey 2.0 Framework and AIM 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:42 2007