WebObjects 5.2

com.webobjects.eocontrol
Class EOObjectStoreCoordinator

java.lang.Object
  |
  +--com.webobjects.eocontrol.EOObjectStore
        |
        +--com.webobjects.eocontrol.EOObjectStoreCoordinator
All Implemented Interfaces:
NSDisposable, NSLocking

public class EOObjectStoreCoordinator
extends EOObjectStore

EOObjectStoreCoordinator provides the abstraction of a single object store by coordinating one or more EOCooperatingObjectStores. For the basic object store methods, such as objectsWithFetchSpecification(EOFetchSpecification, EOEditingContext), the coordinator forwards the message to the appropriate coorperating object store based on entity name. For saveChangesInEditingContext(EOEditingContext), the coordinator guides its cooperating object stores through a multi-pass save protocol in which each cooperating object store saves its own changes and forwards other changes on to other object stores. For example, if in its recordChangesInEditingContext method, one store notices the removal of an object from an "owning" relationship, but that object comes from another store, it should inform the other store by passing the coordinator a forwardUpdateForObject(EOEnterpriseObject, NSDictionary) message.

For more information on EOObjectStoreCoordinator, refer to:



Field Summary
static String CooperatingObjectStoreNeededNotification
           
static String CooperatingObjectStoreWasAddedNotification
           
static String CooperatingObjectStoreWasRemovedNotification
           
static String FetchSpecificationKey
           
static String GlobalIDKey
           
static String ObjectKey
           
 
Fields inherited from class com.webobjects.eocontrol.EOObjectStore
DeletedKey, InsertedKey, InvalidatedAllObjectsInStoreNotification, InvalidatedKey, ObjectsChangedInStoreNotification, UpdatedKey
 
Fields inherited from interface com.webobjects.foundation.NSLocking
OneCentury, OneDay, OneHour, OneMinute, OneSecond, OneWeek, OneYear
 
Constructor Summary
EOObjectStoreCoordinator()
          Creates and returns an EOObjectStoreCoordinator.
 
Method Summary
 void addCooperatingObjectStore(EOCooperatingObjectStore objectStore)
          Adds objectStore to the list of EOCooperatingObjectStores that need to be queried and notified about changes to enterprise objects.
 NSArray arrayFaultWithSourceGlobalID(EOGlobalID gid, String relationshipName, EOEditingContext editingContext)
          Implementation for arrayFaultWithSourceGlobalID inherited from EOObjectStore.
 NSArray cooperatingObjectStores()
          Returns the receiver's EOCooperatingObjectStores.
static EOObjectStoreCoordinator defaultCoordinator()
          Returns a shared instance of EOObjectStoreCoordinator.
 void dispose()
          Invoked when the receiver should prepare itself for destruction.
 void editingContextDidForgetObjectWithGlobalID(EOEditingContext editingContext, EOGlobalID gid)
          Invoked to inform the object store that it can stop keeping data about an object it passed to a child.
 EOEnterpriseObject faultForGlobalID(EOGlobalID gid, EOEditingContext editingContext)
          Implementation for faultForGlobalID inherited from EOObjectStore.
 EOEnterpriseObject faultForRawRow(NSDictionary row, String entityName, EOEditingContext editingContext)
          Implementation for faultForRawRow inherited from EOObjectStore.
 void forwardUpdateForObject(EOEnterpriseObject object, NSDictionary changes)
          Tells the receiver to forward a message from an EOCooperatingObjectStore to another store, informing it that changes need to be made to object.
 void initializeObject(EOEnterpriseObject object, EOGlobalID gid, EOEditingContext editingContext)
          Implementation for initializeObject inherited from EOObjectStore to set object's properties, as obtained for gid.
 void invalidateAllObjects()
          Tells the receiver's coopertating object stores to discard the values of all objects they hold and turn them into faults (empty enterprise objects).
 void invalidateObjectsWithGlobalIDs(NSArray gids)
          Signals that the objects identified by the EOGlobalIDs in gids should no longer be considered valid and that they should be turned into faults (empty enterprise objects).
 boolean isObjectLockedWithGlobalID(EOGlobalID gid, EOEditingContext editingContext)
          Returns true if the object identified by gid in editingContext is locked, false otherwise.
 void lock()
          This method is used to protect access to the receiver from concurrent operations by multiple threads.
 void lockObjectWithGlobalID(EOGlobalID gid, EOEditingContext editingContext)
          Overrides the implementation inherited from EOObjectStore to attempt to lock the object identified by gid in editingContext in the external store.
 NSArray objectsForSourceGlobalID(EOGlobalID gid, String relationshipName, EOEditingContext editingContext)
          Returns the destination objects for a to-many relationship.
 EOCooperatingObjectStore objectStoreForFetchSpecification(EOFetchSpecification fetchSpecification)
          Returns the EOCooperatingObjectStore responsible for fetching objects with fetchSpecification.
 EOCooperatingObjectStore objectStoreForGlobalID(EOGlobalID gid)
          Returns the EOCooperatingObjectStore for the object identified by gid.
 EOCooperatingObjectStore objectStoreForObject(EOEnterpriseObject object)
          Returns the EOCooperatingObjectStore that owns object.
 NSArray objectsWithFetchSpecification(EOFetchSpecification fetchSpecification, EOEditingContext editingContext)
          Overrides the EOObjectStore implementation to fetch objects from the receiver's cooperating object stores.
 void refaultObject(EOEnterpriseObject object, EOGlobalID gid, EOEditingContext editingContext)
          Turns object into a fault (an empty enterprise object), identified by globalID in editingContext.
 void removeCooperatingObjectStore(EOCooperatingObjectStore objectStore)
          Removes objectStore from the list of EOCooperatingObjectStores that need to be queried and notified about changes to enterprise objects.
 void saveChangesInEditingContext(EOEditingContext context)
          Overrides the EOObjectStore implementation to save the changes made in context.
static void setDefaultCoordinator(EOObjectStoreCoordinator coordinator)
          Sets a shared instance EOObjectStoreCoordinator.
 void setUserInfo(NSDictionary userInfo)
          Sets the dictionary of auxiliary data, which your application can use for whatever it needs.
 void unlock()
          This method is used to protect access to the receiver from concurrent operations by multiple threads.
 NSDictionary userInfo()
          Returns a dictionary of user data.
 NSDictionary valuesForKeys(NSArray keys, EOEnterpriseObject object)
          Communicates with the appropriate EOCooperatingObjectStore to get the values identified by keys for object, so that it can then forward them on to another EOCooperatingObjectStore.
 
Methods inherited from class com.webobjects.eocontrol.EOObjectStore
invokeRemoteMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CooperatingObjectStoreNeededNotification

public static final String CooperatingObjectStoreNeededNotification

CooperatingObjectStoreWasAddedNotification

public static final String CooperatingObjectStoreWasAddedNotification

CooperatingObjectStoreWasRemovedNotification

public static final String CooperatingObjectStoreWasRemovedNotification

FetchSpecificationKey

public static final String FetchSpecificationKey

GlobalIDKey

public static final String GlobalIDKey

ObjectKey

public static final String ObjectKey
Constructor Detail

EOObjectStoreCoordinator

public EOObjectStoreCoordinator()
Creates and returns an EOObjectStoreCoordinator.
Method Detail

addCooperatingObjectStore

public void addCooperatingObjectStore(EOCooperatingObjectStore objectStore)
Adds objectStore to the list of EOCooperatingObjectStores that need to be queried and notified about changes to enterprise objects. The receiver reuses its stores: they don't go away until the EOObjectStoreCoordinator is destroyed or until the stores are explicitly removed. Posts the notification CooperatingObjectStoreWasAdded.
Parameters:
objectStore - an EOCooperatingObjectStore that will be queried and notified about changes to enterprise objects
See Also:
removeCooperatingObjectStore(com.webobjects.eocontrol.EOCooperatingObjectStore), cooperatingObjectStores()

arrayFaultWithSourceGlobalID

public NSArray arrayFaultWithSourceGlobalID(EOGlobalID gid,
                                            String relationshipName,
                                            EOEditingContext editingContext)
Implementation for arrayFaultWithSourceGlobalID inherited from EOObjectStore. EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore returned by objectStoreForGlobalID for gid.
Overrides:
arrayFaultWithSourceGlobalID in class EOObjectStore
Parameters:
gid - EOGlobalID of a source object with a to-many relationship
relationshipName - name of the to-many relationship from which to generate the array of destination objects
editingContext - the EOEditingContext that will contain the source and destination objects
Returns:
the destination objects for the to-many relationship named relationshipName from the source object identified by gid
See Also:
EOObjectStore.arrayFaultWithSourceGlobalID(com.webobjects.eocontrol.EOGlobalID, java.lang.String, com.webobjects.eocontrol.EOEditingContext)

cooperatingObjectStores

public NSArray cooperatingObjectStores()
Returns the receiver's EOCooperatingObjectStores.
Returns:
an array of EOObjectStores managed by this coordinator
See Also:
addCooperatingObjectStore(com.webobjects.eocontrol.EOCooperatingObjectStore), removeCooperatingObjectStore(com.webobjects.eocontrol.EOCooperatingObjectStore)

defaultCoordinator

public static EOObjectStoreCoordinator defaultCoordinator()
Returns a shared instance of EOObjectStoreCoordinator.
Returns:
a shared instance of EOObjectStoreCoordinator

dispose

public void dispose()
Description copied from interface: NSDisposable
Invoked when the receiver should prepare itself for destruction. Implementations of this method should break connections that other objects have to the receiver, including unregistering for notifications, resigning as other objects' delegates, release locks and system resources, close files, and any other clean up operations.
Overrides:
dispose in class EOObjectStore

editingContextDidForgetObjectWithGlobalID

public void editingContextDidForgetObjectWithGlobalID(EOEditingContext editingContext,
                                                      EOGlobalID gid)
Invoked to inform the object store that it can stop keeping data about an object it passed to a child. Don't invoke this method; it is invoked automatically by the Framework.EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore returned by objectStoreForGlobalID for gid.
Overrides:
editingContextDidForgetObjectWithGlobalID in class EOObjectStore
Parameters:
editingContext - the EOEditingContext that has stopped storing data about the object identified by gid
gid - the EOGlobalID of the object that was forgotten by editingContext
See Also:
EOObjectStore.editingContextDidForgetObjectWithGlobalID(com.webobjects.eocontrol.EOEditingContext, com.webobjects.eocontrol.EOGlobalID)

faultForGlobalID

public EOEnterpriseObject faultForGlobalID(EOGlobalID gid,
                                           EOEditingContext editingContext)
Implementation for faultForGlobalID inherited from EOObjectStore. EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore of the object identified by gid.
Overrides:
faultForGlobalID in class EOObjectStore
Parameters:
gid - EOGlobalID of the object to fault
editingContext - the EOEditingContext that either contains the object identified by gid, or will contain the object's fault
Returns:
the EOEnterpriseObject identified by gid
See Also:
EOObjectStore.faultForGlobalID(com.webobjects.eocontrol.EOGlobalID, com.webobjects.eocontrol.EOEditingContext)

faultForRawRow

public EOEnterpriseObject faultForRawRow(NSDictionary row,
                                         String entityName,
                                         EOEditingContext editingContext)
Implementation for faultForRawRow inherited from EOObjectStore. EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore returned by objectStoreForEntityNamed for entityName.
Overrides:
faultForRawRow in class EOObjectStore
Parameters:
row - dictionary containing at least the the primary key of the corresponding row
entityName - the name of the entity to create an EO from
editingContext - the EOEditingContext that either contains the object from row, or will contain the object's fault
Returns:
the EOEnterpriseObject described by row
See Also:
EOObjectStore.faultForRawRow(com.webobjects.foundation.NSDictionary, java.lang.String, com.webobjects.eocontrol.EOEditingContext)

forwardUpdateForObject

public void forwardUpdateForObject(EOEnterpriseObject object,
                                   NSDictionary changes)
Tells the receiver to forward a message from an EOCooperatingObjectStore to another store, informing it that changes need to be made to object. For example, inserting an object in a relationship property of one EOCooperatingObjectStore might require changing a foreign key property in an object owned by another EOCooperatingObjectStore. This method first locates the EOCooperatingObjectStore that's responsible for applying changes, and then it sends the store the message recordUpdateForObject.
Parameters:
object - EOEnterpriseObject that needs updating
changes - a dictionary of changes for the appropriate EOCooperatingObjectStore to make in object

initializeObject

public void initializeObject(EOEnterpriseObject object,
                             EOGlobalID gid,
                             EOEditingContext editingContext)
Implementation for initializeObject inherited from EOObjectStore to set object's properties, as obtained for gid. EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore returned by objectStoreForGlobalID for gid.
Overrides:
initializeObject in class EOObjectStore
Parameters:
object - the EOEnterpriseObject to set the properties of
gid - the EOGlobalID that identifies the set of properties to set in object
editingContext - the EOEditingContext that contains the object
See Also:
EOObjectStore.initializeObject(com.webobjects.eocontrol.EOEnterpriseObject, com.webobjects.eocontrol.EOGlobalID, com.webobjects.eocontrol.EOEditingContext)

invalidateAllObjects

public void invalidateAllObjects()
Tells the receiver's coopertating object stores to discard the values of all objects they hold and turn them into faults (empty enterprise objects). This method also posts an InvalidatedAllObjectsInStoreNotification.
Overrides:
invalidateAllObjects in class EOObjectStore
See Also:
EOObjectStore.invalidateAllObjects()

invalidateObjectsWithGlobalIDs

public void invalidateObjectsWithGlobalIDs(NSArray gids)
Signals that the objects identified by the EOGlobalIDs in gids should no longer be considered valid and that they should be turned into faults (empty enterprise objects). EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore for each object identified by the EOGlobalIDs in gids.
Overrides:
invalidateObjectsWithGlobalIDs in class EOObjectStore
Parameters:
gids - array of EOGlobalIDs that identify objects to invalidate
See Also:
EOObjectStore.invalidateObjectsWithGlobalIDs(com.webobjects.foundation.NSArray)

isObjectLockedWithGlobalID

public boolean isObjectLockedWithGlobalID(EOGlobalID gid,
                                          EOEditingContext editingContext)
Returns true if the object identified by gid in editingContext is locked, false otherwise. This method works by forwarding the message isObjectLockedWithGlobalID to its parent object store.
Overrides:
isObjectLockedWithGlobalID in class EOObjectStore
Parameters:
gid - the EOGlobalID of the object to test
editingContext - EOEditingContext to locate the object with gid in
Returns:
true if the object identified by gid in editingContext is locked, false otherwise
See Also:
EOEditingContext.lockObject(com.webobjects.eocontrol.EOEnterpriseObject), lockObjectWithGlobalID(com.webobjects.eocontrol.EOGlobalID, com.webobjects.eocontrol.EOEditingContext), EOEditingContext.locksObjectsBeforeFirstModification()

lock

public void lock()
This method is used to protect access to the receiver from concurrent operations by multiple threads. EOEditingContexts will indirectly lock their EOObjectStoreCoordinators when necessary. Locking an EOObjectStoreCoordinator will cause the coordinator to lock each registered EOCooperatingObjectStore managed by that coordinator. Applications which make direct use of an EOObjectStoreCoordinator should lock and unlock it as appropriate. Do not confuse this with any methods which work with the database locking mechanism.
Overrides:
lock in class EOObjectStore
See Also:
unlock(), EOObjectStore.lock()

lockObjectWithGlobalID

public void lockObjectWithGlobalID(EOGlobalID gid,
                                   EOEditingContext editingContext)
Overrides the implementation inherited from EOObjectStore to attempt to lock the object identified by gid in editingContext in the external store. Throws an exception if unable to obtain the lock. This method works by forwarding the message lockObjectWithGlobalID to its parent object store.
Overrides:
lockObjectWithGlobalID in class EOObjectStore
Parameters:
gid - the EOGlobalID of the object to lock.
editingContext - the EOEditingContext that holds the object to lock.
See Also:
EOEditingContext.lockObject(com.webobjects.eocontrol.EOEnterpriseObject), isObjectLockedWithGlobalID(com.webobjects.eocontrol.EOGlobalID, com.webobjects.eocontrol.EOEditingContext), EOEditingContext.locksObjectsBeforeFirstModification()

objectStoreForFetchSpecification

public EOCooperatingObjectStore objectStoreForFetchSpecification(EOFetchSpecification fetchSpecification)
Returns the EOCooperatingObjectStore responsible for fetching objects with fetchSpecification. Returns null if no EOCooperatingObjectStore can be found that responds true to handlesFetchSpecification.
Parameters:
fetchSpecification - the EOFetchSpecification to locate an EOCooperatingObjectStore for
Returns:
an EOCooperatingObjectStore to handle objects found with fetchSpecification, or null if no such cooperating object store can be found
See Also:
objectStoreForGlobalID(com.webobjects.eocontrol.EOGlobalID), objectStoreForObject(com.webobjects.eocontrol.EOEnterpriseObject)

objectStoreForGlobalID

public EOCooperatingObjectStore objectStoreForGlobalID(EOGlobalID gid)
Returns the EOCooperatingObjectStore for the object identified by gid. Returns null if no EOCooperatingObjectStore can be found that responds true to ownsGlobalID.
Parameters:
gid - the EOGlobalID of the object to locate a cooperating object store for
Returns:
the EOCooperatingObjectStore for the object identified by gid, or null if no such store can be found
See Also:
objectStoreForFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification), objectStoreForObject(com.webobjects.eocontrol.EOEnterpriseObject)

objectStoreForObject

public EOCooperatingObjectStore objectStoreForObject(EOEnterpriseObject object)
Returns the EOCooperatingObjectStore that owns object. Returns null if no EOCooperatingObjectStore can be found that responds true to ownsObject.
Parameters:
object - the EOEnterpriseObject to locate a cooperating object store for
Returns:
an EOCooperatingObjectStore for object, or null if no such store can be found
See Also:
objectStoreForFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification), objectStoreForGlobalID(com.webobjects.eocontrol.EOGlobalID)

objectsForSourceGlobalID

public NSArray objectsForSourceGlobalID(EOGlobalID gid,
                                        String relationshipName,
                                        EOEditingContext editingContext)
Returns the destination objects for a to-many relationship. EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore returned by objectStoreForGlobalID for gid.
Overrides:
objectsForSourceGlobalID in class EOObjectStore
Parameters:
gid - the EOGlobalID of the source object
relationshipName - the name of the to-many relationship
editingContext - the EOEditingContext that contains the source and destination objects
Returns:
the destination objects for the to-many relationship
See Also:
EOObjectStore.objectsForSourceGlobalID(com.webobjects.eocontrol.EOGlobalID, java.lang.String, com.webobjects.eocontrol.EOEditingContext)

objectsWithFetchSpecification

public NSArray objectsWithFetchSpecification(EOFetchSpecification fetchSpecification,
                                             EOEditingContext editingContext)
Overrides the EOObjectStore implementation to fetch objects from the receiver's cooperating object stores.
Overrides:
objectsWithFetchSpecification in class EOObjectStore
Parameters:
fetchSpecification - the EOFetchSpecification that speicifies which objects to fetch
editingContext - container of objects fetched using fetchSpecification
Returns:
array of EOEnterpriseObjects fetched
See Also:
EOObjectStore.objectsWithFetchSpecification(com.webobjects.eocontrol.EOFetchSpecification, com.webobjects.eocontrol.EOEditingContext)

refaultObject

public void refaultObject(EOEnterpriseObject object,
                          EOGlobalID gid,
                          EOEditingContext editingContext)
Turns object into a fault (an empty enterprise object), identified by globalID in editingContext. EOObjectStoreCoordinator's implementation forwards this message to the EOCooperatingObjectStore returned by objectStoreForGlobalID for gid.
Overrides:
refaultObject in class EOObjectStore
Parameters:
object - the object to turn into a fault
gid - the EOGlobalID identifier for the resulting fault object
editingContext - contains object and the resulting fault for object
See Also:
EOObjectStore.refaultObject(com.webobjects.eocontrol.EOEnterpriseObject, com.webobjects.eocontrol.EOGlobalID, com.webobjects.eocontrol.EOEditingContext)

removeCooperatingObjectStore

public void removeCooperatingObjectStore(EOCooperatingObjectStore objectStore)
Removes objectStore from the list of EOCooperatingObjectStores that need to be queried and notified about changes to enterprise objects. Posts the notification CooperatingObjectStoreWasRemoved.
Parameters:
objectStore - the EOCooperatingObjectStore to remove from the receiver's notification list
See Also:
addCooperatingObjectStore(com.webobjects.eocontrol.EOCooperatingObjectStore), cooperatingObjectStores()

saveChangesInEditingContext

public void saveChangesInEditingContext(EOEditingContext context)
Overrides the EOObjectStore implementation to save the changes made in context. This message is sent by an EOEditingContext to an EOObjectStoreCoordinator to commit changes. When an EOObjectStoreCoordinator receives this message, it guides its EOCooperatingObjectStores through a multi-pass save protocol in which each EOCooperatingObjectStore saves its own changes and forwards remaining changes to other EOCooperatingObjectStores. When this method is invoked, the following sequence of events occurs:
  1. The receiver sends each of its EOCooperatingObjectStores the message prepareForSaveWithCoordinator, which informs them that a multi-pass save operation is beginning. When the EOCooperatingObjectStore is an EODatabaseContext (EOAccess), it takes this opportunity to generate primary keys for any new objects in the EOEditingContext.
  2. The receiver sends each of its EOCooperatingObjectStores the message recordChangesInEditingContext, which prompts them to examine the changed objects in the editing context, record operations that need to be performed, and notify the receiver of any changes that need to be forwarded to other stores. For example, if in its recordChangesInEditingContext method one EOCooperatingObjectStore notices the removal of an object from an owning relationship but that object belongs to another EOCooperatingObjectStore, it informs the other store by sending the coordinator a forwardUpdateForObject message.
  3. The receiver sends each of its EOCooperatingObjectStores the message ownsGlobalID. This tells the stores to transmit their changes to their underlying databases. When the EOCooperatingObjectStore is an EODatabaseContext, it responds to this message by taking the EODatabaseOperations (EOAccess) that were constructed in the previous step, constructing EOAdaptorOperations (EOAccess) from them, and giving the EOAdaptorOperations to an available EOAdaptorChannel (EOAccess) for execution.
  4. If ownsGlobalID fails for any of the EOCooperatingObjectStores, all stores are sent the message rollbackChanges.
  5. If ownsGlobalID succeeds for all EOCooperatingObjectStores, the receiver sends them the message commitChanges, which has the effect of telling the adaptor to commit the changes.
  6. If commitChanges fails for a particular EOCooperatingObjectStore, that store and all subsequent ones are sent the message rollbackChanges. However, the stores that have already committed their changes do not roll back. In other words, the coordinator doesn't perform the two-phase commit protocol necessary to guarantee consistent distributed update.
This method raises an exception if an error occurs.
Overrides:
saveChangesInEditingContext in class EOObjectStore
Parameters:
context - EOEditingContext that will have its object graph changes saved

setDefaultCoordinator

public static void setDefaultCoordinator(EOObjectStoreCoordinator coordinator)
Sets a shared instance EOObjectStoreCoordinator.
Parameters:
coordinator - the new shared instance EOObjectStoreCoordinator

setUserInfo

public void setUserInfo(NSDictionary userInfo)
Sets the dictionary of auxiliary data, which your application can use for whatever it needs.
Parameters:
userInfo - dictionary of application defined data
See Also:
userInfo()

unlock

public void unlock()
This method is used to protect access to the receiver from concurrent operations by multiple threads. EOEditingContexts will indirectly unlock their EOObjectStoreCoordinators when necessary. Unlocking an EOObjectStoreCoordinator will cause the coordinator to unlock each registered EOCooperatingObjectStore managed by that coordinator. Applications which make direct use of an EOObjectStoreCoordinator should lock and unlock it as appropriate. Do not confuse this with any methods which work with the database locking mechanism.
Overrides:
unlock in class EOObjectStore
See Also:
lock(), EOObjectStore.unlock()

userInfo

public NSDictionary userInfo()
Returns a dictionary of user data. Your application can use this to store any auxiliary information it needs.
Returns:
dictionary of application defined data
See Also:
setUserInfo(com.webobjects.foundation.NSDictionary)

valuesForKeys

public NSDictionary valuesForKeys(NSArray keys,
                                  EOEnterpriseObject object)
Communicates with the appropriate EOCooperatingObjectStore to get the values identified by keys for object, so that it can then forward them on to another EOCooperatingObjectStore. EOCooperatingObjectStores can hold values for an object that augment the properties in the object. For instance, an EODatabaseContext (EOAccess) stores foreign key information for the objects it owns. These foreign keys may well not be defined as properties of the object. Other EODatabaseContexts can find out the object's foreign keys by sending the EODatabaseContext that owns the object a valuesForKeys message (through the coordinator).
Parameters:
keys - NSArray of keys to return values for
object - the EOEnterpriseObject to return values for
Returns:
a dictionary of values for keys on object

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.