Patent ID: 7058939

Claim:
A method for programmatically enforcing referential integrity constraints among associations between class instances, comprising steps of: programmatically determining, when evaluating a request to modify an existing association end of a bi-directional link to reflect in association from an instance of a first class to an instance of a second class, whether the association end to be modified has a single multiplicity or a many multiplicity; if the association end to be modified has the single multiplicity, modifying the existing association end by atomically and programmatically performing the steps of: first disconnecting a previously-existing inverse association end of the requested association end; next setting an inverse association end of the association to reflect an inverse association from the instance of the second class to the instance of the first class; and then setting the requested association end from the instance of the first class to the instance of the second class; and if the association end to be modified has the may multiplicity, modifying the existing association end by atomically ad programmatically performing the steps of: first adding the requested association end from the instance of the first class to the instance of the second class; next disconnecting the previously-existing inverse association end of the requested association end; and then setting an inverse association end of the association to reflect an inverse association from the instance of the second class to the instance of the first class.