A method and apparatus for dynamically loading criteria from an object to
reduce the amount of total criteria necessary to update a referenced value
is disclosed. The value can be "inside" a database or an object in an
object-oriented framework. When updating a value that is referenced by a
data access object (such as an access key) that depends on other objects
(such as access keyables) for criteria necessary to reference the value, a
special data access object (called an adapter access key) is used instead
of using the data access object. Instead of creating and populating all of
the access keyables prior to an update of the value, the adapter access
key holds onto the source of the criteria (such as a business object)
needed to fill the access keyables and to access the value. The adapter
access key dynamically determines criteria from the business object only
for those keyables that are important in updating the value. This reduces
the comparison time that used to occur when the criteria in the access key
was compared to criteria that determined if the value was "within" a
database or an object in an object-oriented framework, or if the data
access object pointed to the value. Preferably, there is a facsimile (such
as with a boolean array) of keyables that is marked in such a way that the
adapter access key can be easily reset and used for multiple updates. This
eliminates copying of the original key and minimizes comparison time.