Classes

EOAggregateEvent
EOAndQualifier
EOArrayDataSource
EOClassDescription
EOCooperatingObjectStore
EOCustomObject
EODataSource
EODelayedObserver
EODelayedObserverQueue
EODetailDataSource
EOEditingContext
EOEvent
EOEventCenter
EOFault
EOFaultHandler
EOFetchSpecification
EOGenericRecord
EOGlobalID
EOKeyComparisonQualifier
EOKeyGlobalID
EOKeyValueArchiver
EOKeyValueQualifier
EOKeyValueUnarchiver
EOMultiReaderLock
EONotQualifier
EOObjectStore
EOObjectStoreCoordinator
EOObserverCenter
EOObserverProxy
EOOrQualifier
EOQualifier
EOQualifierVariable
EOSharedEditingContext
EOSortOrdering
EOTemporaryGlobalID
EOUndoManager

Protocols

<EOEventRecordingHandler>
<EOKeyValueArchiving>
<EOObserving>
<EOQualifierEvaluation>
(Comparison)
(EODeprecated)
(EOEditingContextDelegation)
(EOEventRecordingHandler)
(EOKVCGDL2Additions)
(EOKeyValueCoding)
(EOKeyValueCodingAdditions)
(MacOSX)

Constants

Functions

EOCancelEvent
EOEditingContext_globalIDForObjectWithImpPtr
EOEditingContext_objectForGlobalIDWithImpPtr
EOEditingContext_recordObjectGlobalIDWithImpPtr
EOFLogAssertGood_
EOFLogC_
EOFLogDumpObject_
EOHashAddTable
EOMKKDInitializer_indexForKeyWithImpPtr
EOMKKD_hasKeyWithImpPtr
EOMKKD_indexForKeyWithImpPtr
EOMKKD_objectForKeyWithImpPtr
EOMKKD_removeObjectForKeyWithImpPtr
EOMKKD_setObjectForKeyWithImpPtr
EOMarkAtomicEvent
EOMarkEndOfEvent
EOMarkStartOfEvent
EONewEventOfClass
GDL2_Activate
GDL2_AssignAtomicallyIfNil
GDL2_PrivateInit
GDL2_isLegalDBName
GSUseStrictWO451Compatibility

Macros

GDL2_BUFFER

Types

EODeleteRule
EOEventSignatureType
EOObserverPriority

Variables

EOAdditionalExceptionsKey
EOClassDescriptionNeededForClassNotification
EOClassDescriptionNeededForEntityNameNotification
EOClassDescriptionNeededNotification
EOCooperatingObjectStoreNeeded
EOCooperatingObjectStoreWasAdded
EOCooperatingObjectStoreWasRemoved
EODefaultSharedEditingContextWasInitializedNotification
EODeletedKey
EOEditingContextDidSaveChangesNotification
EOEventGroupName
EOEventLoggingEnabled
EOEventLoggingLimit
EOEventLoggingOverflowDisplay
EOFetchLimitHintKey
EOGlobalIDChangedNotification
EOInsertedKey
EOInvalidatedAllObjectsInStoreNotification
EOInvalidatedKey
EOObjectsChangedInEditingContextNotification
EOObjectsChangedInStoreNotification
EOPrefetchingRelationshipHintKey
EOPromptAfterFetchLimitHintKey
EOQualifierVariableSubstitutionException
EOSharedEditingContextInitializedObjectsNotification
EOTargetObjectUserInfoKey
EOUnknownUserInfoKey
EOUpdatedKey
EOValidatedObjectUserInfoKey
EOValidatedPropertyUserInfoKey
EOValidationException
GDL2_EOEditingContextClass
GDL2_EOEditingContext_globalIDForObjectIMP
GDL2_EOEditingContext_objectForGlobalIDIMP
GDL2_EOEditingContext_recordObjectGlobalIDIMP
GDL2_EOFaultClass
GDL2_EOMKKDInitializerClass
GDL2_EOMKKDInitializer_indexForKeyIMP
GDL2_EONull
GDL2_Lock
GDL2_MKKDClass
GDL2_MKKD_hasKeyIMP
GDL2_MKKD_indexForKeyIMP
GDL2_MKKD_objectForKeyIMP
GDL2_MKKD_removeObjectForKeyIMP
GDL2_MKKD_setObjectForKeyIMP
GDL2_NSArray
GDL2_NSArrayClass
GDL2_NSArray_arrayIMP
GDL2_NSAutoreleasePoolClass
GDL2_NSAutoreleasePool_newIMP
GDL2_NSCalendarDateClass
GDL2_NSCalendarDate_allocWithZoneIMP
GDL2_NSDataClass
GDL2_NSData_allocWithZoneIMP
GDL2_NSData_dataWithBytes_lengthIMP
GDL2_NSDateClass
GDL2_NSDecimalNumberClass
GDL2_NSDecimalNumber_allocWithZoneIMP
GDL2_NSDictionaryClass
GDL2_NSMutableArrayClass
GDL2_NSMutableArray_allocWithZoneIMP
GDL2_NSMutableArray_arrayIMP
GDL2_NSMutableArray_arrayWithArrayIMP
GDL2_NSMutableArray_arrayWithCapacityIMP
GDL2_NSMutableDictionaryClass
GDL2_NSMutableDictionary_allocWithZoneIMP
GDL2_NSMutableDictionary_dictionaryWithCapacityIMP
GDL2_NSNumberBool_No
GDL2_NSNumberBool_Yes
GDL2_NSNumberClass
GDL2_NSNumber_allocWithZoneIMP
GDL2_NSStringClass
GDL2_NSString_allocWithZoneIMP
GDL2_NSString_defaultCStringEncodingIMP
GDL2_NSString_stringWithCStringIMP
GDL2_NSString_stringWithCString_lengthIMP
eqSel

Up

EOSharedEditingContext class documentation

Authors

Generated by Debian

Date: Generated at 2025-03-07 04:56:32 +0000


Contents -

  1. Software documentation for the EOSharedEditingContext class
  2. EOSharedEditingContext variables

Software documentation for the EOSharedEditingContext class

EOSharedEditingContext : EOEditingContext

class_EOSharedEditingContext EOEditingContext EOEditingContext EOSharedEditingContext EOSharedEditingContext EOEditingContext->EOSharedEditingContext
Declared in:
EOControl/EOSharedEditingContext.h

Immutable Enterprise Objects can be shared among EOEditingContexts via EOSharedEditingContext. Normally EOs belong to a specific EOEditingContext and this editing context tracks the changes of this object. Yet sometimes immutable objects are often referenced by many objects and they would have to fetched and tracked within many EOEditingContexts. EOSharedEditingContext is intended to address this by supplying an shared context for immutable objects which can be shared among instances of EOEditingContext. An EO that is registered with an EOSharedEditingContext may not be contained in an other EOEditingContext which uses the EOSharedEditingContext.

The only valid way to modify an object that is contained in a shared context is by changing it in an unreladed EOEditingContext (i.e. one which does not use the EOSharedEditingContext), commit those changes to the object store which would post a EOObjectsChangedInStoreNotification which in turn will cause the EOSharedEditingContext to invalidate an subsequently refetch the values of the EO from its object store.

Objects are fetched with [-objectsWithFetchSpecification:] or [-bindObjectsWithFetchSpecification:toName:] into an EOSharedEditingContext. If the later method is used, the objects can be later retrieved via -objectsByEntityNameAndFetchSpecificationName .


Instance Variables

Method summary


defaultSharedEditingContext 

+ (EOSharedEditingContext*) defaultSharedEditingContext;
Returns the current default shared editing context. This method will create one if none currently exists. The first time this method implicitly creates a shared editing context it will post a EODefaultSharedEditingContextWasInitializedNotification .

setDefaultSharedEditingContext: 

+ (void) setDefaultSharedEditingContext: (EOSharedEditingContext*)context;
Explicity sets the default shared editing context. If CONTEXT is not an EOSharedEditingContext this method raises an NSInternalInconsistency exception.

bindObjectsWithFetchSpecification: toName: 

- (void) bindObjectsWithFetchSpecification: (EOFetchSpecification*)fetchSpec toName: (NSString*)name;

deleteObject: 

- (void) deleteObject: (id)object;
Raises an NSInternalInconsistencyException since a shared editing context may not delete objects.

deletedObjects 

- (NSArray*) deletedObjects;
Returns an empty array since a shared editing context may not delete objects.

faultForGlobalID: editingContext: 

- (id) faultForGlobalID: (EOGlobalID*)globalID editingContext: (EOEditingContext*)context;
Returns the fault of the superclass implementation but insures that the returned object is valid in autoreleased in the current autorelease pool of the calling thread.

hasChanges 

- (BOOL) hasChanges;
Always returns NO since a shared editing context may not have changes.

insertObject: 

- (void) insertObject: (id)object;
Raises an NSInternalInconsistencyException since a shared editing context may not delete objects.

insertedObjects 

- (NSArray*) insertedObjects;
Returns an empty array since a shared editing context may not insert objects.

lockForReading 

- (void) lockForReading;
Increases the recievers lock count for reading.

objectForGlobalID: 

- (id) objectForGlobalID: (EOGlobalID*)globalID;
Returns the object of the superclass implementation but insures that the returned object is valid in autoreleased in the current autorelease pool of the calling thread.

objectWillChange: 

- (void) objectWillChange: (id)object;
Raises an NSInternalInconsistencyException since objects in a shared editing context may not be modified.

objectsByEntityName 

- (NSDictionary*) objectsByEntityName;
Returns all object currently maintained the the EOSharedEditingContext in an NSDictionary associated with the corresponding entity name.

objectsByEntityNameAndFetchSpecificationName 

- (NSDictionary*) objectsByEntityNameAndFetchSpecificationName;
Returns all object currently maintained the the EOSharedEditingContext in an NSDictionary associated with the corresponding name supplied by previous [-bindObjectsWithFetchSpecification:toName:] each containing a dictionary in which the objects are assicated with the entity name.

objectsWithFetchSpecification: editingContext: 

- (NSArray*) objectsWithFetchSpecification: (EOFetchSpecification*)fetchSpec editingContext: (EOEditingContext*)context;
Fetches the objects with the FETCHSPEC and registers them for retrieval with -objectsByEntityName .

refaultObject: withGlobalID: editingContext: 

- (void) refaultObject: (id)object withGlobalID: (EOGlobalID*)globalID editingContext: (EOEditingContext*)context;
This method is invoked if the objects have been modified in an unrelated EOEditingContext and therefor needs to be invalidated and refetched here.

registeredObjects 

- (NSArray*) registeredObjects;
Returns the registered objects of the superclass implementation but insures that that the returned objects are valid in autoreleased in the current autorelease pool of the calling thread.

reset 

- (void) reset;
Overriden to do nothing.

retrieveReaderLocks 

- (void) retrieveReaderLocks;
Retrieve suspended reader lock count.

saveChanges 

- (void) saveChanges;
Raises an NSInternalInconsistencyException since objects in a shared editing context may not be modified.

setSharedEditingContext: 

- (void) setSharedEditingContext: (EOSharedEditingContext*)sharedContext;
Raises an NSInternalInconsistencyException unless SHAREDCONTEXT is nil.

setUndoManager: 

- (void) setUndoManager: (NSUndoManager*)undoManager;
Raises an NSInternalInconsistencyException unless SHAREDCONTEXT is nil.

sharedEditingContext 

- (EOSharedEditingContext*) sharedEditingContext;
EOSharedEditingContexts cannot have shared editing contexts. This methos allways returns nil.

suspendReaderLocks 

- (void) suspendReaderLocks;
Suspends the reader lock count until retrieveReaderLocks is called.

tryLockForReading 

- (BOOL) tryLockForReading;
Attempts to increases the recievers lock count for reading. Returns NO if the lock cannot be retrieved.

unlockForReading 

- (void) unlockForReading;
Decreases the recievers lock count for reading.

updatedObjects 

- (NSArray*) updatedObjects;
Returns an empty array since a shared editing context may not insert objects.

validateChangesForSave 

- (void) validateChangesForSave;
Overriden to do nothing.



Instance Variables for EOSharedEditingContext Class

_initializedGlobalIDs

@protected NSMutableArray* _initializedGlobalIDs;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_objsByEntity

@protected NSMutableDictionary* _objsByEntity;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_objsByEntityFetchSpec

@protected NSMutableDictionary* _objsByEntityFetchSpec;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_readerLockCount

@protected int _readerLockCount;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_readerLockCountSuspended

@protected int _readerLockCountSuspended;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_sharedLock

@protected NSRecursiveLock* _sharedLock;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.




EOSharedEditingContext variables

EODefaultSharedEditingContextWasInitializedNotification

NSString* EODefaultSharedEditingContextWasInitializedNotification;
Description forthcoming.

EOSharedEditingContextInitializedObjectsNotification

NSString* EOSharedEditingContextInitializedObjectsNotification;
Description forthcoming.


Up