public class ERXEC extends EOEditingContext
EOEditingContext
that has every
public method overridden to support automatic lock/unlock handling for you.
This is very useful, as it is potentially very dangerous to rely on EOFs automatic
lock handling - it will invariably lead into deadlocks. As you will need to use
this class and its subclasses exclusively as your ECs, it also contains a factory
instances. The Factory also sets a default delegate for you and is used
everywhere in ERExtensions and ERDirectToWeb. The Factory is actually an
interface and you would create a new EC by using:
ERXEC.newEditingContext()
You can also install your own
Factory classes. It is recommended to subclass ERXEC.DefaultFactory and
override _createEditingContext()
or use the
er.extensions.ERXEC.editingContextClassName property to specify the name of the
editing context class to be instantiated by ERXEC.DefaultFactory's
_createEditingContext() core method.Name | Description |
---|---|
er.extensions.ERXEC.useSharedEditingContext | er.extensions.ERXEC.useSharedEditingContext |
er.extensions.ERXEC.markOpenLocks | er.extensions.ERXEC.markOpenLocks |
er.extensions.ERXEC.traceOpenLocks | er.extensions.ERXEC.traceOpenLocks |
er.extensions.ERXEC.useUnlocker | er.extensions.ERXEC.useUnlocker |
er.extensions.ERXEC.denyMerges | er.extensions.ERXEC.denyMerges |
er.extensions.ERXEC.defaultAutomaticLockUnlock | er.extensions.ERXEC.defaultAutomaticLockUnlock |
er.extensions.ERXEC.defaultCoalesceAutoLocks | er.extensions.ERXEC.defaultCoalesceAutoLocks |
er.extensions.ERXEC.safeLocking | er.extensions.ERXEC.safeLocking |
er.extensions.ERXEC.editingContextClassName | er.extensions.ERXEC.editingContextClassName |
Modifier and Type | Class and Description |
---|---|
static class |
ERXEC._DenyMergeDelegate
Temp EC delegate that prevents merging of changes to objects that already have changes.
|
static class |
ERXEC.DefaultFactory
Default implementation of the Factory interface.
|
static interface |
ERXEC.Delegate
Extensions for the EOEditingContext.Delegate interface.
|
static class |
ERXEC.DumpLocksSignalHandler
OpenEditingContextLockSignalHandler provides a signal handler that prints
out open editing context locks.
|
static interface |
ERXEC.Factory |
EOEditingContext._EventLoggingEnabler, EOEditingContext.EditingContextEvent, EOEditingContext.Editor, EOEditingContext.MessageHandler
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
Modifier and Type | Field and Description |
---|---|
static boolean |
_shouldLockOnLockObjectStore
Technically, the OSC is public API and as such should also get
auto-locked.
|
protected static Map<ERXEC,String> |
activeEditingContexts |
static String |
EditingContextDidCreateNotification
Name of the notification that is posted after editing context is created.
|
static String |
EditingContextDidRevertChanges
Name of the notification that is posted when an editing context is
reverted.
|
static String |
EditingContextFailedToSaveChanges
Name of the notification that is posted when an editing context has
failed to save changes.
|
static String |
EditingContextWillSaveChangesNotification
Name of the notification that is posted before an editing context is
saved.
|
static NSSelector |
ERXECProcessQueuedNotificationsSelector |
protected static ERXEC.Factory |
factory
holds a reference to the factory used to create editing contexts
|
static org.slf4j.Logger |
lockLogger
Logs a message when set to DEBUG and an EC is locked/unlocked.
|
static org.slf4j.Logger |
lockTrace
Logs a message with trace when set to DEBUG if autoLocking is enabled and an EC is
used without a lock.
|
_CLASS, _EditingContextDidChangeSharedEditingContextNotification, _EditingContextEditorHasChangesNotification, _IsEventLoggingEnabled, EditingContextDidSaveChangesNotification, EditingContextFlushChangesRunLoopOrdering, ObjectsChangedInEditingContextNotification
_doAssertLock, _doAssertLockInitialized, _userInfo, _wasDisposed, DeletedKey, InsertedKey, InvalidatedAllObjectsInStoreNotification, InvalidatedKey, ObjectsChangedInStoreNotification, UpdatedKey
Constructor and Description |
---|
ERXEC() |
ERXEC(EOObjectStore os) |
Modifier and Type | Method and Description |
---|---|
protected void |
_checkOpenLockTraces() |
static ERXEC.Factory |
_factory()
Gets the factory used to create editing contexts
|
void |
_objectsChangedInStore(NSNotification nsnotification)
Overridden so add a bugfix from Lenny Marks
|
void |
_processObjectStoreChanges(NSDictionary info)
Quick and experimental hack to hook into the merge-changes system.
|
protected void |
_saveChanges() |
NSArray |
arrayFaultWithSourceGlobalID(EOGlobalID eoglobalid,
String s,
EOEditingContext eoeditingcontext) |
protected boolean |
autoLock(String method)
Utility to actually emit the log messages and do the locking, based on
the result of
useAutoLock() . |
protected void |
autoUnlock(boolean wasAutoLocked)
Utility to unlock the EC is it was locked in the previous invocation.
|
boolean |
coalesceAutoLocks()
If you just use autolocking, you will end up churning locks constantly.
|
NSDictionary |
committedSnapshotForObject(EOEnterpriseObject eoenterpriseobject) |
Exception |
creationTrace()
If traceOpenEditingContextLocks is true, returns the stack trace from
when this EC was created
|
NSDictionary |
currentEventSnapshotForObject(EOEnterpriseObject eoenterpriseobject) |
static boolean |
defaultAutomaticLockUnlock()
Returns the value of the
er.extensions.ERXEC.defaultAutomaticLockUnlock property, which
turns on auto-locking by default. |
static boolean |
defaultCoalesceAutoLocks()
Returns the value of the
er.extensions.ERXEC.defaultCoalesceAutoLocks property, which
turns on coalescing auto-locks, meaning that the EC gets locked once and unlocked at the end of the RR loop. |
NSArray<EOEnterpriseObject> |
deletedObjects() |
void |
deleteObject(EOEnterpriseObject eo)
Overridden to support autoLocking and to call mightDelete() on subclasses
of ERXEnterpriseObject.
|
void |
deleteObjects(NSArray objects)
Utility to delete a bunch of objects.
|
protected void |
didSaveChanges(NSArray insertedObjects,
NSArray updatedObjects,
NSArray deletedObjects) |
void |
dispose() |
static String |
editingContextClassName() |
void |
editingContextDidForgetObjectWithGlobalID(EOEditingContext eoeditingcontext,
EOGlobalID eoglobalid) |
EOEnterpriseObject |
faultForGlobalID(EOGlobalID eoglobalid,
EOEditingContext eoeditingcontext) |
void |
finalize() |
void |
forgetObject(EOEnterpriseObject eoenterpriseobject) |
EOGlobalID |
globalIDForObject(EOEnterpriseObject eoenterpriseobject) |
boolean |
hasChanges() |
void |
initializeObject(EOEnterpriseObject eoenterpriseobject,
EOGlobalID eoglobalid,
EOEditingContext eoeditingcontext) |
NSArray<EOEnterpriseObject> |
insertedObjects() |
void |
insertObject(EOEnterpriseObject eoenterpriseobject) |
void |
insertObjectWithGlobalID(EOEnterpriseObject eoenterpriseobject,
EOGlobalID eoglobalid) |
void |
invalidateAllObjects() |
void |
invalidateObjectsWithGlobalIDs(NSArray nsarray) |
Object |
invokeRemoteMethod(EOEditingContext eoeditingcontext,
EOGlobalID eoglobalid,
String s,
Class[] aclass,
Object[] aobj) |
boolean |
isAutoLocked()
Returns whether we did autolock this instance.
|
void |
lock()
Overridden to emit log messages and push this instance to the locked
editing contexts in this thread.
|
void |
lockObject(EOEnterpriseObject eoenterpriseobject) |
void |
lockObjectStore() |
static boolean |
markOpenLocks()
Returns the value of the
er.extensions.ERXEC.markOpenLocks
property, which turns on marking of locks. |
static EOEditingContext |
newEditingContext()
Factory method to create a new editing context.
|
static EOEditingContext |
newEditingContext(boolean validation)
Factory method to create a new editing context with validation disabled.
|
static EOEditingContext |
newEditingContext(EOObjectStore objectStore)
Creates a new editing context with the specified object store as the
parent object store.
|
static EOEditingContext |
newEditingContext(EOObjectStore parent,
boolean validationEnabled)
Creates a new editing context with the specified object store as the
parent object store and with validation turned on or off depending on the
flag passed in.
|
static EOEditingContext |
newTolerantEditingContext() |
static EOEditingContext |
newTolerantEditingContext(EOObjectStore osc) |
static EOEditingContext |
newTolerantEditingContext(EOObjectStore parent,
boolean retry,
boolean merge)
Factory method to create a new tolerant editing context.
|
EOEnterpriseObject |
objectForGlobalID(EOGlobalID eoglobalid) |
NSArray |
objectsForSourceGlobalID(EOGlobalID eoglobalid,
String s,
EOEditingContext eoeditingcontext) |
NSArray |
objectsWithFetchSpecification(EOFetchSpecification fs,
EOEditingContext eoeditingcontext) |
void |
objectWillChange(Object obj) |
NSDictionary<Thread,NSMutableArray<Exception>> |
openLockTraces() |
static String |
outstandingLockDescription()
Returns a string describing outstanding locks for the created ECs
|
static void |
popLockedContextForCurrentThread(EOEditingContext ec)
Pops the given EC from the array of contexts to unlock.
|
void |
processQueuedNotificationsNotification(NSNotification n) |
void |
processRecentChanges() |
static void |
pushLockedContextForCurrentThread(EOEditingContext ec)
Pushes the given EC to the array of locked ECs in the current thread.
|
void |
recordObject(EOEnterpriseObject eoenterpriseobject,
EOGlobalID eoglobalid) |
void |
redo() |
void |
refaultAllObjects() |
void |
refaultObject(EOEnterpriseObject eoenterpriseobject) |
void |
refaultObject(EOEnterpriseObject eoenterpriseobject,
EOGlobalID eoglobalid,
EOEditingContext eoeditingcontext)
Overridden to support autoLocking and to flush the cache of all
ERXEnterpriseObjects.
|
void |
refreshObject(EOEnterpriseObject eoenterpriseobject) |
NSArray |
registeredObjects() |
static void |
registerOpenEditingContextLockSignalHandler()
Register the OpenEditingContextLockSignalHandler signal handle on the HUP
signal.
|
static void |
registerOpenEditingContextLockSignalHandler(String signalName)
Register the OpenEditingContextLockSignalHandler signal handle on the
named signal.
|
void |
reset() |
void |
revert()
Overridden to support autoLocking and will/did revert delegate methods.
|
static boolean |
safeLocking()
Returns the value of the
er.extensions.ERXEC.safeLocking property, which is the
new catch-all setting that turns on all of the recommended locking settings. |
void |
saveChanges()
Smarter version of normal
saveChanges() method. |
void |
saveChangesInEditingContext(EOEditingContext eoeditingcontext) |
void |
saveChangesTolerantly() |
void |
saveChangesTolerantly(boolean doesRetry) |
void |
saveChangesTolerantly(boolean doesRetry,
boolean mergesChanges)
Saves changes and tries to recover from optimistic locking exceptions by
refaulting the object in question, optionally merging the changed values
and optionally retrying the save.
|
static void |
saveChangesTolerantly(EOEditingContext ec) |
static void |
saveChangesTolerantly(EOEditingContext ec,
boolean doesRetry,
boolean mergesChanges) |
void |
setCoalesceAutoLocks(boolean value)
Sets whether or not coalescing auto locks should be enabled.
|
void |
setDelegate(Object d)
Sets the delegate for this context.
|
static void |
setFactory(ERXEC.Factory aFactory)
Sets the default editing context factory
|
static void |
setMarkOpenLocks(boolean value)
Sets whether or not open editing context lock marking is enabled.
|
void |
setOptions(boolean recoversFromException,
boolean doesRetry,
boolean mergesChanges)
Set the options for the saveChanges() operation.
|
void |
setSharedEditingContext(EOSharedEditingContext eosharededitingcontext) |
static void |
setTraceOpenLocks(boolean value)
Sets whether or not open editing context lock tracing is enabled.
|
void |
setUseAutoLock(boolean value)
Sets whether to use autoLocking on this EC.
|
static void |
setUseUnlocker(boolean value) |
static boolean |
traceOpenLocks()
Returns the value of the
er.extensions.ERXEC.traceOpenLocks
property, which turns on tracing of locks. |
void |
undo() |
void |
unlock()
Overridden to emit log messages and pull this instance from the locked
editing contexts in this thread.
|
static void |
unlockAllContextsForCurrentThread()
Unlocks all remaining locked contexts in the current thread.
|
void |
unlockObjectStore() |
NSArray<EOEnterpriseObject> |
updatedObjects() |
boolean |
useAutoLock()
Decides on a per-EC-level if autoLocking should be used.
|
static boolean |
useUnlocker()
Returns the value of the
er.extensions.ERXEC.useUnlocker property, which
turns on unlocking at the end of the RR loop. |
protected void |
willSaveChanges(NSArray insertedObjects,
NSArray updatedObjects,
NSArray deletedObjects) |
_clearChangedThisTransaction, _clearOriginalSnapshotAndInitializeRec, _clearOriginalSnapshotForObject, _defaultEditingContextNowInitialized, _defaultSharedEditingContextWasInitialized, _editorHasChanges, _EOAssertSafeMultiThreadedAccess, _EOAssertSafeMultiThreadedAccess, _EOAssertSafeMultiThreadedReadAccess, _globalIDChanged, _globalIDsForObjects, _initWithParentObjectStore, _insertObjectWithGlobalID, _invalidatedAllObjectsInStore, _invalidateObjectsDuringSave, _noop, _objectBasedChangeInfoForGIDInfo, _objectsInitializedInSharedContext, _processEndOfEventNotification, _processGlobalIDChanges, _processInitializedObjectsInSharedContext, _processNotificationQueue, _processRecentChanges, _resetAllChanges, _resetAllChanges, _retainCountForObjectWithGlobalID, _undoDelete, _undoManagerCheckpoint, _undoUpdate, addEditor, decodeWithKeyValueUnarchiver, defaultFetchTimestampLag, defaultParentObjectStore, delegate, editors, editorsHaveChanges, encodeObjectWithCoder, encodeWithKeyValueArchiver, faultForRawRow, faultForRawRow, fetchTimestamp, initObjectWithCoder, instancesRetainRegisteredObjects, invalidatesObjectsWhenFinalized, isObjectLockedWithGlobalID, lockObjectWithGlobalID, locksObjectsBeforeFirstModification, messageHandler, objectsWithFetchSpecification, parentObjectStore, propagatesDeletesAtEndOfEvent, readResolve, refaultObjects, refetch, refreshAllObjects, removeEditor, retainsRegisteredObjects, rootObjectStore, saveChanges, setDefaultFetchTimestampLag, setDefaultParentObjectStore, setFetchTimestamp, setInstancesRetainRegisteredObjects, setInvalidatesObjectsWhenFinalized, setLocksObjectsBeforeFirstModification, setMessageHandler, setPropagatesDeletesAtEndOfEvent, setRetainsRegisteredObjects, setStopsValidationAfterFirstError, setSubstitutionEditingContext, setUndoManager, setUsesContextRelativeEncoding, sharedEditingContext, stopsValidationAfterFirstError, substitutionEditingContext, tryLock, tryToSaveChanges, undoManager, usesContextRelativeEncoding
_checkAssertLock, _resetAssertLock, _suppressAssertLock, setUserInfo, setUserInfoForKey, userInfo, userInfoForKey
public static final org.slf4j.Logger lockLogger
lockTrace
is also set to DEBUG.public static final org.slf4j.Logger lockTrace
lockLogger
if it is also set to DEBUG.public static final String EditingContextDidCreateNotification
public static final String EditingContextWillSaveChangesNotification
public static final String EditingContextDidRevertChanges
public static final String EditingContextFailedToSaveChanges
public static final NSSelector ERXECProcessQueuedNotificationsSelector
public static boolean _shouldLockOnLockObjectStore
protected static volatile ERXEC.Factory factory
public ERXEC()
public ERXEC(EOObjectStore os)
public static String editingContextClassName()
er.extensions.ERXEC.editingContextClassName
property, which
is the name of the editing context class instantiated by ERXEC.DefaultFactory's _createEditingContext()
core method. It defaults to the name of the ERXEC class.public static boolean safeLocking()
er.extensions.ERXEC.safeLocking
property, which is the
new catch-all setting that turns on all of the recommended locking settings.er.extensions.ERXEC.safeLocking
propertypublic static boolean defaultAutomaticLockUnlock()
er.extensions.ERXEC.defaultAutomaticLockUnlock
property, which
turns on auto-locking by default. Also returns true if safeLocking
is true.er.extensions.ERXEC.defaultAutomaticLockUnlock
propertypublic static boolean defaultCoalesceAutoLocks()
er.extensions.ERXEC.defaultCoalesceAutoLocks
property, which
turns on coalescing auto-locks, meaning that the EC gets locked once and unlocked at the end of the RR loop.
Also returns true if safeLocking
is true.er.extensions.ERXEC.defaultCoalesceAutoLocks
propertypublic static boolean useUnlocker()
er.extensions.ERXEC.useUnlocker
property, which
turns on unlocking at the end of the RR loop.
Also returns true if safeLocking
is true.er.extensions.ERXEC.useUnlocker
propertypublic static void setUseUnlocker(boolean value)
public static boolean traceOpenLocks()
er.extensions.ERXEC.traceOpenLocks
property, which turns on tracing of locks. You can see the trace either by
kill -HUP
, by the
ERXDirectAction/showOpenEditingContextLockTraces
action or
by setting your App's statistic store to ERXStatisticStore
.er.extensions.ERXEC.traceOpenLocks
propertypublic static boolean markOpenLocks()
er.extensions.ERXEC.markOpenLocks
property, which turns on marking of locks. You can see the threads that hold the lock either by
kill -HUP
, by the
ERXDirectAction/showOpenEditingContextLockTraces
action or
by setting your App's statistic store to ERXStatisticStore
.
Also returns true if traceOpenLocks
is true.er.extensions.ERXEC.markOpenLocks
propertypublic static void setTraceOpenLocks(boolean value)
value
- if open locks should be tracedpublic static void setMarkOpenLocks(boolean value)
value
- if open locks should be markedpublic static void pushLockedContextForCurrentThread(EOEditingContext ec)
ec
- locked EOEditingContextpublic static void popLockedContextForCurrentThread(EOEditingContext ec)
ec
- unlocked EOEditingContextpublic static void unlockAllContextsForCurrentThread()
public void deleteObjects(NSArray objects)
objects
- objects to deletepublic boolean useAutoLock()
public void setUseAutoLock(boolean value)
value
- if autolocking should be usedpublic boolean coalesceAutoLocks()
public void setCoalesceAutoLocks(boolean value)
value
- if coalescing auto locks should be enabledpublic Exception creationTrace()
public NSDictionary<Thread,NSMutableArray<Exception>> openLockTraces()
public void lock()
lock
in interface NSLocking
lock
in class EOEditingContext
public void unlock()
unlock
in interface NSLocking
unlock
in class EOEditingContext
protected boolean autoLock(String method)
useAutoLock()
.method
- method name which to prepend to log messageprotected void autoUnlock(boolean wasAutoLocked)
wasAutoLocked
- true if the EC was autolockedpublic boolean isAutoLocked()
protected void _checkOpenLockTraces()
public void dispose()
dispose
in interface NSDisposable
dispose
in class EOEditingContext
public void finalize() throws Throwable
finalize
in class EOEditingContext
Throwable
public void lockObjectStore()
lockObjectStore
in class EOEditingContext
public void unlockObjectStore()
unlockObjectStore
in class EOEditingContext
public void reset()
reset
in class EOEditingContext
public void recordObject(EOEnterpriseObject eoenterpriseobject, EOGlobalID eoglobalid)
recordObject
in class EOEditingContext
public void forgetObject(EOEnterpriseObject eoenterpriseobject)
forgetObject
in class EOEditingContext
public void processRecentChanges()
processRecentChanges
in class EOEditingContext
public NSArray<EOEnterpriseObject> updatedObjects()
updatedObjects
in class EOEditingContext
public NSArray registeredObjects()
registeredObjects
in class EOEditingContext
public NSArray<EOEnterpriseObject> insertedObjects()
insertedObjects
in class EOEditingContext
public NSArray<EOEnterpriseObject> deletedObjects()
deletedObjects
in class EOEditingContext
public void setSharedEditingContext(EOSharedEditingContext eosharededitingcontext)
setSharedEditingContext
in class EOEditingContext
public EOEnterpriseObject objectForGlobalID(EOGlobalID eoglobalid)
objectForGlobalID
in class EOEditingContext
public EOGlobalID globalIDForObject(EOEnterpriseObject eoenterpriseobject)
globalIDForObject
in class EOEditingContext
public NSDictionary committedSnapshotForObject(EOEnterpriseObject eoenterpriseobject)
committedSnapshotForObject
in class EOEditingContext
public NSDictionary currentEventSnapshotForObject(EOEnterpriseObject eoenterpriseobject)
currentEventSnapshotForObject
in class EOEditingContext
public void objectWillChange(Object obj)
objectWillChange
in interface EOObserving
objectWillChange
in class EOEditingContext
public void insertObjectWithGlobalID(EOEnterpriseObject eoenterpriseobject, EOGlobalID eoglobalid)
insertObjectWithGlobalID
in class EOEditingContext
public void insertObject(EOEnterpriseObject eoenterpriseobject)
insertObject
in class EOEditingContext
public void deleteObject(EOEnterpriseObject eo)
deleteObject
in class EOEditingContext
public boolean hasChanges()
hasChanges
in class EOEditingContext
protected void willSaveChanges(NSArray insertedObjects, NSArray updatedObjects, NSArray deletedObjects)
protected void didSaveChanges(NSArray insertedObjects, NSArray updatedObjects, NSArray deletedObjects)
public void saveChanges()
saveChanges()
method. Overridden
to support autoLocking and a bugfix from Lenny Marks, calls up Will/Did
methods on ERXEnterpriseObjects and corrects issues with
flushCaches()
needing to be called on objects in the
parent context when committing the child context to the parent. If the
editing context is a child of the object-store coordinator---that is,
it's not a nested context---this method behaves exactly the same as
EOEditingContext.saveChanges()
. Otherwise, this method
looks over the changed objects in ec
(updatedObjects()
,
insertedObjects()
and deletedObjects()
).
The changed objects lists are filtered for instances of
ERXGenericRecord
. The order of operations then becomes:
processRecentChanges()
on the child context to
propagate changes.
flushCaches()
on each corresponding EO in the parent
context.
saveChanges()
on the child, committing the child
changes to the parent editing context.
flushCaches()
on each corresponding EO in the parent
context.
The order of operations is a bit peculiar: flush deletes, save, flush inserts and updates. This is done because deletes must be flushed because there may be dependent computed state that needs to be reset. But following the delete being committed, the relationships to other objects cannot be relied upon so it isn't reliable to call flushCaches after the commit. It's not entirely correct to flush the deletes like this, but it's the best we can do.
This works around an issue in EOF that we don't get a merge notification
when a child EC saves to its parent. Because there's no merge
notification, flushCaches()
isn't called by the EC
delegate and we're essentially screwed vis-a-vis resetting computed
state.
This method assumes that the ec
is locked before this
method is invoked, but this method will take the lock on the parent
editing context if the ec
is a nested context before and
after the save in order to get the objects and to flush caches on them.
saveChanges
in class EOEditingContext
public void saveChangesTolerantly(boolean doesRetry, boolean mergesChanges)
doesRetry
- when true, saves again after resolving. when false, throws the
optimistic locking after resolvingmergesChanges
- public void saveChangesTolerantly()
public void saveChangesTolerantly(boolean doesRetry)
public void setOptions(boolean recoversFromException, boolean doesRetry, boolean mergesChanges)
recoversFromException
- doesRetry
- when true, saves again after resolving. when false, throws the
optimistic locking after resolvingmergesChanges
- protected void _saveChanges()
public EOEnterpriseObject faultForGlobalID(EOGlobalID eoglobalid, EOEditingContext eoeditingcontext)
faultForGlobalID
in class EOEditingContext
public NSArray arrayFaultWithSourceGlobalID(EOGlobalID eoglobalid, String s, EOEditingContext eoeditingcontext)
arrayFaultWithSourceGlobalID
in class EOEditingContext
public void initializeObject(EOEnterpriseObject eoenterpriseobject, EOGlobalID eoglobalid, EOEditingContext eoeditingcontext)
initializeObject
in class EOEditingContext
public void editingContextDidForgetObjectWithGlobalID(EOEditingContext eoeditingcontext, EOGlobalID eoglobalid)
editingContextDidForgetObjectWithGlobalID
in class EOEditingContext
public NSArray objectsForSourceGlobalID(EOGlobalID eoglobalid, String s, EOEditingContext eoeditingcontext)
objectsForSourceGlobalID
in class EOEditingContext
public void refaultObject(EOEnterpriseObject eoenterpriseobject)
refaultObject
in class EOEditingContext
public void refaultObject(EOEnterpriseObject eoenterpriseobject, EOGlobalID eoglobalid, EOEditingContext eoeditingcontext)
refaultObject
in class EOEditingContext
public NSArray objectsWithFetchSpecification(EOFetchSpecification fs, EOEditingContext eoeditingcontext)
objectsWithFetchSpecification
in class EOEditingContext
public void saveChangesInEditingContext(EOEditingContext eoeditingcontext)
saveChangesInEditingContext
in class EOEditingContext
public void refaultAllObjects()
refaultAllObjects
in class EOEditingContext
public void invalidateObjectsWithGlobalIDs(NSArray nsarray)
invalidateObjectsWithGlobalIDs
in class EOEditingContext
public void invalidateAllObjects()
invalidateAllObjects
in class EOEditingContext
public void lockObject(EOEnterpriseObject eoenterpriseobject)
lockObject
in class EOEditingContext
public void revert()
revert
in class EOEditingContext
public void refreshObject(EOEnterpriseObject eoenterpriseobject)
refreshObject
in class EOEditingContext
public void undo()
undo
in class EOEditingContext
public void redo()
redo
in class EOEditingContext
public Object invokeRemoteMethod(EOEditingContext eoeditingcontext, EOGlobalID eoglobalid, String s, Class[] aclass, Object[] aobj)
invokeRemoteMethod
in class EOEditingContext
public void _objectsChangedInStore(NSNotification nsnotification)
_objectsChangedInStore
in class EOEditingContext
public void _processObjectStoreChanges(NSDictionary info)
_processObjectStoreChanges
in class EOEditingContext
public void processQueuedNotificationsNotification(NSNotification n)
public void setDelegate(Object d)
setDelegate
in class EOEditingContext
public static ERXEC.Factory _factory()
public static void setFactory(ERXEC.Factory aFactory)
aFactory
- factory used to create editing contextspublic static EOEditingContext newEditingContext()
public static EOEditingContext newTolerantEditingContext(EOObjectStore parent, boolean retry, boolean merge)
parent
- the parent object storeretry
- true if the ec should retry on failed savemerge
- true if ec changes should be mergedpublic static EOEditingContext newTolerantEditingContext()
public static EOEditingContext newTolerantEditingContext(EOObjectStore osc)
public static void saveChangesTolerantly(EOEditingContext ec, boolean doesRetry, boolean mergesChanges)
public static void saveChangesTolerantly(EOEditingContext ec)
public static EOEditingContext newEditingContext(EOObjectStore parent, boolean validationEnabled)
Note:
an EOEditingContext
is
a subclass of EOObjectStore so passing in another editing context to this
method is completely kosher.
parent
- object store for the newly created editing context.validationEnabled
- determines if the editing context should perform validationpublic static EOEditingContext newEditingContext(boolean validation)
validation
- flag that determines if validation should or should not be
enabled.public static EOEditingContext newEditingContext(EOObjectStore objectStore)
Note: an EOEditingContext
is
a subclass of EOObjectStore so passing in another editing context to this
method is completely kosher.
objectStore
- parent object store for the newly created editing context.public static void registerOpenEditingContextLockSignalHandler()
public static void registerOpenEditingContextLockSignalHandler(String signalName)
signalName
- the name of the signal to handlepublic static String outstandingLockDescription()
Copyright © 2002 – 2024 Project Wonder.