Package bazaar :: Module cache :: Class LazyObject
[show private | hide private]
[frames | no frames]

Type LazyObject

     object --+        
              |        
          Cache --+    
                  |    
               Lazy --+
                      |
       UserDict --+   |
                  |   |
WeakValueDictionary --+
                      |
                     LazyObject


Cache for lazy referenced object loading.
Method Summary
  __init__(self, owner)
Create object lazy cache.
  itervalues(self)
Return all application class objects from database.
  load(self, key)
Load referenced object with primary key value key.
    Inherited from Lazy
  __getitem__(self, param)
Return referenced object or association data.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)
    Inherited from WeakValueDictionary
  __contains__(self, key)
  __iter__(self)
  __setitem__(self, key, value)
  copy(self)
  get(self, key, default)
  has_key(self, key)
  items(self)
  iteritems(self)
  iterkeys(self)
  pop(self, key, *args)
  popitem(self)
  setdefault(self, key, default)
  update(self, dict, **kwargs)
  values(self)
    Inherited from UserDict
  __cmp__(self, dict)
  __delitem__(self, key)
  __len__(self)
  clear(self)
  fromkeys(cls, iterable, value)
(Class method)
  keys(self)

Instance Variable Summary
    Inherited from Lazy
  dicttype: Weak dictionary superclass, i.e.
    Inherited from Cache
  owner: Owner of the cache - object broker or association object.

Instance Method Details

__init__(self, owner)
(Constructor)

Create object lazy cache.
Parameters:
owner - Owner of the cache - object broker or association object.
Overrides:
bazaar.cache.Cache.__init__

itervalues(self)

Return all application class objects from database.

Method load objects from database, then checks if specific object exists in cache. If exists then object from cache is returned instead of object from database.
Overrides:
weakref.WeakValueDictionary.itervalues

load(self, key)

Load referenced object with primary key value key.
Overrides:
bazaar.cache.Cache.load

Generated by Epydoc 2.1 on Tue May 10 18:27:30 2005 http://epydoc.sf.net