Home | Trees | Index | Help |
|
---|
Package bazaar :: Module core :: Class Broker |
|
Application class broker.
Application class broker is responsible for taking decision on getting objects from database or cache, loading application objects from database with convertor and manipulating application objects with cache.See Also: bazaar.motor.Motor
bazaar.motor.Convertor
bazaar.cache
Method Summary | |
---|---|
Create application class broker. | |
Add object into database. | |
Delete object from database. | |
Find objects in database. | |
Get application object. | |
Get list of application objects. | |
Load application objects from database and put them into cache. | |
Request reloading objects from database. | |
Update object in database. |
Instance Variable Summary | |
---|---|
cache : Cache of application objects. | |
cls : Application class. | |
convertor : Relational and object data convertor. | |
reload : If true, then application object's reload has been requested. |
Method Details |
---|
__init__(self,
cls,
mtr,
seqpattern=None)
|
add(self, obj)Add object into database.
|
delete(self, obj)Delete object from database. Object's primary key value is set toNone .
|
find(self, query, param=None, field=0)Find objects in database.
|
get(self, key)Get application object. Object is returned from cache.
|
getObjects(self)Get list of application objects. If objects reload has been requested, then objects would be loaded from database before returning objects from the cache. |
loadObjects(self)Load application objects from database and put them into cache. |
reloadObjects(self, now=False)Request reloading objects from database. All objects are removed from cache. Ifnow is set to
true, then objects are loaded from database immediately.
|
update(self, obj)Update object in database.
|
Instance Variable Details |
---|
cacheCache of application objects. |
clsApplication class. |
convertorRelational and object data convertor. |
reloadIf true, then application object's reload has been requested. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Tue Mar 23 14:53:30 2004 | http://epydoc.sf.net |