Core Data中的对象关系图
2014-07-15 11:14:12 15 举报
core data structure in ios7
作者其他创作
大纲/内容
nameNSString
mom = managedObjectModelmoc = managedObjectContextmo = managedObjectps = persistentStorepsc = persistentStoreCoordinatorQ1: How to get mom from moc:moc---momA1: mom = moc.psc.momQ2: mom--entityA2: [mom.entities objectForKey:entityName]因此在NSEntityDescription中就有一个集合了A1 A2功能的函数:moc-entityentityForName: inManagedObjectContext:Q3:How to create a new mo in certain moc with specified entity:[[NSManagedObject alloc] initWithEntity:insertInToManagedObjectContext:] 同样的,NSEntityDescription中从entityName 到 mo的便利函数是:insertNewObjectForEntityForName:inManagedObjectContext:
cacheNodeSetNSSet
objectIDNSManangedObjectID
objectIDNSManagedObjectID
等价
managedObjectNSManagedObject
managedObjectContextNSManagedObjectContext
value
NSAtomicStoreCacheNode
attributeNSAttributeDescription
URIRepresentationNSURL
父类:NSPersistentStore
存储
辅助存储系统
relationship关系
configurationsNSArray
[managedObject valueForKey: key]
configurationNameNSString
父类:NSPropertyDescription
fetchRequestTemplateForName:NSFetchRequest
entity.properties
cacheNodesNSAtomicStoreCacheNode
properties=[attributesByName allKeys] + [relationshipsByName allKeys]NSArray
allValues
entitiesByNameNSDictionary (value:NSEntityDescription)
atomicStoreNSAtomicStore
persistentStoresNSArray
NSManagedObject
cacheNodeNSAtomicStoreCacheNode
NSAtomicStore
propertyCacheNSMutableDictionary
Two layers inside Core Data
User Code
destinationEntityNSEntityDescription
urlNSURL
propertiesByNameNSDictionary
attributesByNameNSDictionary
relationshipsByNameNSDictionary
entitiesNSArray (NSEntityDescription)
metadataNSDictionary
attributeNameNSString
registeredStoreTypesNSDictionary
persistentStoreCoordinatorNSPersistentStoreCoordinator
managedObjectModelNSManangedObjectModel
NSAtomicStore层对象关系图
key
NSManagedObjectContext
relationshipNameNSString
inverseRelationshipNSRelationshipDescription
objectAtIndex:
attribute属性
persistentStoreNSPersistentStore
managedObjectClassNameNSString
entityNSEntityDescrption
attributeTypeNSAttribute
undoManangerNSUndoManager
relationshipNSRelationshipDescription
0 条评论
回复 删除
下一页