EOPropertyListEncoding
Adopted by: EOAttribute EOEntity EORelationship EOStoredProcedure
Declared in: EOAccess/EOModelGroup.h
Protocol Description
The EOPropertyListEncoding protocol declares methods that read and write objects to property lists-a dictionary containing only property list data types (that is, NSDictionary objects, NSStrings, NSArray objects, and NSData objects).
Classes that implement this protocol must also initialize their instances with initWithPropertyList:owner:. Objects initialized with initWithPropertyList:owner: are initialized from the provided property list. The owner argument is optional and should be used only by objects requiring a reference to their owner. The newly created object isn't considered fully functional until it receives an awakeWithPropertyList message, which finishes initializing the object. The awakeWithPropertyList invocation should be deferred until after all of the objects identified in the property list have been created.
The method encodeIntoPropertyList: is responsible for encoding the receiver into a property list for later restoration.
This protocol is used to read and write modeling objects (EOModel, EOEntity, EOAttribute, and so on) to a model file.
Instance Methods
awakeWithPropertyList
- (void)awakeWithPropertyList:(NSDictionary
*)propertyList
Finishes initializing the receiver from propertyList, which must have been initialized with initWithPropertyList:owner:.
awakeWithPropertyList is responsible for restoring references to other objects. Consequently, it should not be invoked until all other objects that the receiver might reference have been initialized from propertyList.
encodeIntoPropertyList:
- (void)encodeIntoPropertyList:(NSMutableDictionary
*)propertyList
initWithPropertyList:owner:
- initWithPropertyList:(NSDictionary
*)propertyList
owner:(id)owner