Package bazaar :: Module assoc :: Class BiDirOneToOne
[show private | hide private]
[frames | no frames]

Type BiDirOneToOne

               object --+        
                        |        
AssociationReferenceProxy --+    
                            |    
                     OneToOne --+
                                |
                               BiDirOneToOne


Bi-directional one-to-one association descriptor.

See Also: AssociationReferenceProxy OneToOne

Method Summary
  __set__(self, obj, value)
Descriptor method to set application object's attribute and foreign key values.
  integrateRemove(self, obj, value)
Keep bi-directional association data integrity when removal of reference is performed.
  integrateSave(self, obj, value)
Keep bi-directional association data integrity when setting reference is performed.
    Inherited from OneToOne
  __get__(self, obj, cls)
Descriptor interface method to retrieve reference of referenced object for application object.
  saveForeignKey(self, obj, vkey)
Save referenced object's primary key value.
    Inherited from AssociationReferenceProxy
  __init__(self, col, ref_buf)
Create association reference proxy.
  save(self, obj, value)
Assign referenced object.
    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)

Instance Variable Summary
    Inherited from AssociationReferenceProxy
  association: Referenced class' association object of bi-directional association.
  broker: Broker of application class.
  col: Application object's class attribute.
  vbroker: Broker of referenced application objects' class.

Method Details

__set__(self, obj, value)

Descriptor method to set application object's attribute and foreign key values.

The method keeps data integrity of bi-directional one-to-one association.
Parameters:
obj - Application object.
value - Referenced object.
Overrides:
bazaar.assoc.OneToOne.__set__

integrateRemove(self, obj, value)

Keep bi-directional association data integrity when removal of reference is performed.

Application and referenced objects cannot be None.

Method is called by second association object from bi-directional relationship.
Parameters:
obj - Application object.
value - Referenced object.

integrateSave(self, obj, value)

Keep bi-directional association data integrity when setting reference is performed.

Application and referenced objects cannot be None.

Method is called by second association object from bi-directional relationship.
Parameters:
obj - Application object.
value - Referenced object.

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