WebObjects 5.2

com.webobjects.eocontrol
Class EOGenericRecord

java.lang.Object
  |
  +--com.webobjects.eocontrol.EOCustomObject
        |
        +--com.webobjects.eocontrol.EOGenericRecord
All Implemented Interfaces:
EODeferredFaulting, EOEnterpriseObject, EOFaulting, EOKeyValueCoding, EOKeyValueCodingAdditions, EORelationshipManipulation, EOValidation, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable

public class EOGenericRecord
extends EOCustomObject

EOGenericRecord is a generic enterprise object class that can be used in place of custom classes when custom behavior is not needed. It implements the EOEnterpriseObject interface to provide the basic enterprise object behavior. An EOGenericRecord object has an EOClassDescription that provides metadata about the generic record, including the name of the entity that the generic record represents and the names of the record's attributes and relationships. A generic record stores its properties in a dictionary using its attribute and relationship names as keys.

In the typical case where applications access a relational database, the EOAccess layer's modeling objects are an important part of how generic records map to database rows. If an EOModel doesn't have a custom enterprise object class defined for a particular entity, an EODatabaseChannel using that model creates EOGenericRecords when fetching objects for that entity from the database server. During this process, the EODatabaseChannel also sets each generic record's class description to an EOEntityClassDescription, providing the link to the record's associated modeling objects. (EOModel, EODatabaseChannel, and EOEntityClassDescription are defined in EOAccess.)

See EOGenericRecordConcepts for more information.

See Also:
EOModel, EODatabaseChannel, EOEntityClassDescription, Serialized Form

Inner classes inherited from class com.webobjects.eocontrol.EOKeyValueCodingAdditions
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCodingAdditions
NSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.Utility
 
Inner classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Inner classes inherited from class com.webobjects.eocontrol.EOKeyValueCoding
EOKeyValueCoding.DefaultImplementation, EOKeyValueCoding.Utility
 
Inner classes inherited from class com.webobjects.foundation.NSValidation
NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
EOGenericRecord()
          Default constructor.
EOGenericRecord(EOClassDescription classDescription)
          Create a new instance and assigns it classDescription
EOGenericRecord(EOEditingContext editingContext, EOClassDescription classDescription, EOGlobalID gid)
          Deprecated. the default or 0 argument constructor should be used instead
 
Method Summary
 EOClassDescription classDescription()
          Returns the EOClassDescription registered for the receiver's class by invoking the EOClassDescription static method classDescriptionForClass.
static boolean usesDeferredFaultCreation()
          Returns true, specifying that EOGenericRecords use deferred faulting.
 
Methods inherited from class com.webobjects.eocontrol.EOCustomObject
addObjectToBothSidesOfRelationshipWithKey, addObjectToPropertyWithKey, allPropertyKeys, attributeKeys, awakeFromClientUpdate, awakeFromFetch, awakeFromInsertion, canAccessFieldsDirectly, changesFromSnapshot, classDescriptionForDestinationKey, clearFault, clearProperties, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, equals, excludeObjectFromPropertyWithKey, faultHandler, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hashCode, includeObjectIntoPropertyWithKey, inverseForRelationshipKey, invokeRemoteMethod, isFault, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, readResolve, reapplyChangesFromDictionary, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey, shouldUseStoredAccessors, snapshot, storedValueForKey, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, toManyRelationshipKeys, toOneRelationshipKeys, toString, turnIntoFault, unableToSetNullForKey, updateFromSnapshot, userPresentableDescription, validateClientUpdate, validateForDelete, validateForInsert, validateForSave, validateForUpdate, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath, valuesForKeys, valuesForKeysWithMapping, willChange, willRead, willReadRelationship
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EOGenericRecord

public EOGenericRecord(EOEditingContext editingContext,
                       EOClassDescription classDescription,
                       EOGlobalID gid)
Deprecated. the default or 0 argument constructor should be used instead


EOGenericRecord

public EOGenericRecord(EOClassDescription classDescription)
Create a new instance and assigns it classDescription
Parameters:
classDescription - Contains the metadata for the EOGenericRecord.

EOGenericRecord

public EOGenericRecord()
Default constructor.
Method Detail

classDescription

public EOClassDescription classDescription()
Description copied from class: EOCustomObject
Returns the EOClassDescription registered for the receiver's class by invoking the EOClassDescription static method classDescriptionForClass.
Overrides:
classDescription in class EOCustomObject
Returns:
the EOClassDescription registered for the receiver's class.

usesDeferredFaultCreation

public static boolean usesDeferredFaultCreation()
Returns true, specifying that EOGenericRecords use deferred faulting. Note that deferred faulting offers performance benefits.
Returns:
true
See Also:
EODeferredFaulting

Last updated Fri Feb 21 13:15:00 PST 2003.

Copyright © 2003 Apple Computer, Inc.