|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.wotonomy.control.EOObjectStore
net.wotonomy.control.EOCooperatingObjectStore
net.wotonomy.access.EODatabaseContext
public class EODatabaseContext
| Field Summary | |
|---|---|
protected net.wotonomy.foundation.NSMutableArray |
_channels
|
protected EOAdaptorContext |
_context
|
protected EOObjectStoreCoordinator |
_coordinator
|
protected EOEditingContext |
_currEC
|
protected EODatabase |
_database
|
protected net.wotonomy.foundation.NSMutableArray |
_lockedObjects
|
protected net.wotonomy.foundation.NSMutableDictionary |
_manySnaps
|
protected net.wotonomy.foundation.NSMutableDictionary |
_simpleSnaps
|
protected int |
_updateStrategy
|
| Fields inherited from class net.wotonomy.control.EOObjectStore |
|---|
DeletedKey, InsertedKey, InvalidatedAllObjectsInStoreNotification, InvalidatedKey, ObjectsChangedInStoreNotification, UpdatedKey |
| Fields inherited from interface net.wotonomy.foundation.NSLocking |
|---|
OneCentury, OneDay, OneHour, OneMinute, OneSecond, OneWeek, OneYear |
| Constructor Summary | |
|---|---|
EODatabaseContext(EODatabase database)
|
|
| Method Summary | |
|---|---|
EOAdaptorContext |
adaptorContext()
|
net.wotonomy.foundation.NSArray |
arrayFaultWithSourceGlobalID(EOGlobalID gid,
java.lang.String relName,
EOEditingContext ec)
Returns a List of objects associated with the object with the specified id for the specified property relationship, or may return a placeholder array that will defer the fetch until accessed (an array fault). |
EODatabaseChannel |
availableChannel()
|
void |
batchFetchRelationship(EORelationship rel,
net.wotonomy.foundation.NSArray arr,
EOEditingContext ec)
|
void |
commitChanges()
|
static java.lang.Class |
contextClassToRegister()
|
EOObjectStoreCoordinator |
coordinator()
|
EODatabase |
database()
|
void |
editingContextDidForgetObjectWithGlobalID(EOEditingContext ec,
EOGlobalID gid)
Called by editing contexts when they no longer need to track the specified id. |
java.lang.Object |
faultForGlobalID(EOGlobalID gid,
EOEditingContext ec)
Returns the object for the specified id. |
java.lang.Object |
faultForRawRow(java.util.Map row,
java.lang.String entityName,
EOEditingContext ec)
Returns a fault representing an object of the specified entity type with values from the specified dictionary. |
void |
forgetSnapshotForGlobalID(EOGlobalID gid)
|
void |
forgetSnapshotsForGlobalIDs(java.util.List gids)
|
void |
handleDroppedConnection()
|
boolean |
handlesFetchSpecification(EOFetchSpecification fspec)
|
boolean |
hasBusyChannels()
|
void |
initializeObject(java.lang.Object eo,
EOGlobalID gid,
EOEditingContext ec)
Given a newly instantiated object, this method initializes its properties to values appropriate for the specified id. |
void |
invalidateAllObjects()
Remove all values from all objects in memory, turning them into faults, and posts an NSNotification that all objects have been invalidated. |
void |
invalidateObjectsWithGlobalIDs(java.util.List aList)
Removes values with the specified ids from memory, turning them into faults, and posts a notification that those objects have been invalidated. |
boolean |
isObjectLockedWithGlobalID(EOGlobalID gid)
|
boolean |
isObjectLockedWithGlobalID(EOGlobalID gid,
EOEditingContext ec)
Returns whether the object corresponding to the specified id is locked. |
void |
lock()
|
void |
lockObjectWithGlobalID(EOGlobalID gid,
EOEditingContext ec)
Locks the object corresponding to the specified id is locked. |
net.wotonomy.foundation.NSArray |
objectsForSourceGlobalID(EOGlobalID gid,
java.lang.String relationName,
EOEditingContext ec)
Returns a List of objects associated with the object with the specified id for the specified property relationship. |
net.wotonomy.foundation.NSArray |
objectsWithFetchSpecification(EOFetchSpecification fspec,
EOEditingContext ec)
Returns a List of objects the meet the criteria of the supplied specification. |
boolean |
ownsGlobalID(EOGlobalID gid)
|
boolean |
ownsObject(EOEnterpriseObject eo)
|
void |
performChanges()
|
void |
prepareForSaveWithCoordinator(EOObjectStoreCoordinator coord,
EOEditingContext ec)
|
void |
recordChangesInEditingContext()
|
void |
recordSnapshotForGlobalID(net.wotonomy.foundation.NSDictionary snap,
EOGlobalID gid)
|
void |
recordSnapshotForSourceGlobalID(net.wotonomy.foundation.NSArray gids,
EOGlobalID gid,
java.lang.String relationName)
|
void |
recordSnapshots(net.wotonomy.foundation.NSDictionary snaps)
|
void |
recordToManySnapshots(net.wotonomy.foundation.NSDictionary snaps)
|
void |
recordUpdateForObject(EOEnterpriseObject eo,
net.wotonomy.foundation.NSDictionary changes)
|
void |
refaultObject(java.lang.Object obj,
EOGlobalID gid,
EOEditingContext ec)
Removes all values from the specified object, converting it into a fault for the specified id. |
void |
registerChannel(EODatabaseChannel channel)
|
net.wotonomy.foundation.NSArray |
registeredChannels()
|
void |
rollbackChanges()
|
void |
saveChangesInEditingContext(EOEditingContext ec)
Writes all changes in the specified editing context to the respository. |
static void |
setContextClassToRegister(java.lang.Class contextClass)
|
void |
setUpdateStrategy(int strategy)
|
net.wotonomy.foundation.NSDictionary |
snapshotForGlobalID(EOGlobalID gid)
|
net.wotonomy.foundation.NSArray |
snapshotForSourceGlobalID(EOGlobalID gid,
java.lang.String name)
|
void |
unlock()
|
void |
unregisterChannel(EODatabaseChannel channel)
|
int |
updateStrategy()
|
net.wotonomy.foundation.NSDictionary |
valuesForKeys(net.wotonomy.foundation.NSArray keys,
EOEnterpriseObject eo)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected EODatabase _database
protected EOAdaptorContext _context
protected net.wotonomy.foundation.NSMutableArray _channels
protected net.wotonomy.foundation.NSMutableArray _lockedObjects
protected net.wotonomy.foundation.NSMutableDictionary _simpleSnaps
protected net.wotonomy.foundation.NSMutableDictionary _manySnaps
protected EOObjectStoreCoordinator _coordinator
protected EOEditingContext _currEC
protected int _updateStrategy
| Constructor Detail |
|---|
public EODatabaseContext(EODatabase database)
| Method Detail |
|---|
public EOAdaptorContext adaptorContext()
public EODatabase database()
public EODatabaseChannel availableChannel()
public void batchFetchRelationship(EORelationship rel,
net.wotonomy.foundation.NSArray arr,
EOEditingContext ec)
public static void setContextClassToRegister(java.lang.Class contextClass)
public static java.lang.Class contextClassToRegister()
public EOObjectStoreCoordinator coordinator()
public void editingContextDidForgetObjectWithGlobalID(EOEditingContext ec,
EOGlobalID gid)
EOObjectStore
editingContextDidForgetObjectWithGlobalID in class EOObjectStorepublic void handleDroppedConnection()
public boolean ownsGlobalID(EOGlobalID gid)
ownsGlobalID in class EOCooperatingObjectStorepublic boolean ownsObject(EOEnterpriseObject eo)
ownsObject in class EOCooperatingObjectStorepublic boolean handlesFetchSpecification(EOFetchSpecification fspec)
handlesFetchSpecification in class EOCooperatingObjectStorepublic boolean hasBusyChannels()
public void prepareForSaveWithCoordinator(EOObjectStoreCoordinator coord,
EOEditingContext ec)
prepareForSaveWithCoordinator in class EOCooperatingObjectStorepublic void recordChangesInEditingContext()
recordChangesInEditingContext in class EOCooperatingObjectStore
public void recordUpdateForObject(EOEnterpriseObject eo,
net.wotonomy.foundation.NSDictionary changes)
recordUpdateForObject in class EOCooperatingObjectStore
public void recordSnapshotForGlobalID(net.wotonomy.foundation.NSDictionary snap,
EOGlobalID gid)
public void recordSnapshotForSourceGlobalID(net.wotonomy.foundation.NSArray gids,
EOGlobalID gid,
java.lang.String relationName)
public void recordSnapshots(net.wotonomy.foundation.NSDictionary snaps)
public void recordToManySnapshots(net.wotonomy.foundation.NSDictionary snaps)
public void performChanges()
performChanges in class EOCooperatingObjectStorepublic void commitChanges()
commitChanges in class EOCooperatingObjectStorepublic void rollbackChanges()
rollbackChanges in class EOCooperatingObjectStore
public net.wotonomy.foundation.NSDictionary valuesForKeys(net.wotonomy.foundation.NSArray keys,
EOEnterpriseObject eo)
valuesForKeys in class EOCooperatingObjectStorepublic void lock()
lock in interface net.wotonomy.foundation.NSLockinglock in class EOCooperatingObjectStorepublic void unlock()
unlock in interface net.wotonomy.foundation.NSLockingunlock in class EOCooperatingObjectStore
public net.wotonomy.foundation.NSArray arrayFaultWithSourceGlobalID(EOGlobalID gid,
java.lang.String relName,
EOEditingContext ec)
EOObjectStore
arrayFaultWithSourceGlobalID in class EOObjectStore
public java.lang.Object faultForGlobalID(EOGlobalID gid,
EOEditingContext ec)
EOObjectStore
faultForGlobalID in class EOObjectStore
public java.lang.Object faultForRawRow(java.util.Map row,
java.lang.String entityName,
EOEditingContext ec)
EOObjectStore
faultForRawRow in class EOObjectStorepublic void forgetSnapshotForGlobalID(EOGlobalID gid)
public void forgetSnapshotsForGlobalIDs(java.util.List gids)
public void initializeObject(java.lang.Object eo,
EOGlobalID gid,
EOEditingContext ec)
EOObjectStore
initializeObject in class EOObjectStorepublic void invalidateAllObjects()
EOObjectStore
invalidateAllObjects in class EOObjectStorepublic void invalidateObjectsWithGlobalIDs(java.util.List aList)
EOObjectStore
invalidateObjectsWithGlobalIDs in class EOObjectStore
public boolean isObjectLockedWithGlobalID(EOGlobalID gid,
EOEditingContext ec)
EOObjectStore
isObjectLockedWithGlobalID in class EOObjectStorepublic boolean isObjectLockedWithGlobalID(EOGlobalID gid)
public void lockObjectWithGlobalID(EOGlobalID gid,
EOEditingContext ec)
EOObjectStore
lockObjectWithGlobalID in class EOObjectStore
public net.wotonomy.foundation.NSArray objectsForSourceGlobalID(EOGlobalID gid,
java.lang.String relationName,
EOEditingContext ec)
EOObjectStore
objectsForSourceGlobalID in class EOObjectStore
public net.wotonomy.foundation.NSArray objectsWithFetchSpecification(EOFetchSpecification fspec,
EOEditingContext ec)
EOObjectStore
objectsWithFetchSpecification in class EOObjectStore
public void refaultObject(java.lang.Object obj,
EOGlobalID gid,
EOEditingContext ec)
EOObjectStore
refaultObject in class EOObjectStorepublic void saveChangesInEditingContext(EOEditingContext ec)
EOObjectStore
saveChangesInEditingContext in class EOObjectStorepublic void registerChannel(EODatabaseChannel channel)
public void unregisterChannel(EODatabaseChannel channel)
public net.wotonomy.foundation.NSArray registeredChannels()
public net.wotonomy.foundation.NSDictionary snapshotForGlobalID(EOGlobalID gid)
public net.wotonomy.foundation.NSArray snapshotForSourceGlobalID(EOGlobalID gid,
java.lang.String name)
public void setUpdateStrategy(int strategy)
public int updateStrategy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||