Class: NSEntityMapping
Overview
Instances of NSEntityMapping specify how to map an entity from a source to a destination managed object model.
Instance Method Summary (collapse)
-
- attributeMappings
Returns the array of attribute mappings for the receiver.
-
- destinationEntityName
Returns the destination entity name for the receiver.
-
- destinationEntityVersionHash
Returns the version hash for the destination entity for the receiver.
-
- entityMigrationPolicyClassName
Returns the class name of the migration policy for the receiver.
-
- mappingType
Returns the mapping type for the receiver.
-
- name
Returns the name of the receiver.
-
- relationshipMappings
Returns the array of relationship mappings for the receiver.
-
- setAttributeMappings:
Sets the array of attribute mappings for the receiver.
-
- setDestinationEntityName:
Sets the destination entity name for the receiver.
-
- setDestinationEntityVersionHash:
Sets the version hash for the destination entity for the receiver.
-
- setEntityMigrationPolicyClassName:
Sets the class name of the migration policy for the receiver.
-
- setMappingType:
Sets the mapping type for the receiver.
-
- setName:
Sets the name of the receiver.
-
- setRelationshipMappings:
Sets the array of relationship mappings for the receiver.
-
- setSourceEntityName:
Sets the source entity name for the receiver.
-
- setSourceEntityVersionHash:
Sets the version hash for the source entity for the receiver.
-
- setSourceExpression:
Sets the source expression for the receiver.
-
- setUserInfo:
Sets the user info dictionary for the receiver.
-
- sourceEntityName
Returns the source entity name for the receiver.
-
- sourceEntityVersionHash
Returns the version hash for the source entity for the receiver.
-
- sourceExpression
Returns the source expression for the receiver.
-
- userInfo
Returns the user info dictionary for the receiver.
Methods inherited from NSObject
#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version
Constructor Details
This class inherits a constructor from NSObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class NSObject
Instance Method Details
- (Array) attributeMappings
Returns the array of attribute mappings for the receiver.
- (String) destinationEntityName
Returns the destination entity name for the receiver. Mappings are not directly bound to entity descriptions. You can use the migration manager’s destinationEntityForEntityMapping: method to retrieve the entity description for this entity name.
- (NSData) destinationEntityVersionHash
Returns the version hash for the destination entity for the receiver. The version hash is calculated by Core Data based on the property values of the entity (see NSEntityDescription’s versionHash method). The destinationEntityVersionHash must equal the version hash of the destination entity represented by the mapping.
- (String) entityMigrationPolicyClassName
Returns the class name of the migration policy for the receiver. If not specified, the default migration class name is NSEntityMigrationPolicy. You can specify a subclass to provide custom behavior.
- (NSEntityMappingType) mappingType
Returns the mapping type for the receiver.
- (String) name
Returns the name of the receiver. The name is used only as a means of distinguishing mappings in a model. If not specified, the value defaults to SOURCE->DESTINATION.
- (Array) relationshipMappings
Returns the array of relationship mappings for the receiver.
- (Object) setAttributeMappings(mappings)
Sets the array of attribute mappings for the receiver.
- (Object) setDestinationEntityName(name)
Sets the destination entity name for the receiver.
- (Object) setDestinationEntityVersionHash(vhash)
Sets the version hash for the destination entity for the receiver.
- (Object) setEntityMigrationPolicyClassName(name)
Sets the class name of the migration policy for the receiver.
- (Object) setMappingType(type)
Sets the mapping type for the receiver. If you specify a custom entity mapping type, you must specify a value for the migration policy class name as well (see setEntityMigrationPolicyClassName:).
- (Object) setName(name)
Sets the name of the receiver.
- (Object) setRelationshipMappings(mappings)
Sets the array of relationship mappings for the receiver.
- (Object) setSourceEntityName(name)
Sets the source entity name for the receiver.
- (Object) setSourceEntityVersionHash(vhash)
Sets the version hash for the source entity for the receiver.
- (Object) setSourceExpression(source)
Sets the source expression for the receiver.
- (Object) setUserInfo(dict)
Sets the user info dictionary for the receiver. You can set the contents of the dictionary using the appropriate inspector in the Xcode mapping model editor.
- (String) sourceEntityName
Returns the source entity name for the receiver. Mappings are not directly bound to entity descriptions; you can use the sourceEntityForEntityMapping: method on the migration manager to retrieve the entity description for this entity name.
- (NSData) sourceEntityVersionHash
Returns the version hash for the source entity for the receiver. The version hash is calculated by Core Data based on the property values of the entity (see NSEntityDescription’s versionHash method). The sourceEntityVersionHash must equal the version hash of the source entity represented by the mapping.
- (NSExpression) sourceExpression
Returns the source expression for the receiver. The source expression is used to obtain the collection of managed objects to process through the mapping.
- (Hash) userInfo
Returns the user info dictionary for the receiver. You can use the info dictionary in any way that might be useful in your migration. You set the contents of the dictionary using setUserInfo: or using the appropriate inspector in the Xcode mapping model editor.