COObject categories documentation
COCollectionTypeQuerying
COObject (COCollectionTypeQuerying)COSerialization
COObject (COSerialization)Overview
COObjectGraphContext uses -storeItem to serialize a COObject into a COItem, and -setStoreItem: to deserialize in the reverse way.
For debugging a serialization/deserialization cycle, see -roundTripValueForProperty: .
NOTE: The rest of the API is unstable and incomplete.
Default
- - (COItem *) storeItem
The receiver serialized representation.
-storeItem is used to serialize a COObject state and -setStoreItem: to deserialize a COObject state. COObjectGraphContext will call these accessors respectively at commit and loading times.
At the end of -setStoreItem: -awakeFromDeserialization is called to recreate additional internal state based on the deserialization result. You must not touch and attempt to access or recreated relationships during -awakeFromDeserialization . For relationship restoration, you can implement -didLoadObjectGraph .
-storeItem is also useful to inspect the serialized representation that goes into the store.
- - (void) setStoreItem: (COItem *)storeItem
The receiver serialized representation.
-storeItem is used to serialize a COObject state and -setStoreItem: to deserialize a COObject state. COObjectGraphContext will call these accessors respectively at commit and loading times.
At the end of -setStoreItem: -awakeFromDeserialization is called to recreate additional internal state based on the deserialization result. You must not touch and attempt to access or recreated relationships during -awakeFromDeserialization . For relationship restoration, you can implement -didLoadObjectGraph .
-storeItem is also useful to inspect the serialized representation that goes into the store.
Querying Serialization Types
Serialization
- - (id) serializedTypeForPropertyDescription: (ETPropertyDescription *)aPropertyDesc value: (id)value
- Description forthcoming.
- - (COItem *) storeItemWithUUID: (ETUUID *)aUUID types: (NSMutableDictionary *)types values: (NSMutableDictionary *)values entityName: (NSString *)anEntityName
- Description forthcoming.
- - (COItem *) additionalStoreItemForUUID: (ETUUID *)anItemUUID
- Description forthcoming.
Deserialization
- - (id) valueForSerializedValue: (id)value ofType: (COType)type propertyDescription: (ETPropertyDescription *)aPropertyDesc
- Description forthcoming.
- - (void) validateStoreItem: (COItem *)aStoreItem
- Description forthcoming.
Testing
- - (id) roundTripValueForProperty: (NSString *)key
Serializes the property value into the CoreObject serialized representation, then unserialize it back into a value that can be passed -setSerializedValue:forPropertyDescription:.
The property value is retrieved with -serializedValueForPropertyDescription:, serialized using -serializedValueForValue: and deserialized using -valueForSerializedValue:ofType:propertyDescription:.