net.wotonomy.control
Class EOGenericRecord

java.lang.Object
  extended by net.wotonomy.control.EOCustomObject
      extended by net.wotonomy.control.EOGenericRecord
All Implemented Interfaces:
EODeferredFaulting, EOEnterpriseObject, EOFaulting, EOKeyValueCoding, EOKeyValueCodingAdditions, EORelationshipManipulation, EOValidation, net.wotonomy.foundation.NSKeyValueCoding, net.wotonomy.foundation.NSKeyValueCodingAdditions

public class EOGenericRecord
extends EOCustomObject

EOGenericRecord extends EOCustomObject to provide a general-purpose implementation, relying entirely on the class description for entity-specific behavior, and storing data in a dictionary.

Version:
$Revision: 894 $
Author:
michael@mpowers.net, $Author: cgruber $

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.wotonomy.control.EOKeyValueCodingAdditions
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
 
Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding
net.wotonomy.foundation.NSKeyValueCoding.Null
 
Nested classes/interfaces inherited from interface net.wotonomy.foundation.NSKeyValueCoding
net.wotonomy.foundation.NSKeyValueCoding.Null
 
Field Summary
 
Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding
NullValue
 
Fields inherited from interface net.wotonomy.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
protected EOGenericRecord()
          Default constructor.
  EOGenericRecord(EOClassDescription aDescription)
          Preferred constructor.
  EOGenericRecord(EOEditingContext aContext, EOClassDescription aDescription, EOGlobalID anID)
          Compatibility constructor: aContext and anID are ignored.
 
Method Summary
 EOClassDescription classDescription()
          Returns a class description for this object.
 java.lang.Object storedValueForKey(java.lang.String aKey)
          Calls willRead for the specified key, and returns the corresponding value from the data dictionary.
 void takeStoredValueForKey(java.lang.Object aValue, java.lang.String aKey)
          Writes the specified value into the data dictionary for the specified key.
 void takeValueForKey(java.lang.Object aValue, java.lang.String aKey)
          Calls willChange and then calls takeStoredValueForKey.
static boolean usesDeferredFaultCreation()
          Overridden to return true so that deferred faults are used.
 java.lang.Object valueForKey(java.lang.String aKey)
          Calls storedValueForKey.
 
Methods inherited from class net.wotonomy.control.EOCustomObject
addObjectToBothSidesOfRelationshipWithKey, addObjectToPropertyWithKey, allPropertyKeys, attributeKeys, awakeFromFetch, awakeFromInsertion, canAccessFieldsDirectly, changesFromSnapshot, classDescriptionForDestinationKey, clearFault, clearProperties, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, faultHandler, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, inverseForRelationshipKey, isFault, isToManyKey, ownsDestinationObjectsForRelationshipKey, propagateDeleteWithEditingContext, reapplyChangesFromDictionary, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey, shouldUseStoredAccessors, snapshot, takeValueForKeyPath, takeValuesFromDictionary, toManyRelationshipKeys, toOneRelationshipKeys, turnIntoFault, unableToSetNullForKey, updateFromSnapshot, userPresentableDescription, validateForDelete, validateForInsert, validateForSave, validateForUpdate, valueForKeyPath, valuesForKeys, willChange, willRead, willRead, willReadRelationship
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EOGenericRecord

protected EOGenericRecord()
Default constructor.


EOGenericRecord

public EOGenericRecord(EOClassDescription aDescription)
Preferred constructor.


EOGenericRecord

public EOGenericRecord(EOEditingContext aContext,
                       EOClassDescription aDescription,
                       EOGlobalID anID)
Compatibility constructor: aContext and anID are ignored.

Method Detail

usesDeferredFaultCreation

public static boolean usesDeferredFaultCreation()
Overridden to return true so that deferred faults are used.


classDescription

public EOClassDescription classDescription()
Returns a class description for this object. Overridden to return the class description passed into the constructor.

Specified by:
classDescription in interface EOEnterpriseObject
Overrides:
classDescription in class EOCustomObject

valueForKey

public java.lang.Object valueForKey(java.lang.String aKey)
Calls storedValueForKey.

Specified by:
valueForKey in interface EOKeyValueCoding
Specified by:
valueForKey in interface net.wotonomy.foundation.NSKeyValueCoding
Overrides:
valueForKey in class EOCustomObject

takeValueForKey

public void takeValueForKey(java.lang.Object aValue,
                            java.lang.String aKey)
Calls willChange and then calls takeStoredValueForKey.

Specified by:
takeValueForKey in interface EOKeyValueCoding
Specified by:
takeValueForKey in interface net.wotonomy.foundation.NSKeyValueCoding
Overrides:
takeValueForKey in class EOCustomObject

storedValueForKey

public java.lang.Object storedValueForKey(java.lang.String aKey)
Calls willRead for the specified key, and returns the corresponding value from the data dictionary. Keys that do not exist will return null.

Specified by:
storedValueForKey in interface EOKeyValueCoding
Specified by:
storedValueForKey in interface net.wotonomy.foundation.NSKeyValueCoding
Overrides:
storedValueForKey in class EOCustomObject

takeStoredValueForKey

public void takeStoredValueForKey(java.lang.Object aValue,
                                  java.lang.String aKey)
Writes the specified value into the data dictionary for the specified key. Nulls are stored as NSNulls in the dictionary. No checking is performed to determine whether the key is a valid attribute key.

Specified by:
takeStoredValueForKey in interface EOKeyValueCoding
Specified by:
takeStoredValueForKey in interface net.wotonomy.foundation.NSKeyValueCoding
Overrides:
takeStoredValueForKey in class EOCustomObject


Copyright © 2006 null. All Rights Reserved.