Changeset 8889

Show
Ignore:
Timestamp:
04/29/08 16:43:36 (5 months ago)
Author:
hannes
Message:

* Add some documentation in the comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/minibase/trunk/demo/model.js

    r8886 r8889  
    1515    } 
    1616 
     17    // the Storable wrapper handles property access and adds 
     18    // the following instance methods: 
     19    // * save() - save the instance in the associated store 
     20    // * remove() - remove the instance in the associated store 
    1721    return new db.Storable(this, properties || {}); 
    1822} 
    1923 
    20 // init store instance and register persistent classes 
     24// init store instance and register persistent classes. 
    2125db.store = db.store || new db.Store("db"); 
     26// The call to registerType installs the following static 
     27// methods in the constructor: 
     28// * get(id) - get a persistent object of this type by id 
     29// * all() - get an array containing all objects of this type 
     30// * filter() - not yet implemented 
    2231db.store.registerType(Book);