net.wotonomy.test
Class DataObjectStore

java.lang.Object
  extended by net.wotonomy.control.EOObjectStore
      extended by net.wotonomy.test.DataObjectStore

public class DataObjectStore
extends net.wotonomy.control.EOObjectStore

An object store that wraps a datastore for vending test objects.


Field Summary
 
Fields inherited from class net.wotonomy.control.EOObjectStore
DeletedKey, InsertedKey, InvalidatedAllObjectsInStoreNotification, InvalidatedKey, ObjectsChangedInStoreNotification, UpdatedKey
 
Constructor Summary
DataObjectStore(java.lang.String aPath)
          Constructor specifies path to datastore.
 
Method Summary
 net.wotonomy.foundation.NSArray arrayFaultWithSourceGlobalID(net.wotonomy.control.EOGlobalID aGlobalID, java.lang.String aRelationship, net.wotonomy.control.EOEditingContext aContext)
          This implementation returns an appropriately configured array fault.
 java.lang.Object faultForGlobalID(net.wotonomy.control.EOGlobalID aGlobalID, net.wotonomy.control.EOEditingContext aContext)
          This implementation returns the actual object for the specified id.
 java.lang.Object faultForRawRow(java.util.Map aDictionary, java.lang.String anEntityName, net.wotonomy.control.EOEditingContext aContext)
          Returns a fault representing an object of the specified entity type with values from the specified dictionary.
 void initializeObject(java.lang.Object anObject, net.wotonomy.control.EOGlobalID aGlobalID, net.wotonomy.control.EOEditingContext aContext)
          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 a notification 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(net.wotonomy.control.EOGlobalID aGlobalID, net.wotonomy.control.EOEditingContext aContext)
          Returns false because locking is not permitted.
 void lockObjectWithGlobalID(net.wotonomy.control.EOGlobalID aGlobalID, net.wotonomy.control.EOEditingContext aContext)
          Does nothing because locking is not permitted.
 net.wotonomy.foundation.NSArray objectsForSourceGlobalID(net.wotonomy.control.EOGlobalID aGlobalID, java.lang.String aRelationship, net.wotonomy.control.EOEditingContext aContext)
          Returns a List of objects associated with the object with the specified id for the specified property relationship.
 net.wotonomy.foundation.NSArray objectsWithFetchSpecification(net.wotonomy.control.EOFetchSpecification aFetchSpec, net.wotonomy.control.EOEditingContext aContext)
          Returns a List of objects the meet the criteria of the supplied specification.
 void refaultObject(java.lang.Object anObject, net.wotonomy.control.EOGlobalID aGlobalID, net.wotonomy.control.EOEditingContext aContext)
          Removes all values from the specified object, converting it into a fault for the specified id.
 void saveChangesInEditingContext(net.wotonomy.control.EOEditingContext aContext)
          Writes all changes in the specified editing context to the respository.
 
Methods inherited from class net.wotonomy.control.EOObjectStore
editingContextDidForgetObjectWithGlobalID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataObjectStore

public DataObjectStore(java.lang.String aPath)
Constructor specifies path to datastore.

Method Detail

arrayFaultWithSourceGlobalID

public net.wotonomy.foundation.NSArray arrayFaultWithSourceGlobalID(net.wotonomy.control.EOGlobalID aGlobalID,
                                                                    java.lang.String aRelationship,
                                                                    net.wotonomy.control.EOEditingContext aContext)
This implementation returns an appropriately configured array fault.

Specified by:
arrayFaultWithSourceGlobalID in class net.wotonomy.control.EOObjectStore

faultForGlobalID

public java.lang.Object faultForGlobalID(net.wotonomy.control.EOGlobalID aGlobalID,
                                         net.wotonomy.control.EOEditingContext aContext)
This implementation returns the actual object for the specified id.

Specified by:
faultForGlobalID in class net.wotonomy.control.EOObjectStore

faultForRawRow

public java.lang.Object faultForRawRow(java.util.Map aDictionary,
                                       java.lang.String anEntityName,
                                       net.wotonomy.control.EOEditingContext aContext)
Returns a fault representing an object of the specified entity type with values from the specified dictionary. The fault should belong to the specified editing context.

Specified by:
faultForRawRow in class net.wotonomy.control.EOObjectStore

initializeObject

public void initializeObject(java.lang.Object anObject,
                             net.wotonomy.control.EOGlobalID aGlobalID,
                             net.wotonomy.control.EOEditingContext aContext)
Given a newly instantiated object, this method initializes its properties to values appropriate for the specified id. The object should belong to the specified editing context. This method is called to populate faults.

Specified by:
initializeObject in class net.wotonomy.control.EOObjectStore

invalidateAllObjects

public void invalidateAllObjects()
Remove all values from all objects in memory, turning them into faults, and posts a notification that all objects have been invalidated.

Specified by:
invalidateAllObjects in class net.wotonomy.control.EOObjectStore

invalidateObjectsWithGlobalIDs

public 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.

Specified by:
invalidateObjectsWithGlobalIDs in class net.wotonomy.control.EOObjectStore

isObjectLockedWithGlobalID

public boolean isObjectLockedWithGlobalID(net.wotonomy.control.EOGlobalID aGlobalID,
                                          net.wotonomy.control.EOEditingContext aContext)
Returns false because locking is not permitted.

Specified by:
isObjectLockedWithGlobalID in class net.wotonomy.control.EOObjectStore

lockObjectWithGlobalID

public void lockObjectWithGlobalID(net.wotonomy.control.EOGlobalID aGlobalID,
                                   net.wotonomy.control.EOEditingContext aContext)
Does nothing because locking is not permitted.

Specified by:
lockObjectWithGlobalID in class net.wotonomy.control.EOObjectStore

objectsForSourceGlobalID

public net.wotonomy.foundation.NSArray objectsForSourceGlobalID(net.wotonomy.control.EOGlobalID aGlobalID,
                                                                java.lang.String aRelationship,
                                                                net.wotonomy.control.EOEditingContext aContext)
Returns a List of objects associated with the object with the specified id for the specified property relationship. This method may not return an array fault because array faults call this method to fetch on demand. All objects must be registered the specified editing context. The specified relationship key must produce a result of type Collection for the source object or an exception is thrown.

Specified by:
objectsForSourceGlobalID in class net.wotonomy.control.EOObjectStore

objectsWithFetchSpecification

public net.wotonomy.foundation.NSArray objectsWithFetchSpecification(net.wotonomy.control.EOFetchSpecification aFetchSpec,
                                                                     net.wotonomy.control.EOEditingContext aContext)
Returns a List of objects the meet the criteria of the supplied specification. Each object is registered with the specified editing context. If any object is already registered in the specified context, it is not refetched and that object should be used in the array.

Specified by:
objectsWithFetchSpecification in class net.wotonomy.control.EOObjectStore

refaultObject

public void refaultObject(java.lang.Object anObject,
                          net.wotonomy.control.EOGlobalID aGlobalID,
                          net.wotonomy.control.EOEditingContext aContext)
Removes all values from the specified object, converting it into a fault for the specified id. New or deleted objects should not be refaulted.

Specified by:
refaultObject in class net.wotonomy.control.EOObjectStore

saveChangesInEditingContext

public void saveChangesInEditingContext(net.wotonomy.control.EOEditingContext aContext)
Writes all changes in the specified editing context to the respository.

Specified by:
saveChangesInEditingContext in class net.wotonomy.control.EOObjectStore


Copyright © 2006 null. All Rights Reserved.