Class: NSPropertyDescription
Overview
The NSPropertyDescription class is used to define properties of an entity in a Core Data managed object model. Properties are to entities what instance variables are to classes.
Direct Known Subclasses
NSAttributeDescription, NSExpressionDescription, NSFetchedPropertyDescription, NSRelationshipDescription
Instance Method Summary (collapse)
-
- entity
Returns the entity description of the receiver.
-
- isIndexed
Returns a Boolean value that indicates whether the receiver is important for searching.
-
- isIndexedBySpotlight
Returns a Boolean value that indicates whether the property should be indexed by Spotlight.
-
- isOptional
Returns a Boolean value that indicates whether the receiver is optional.
-
- isStoredInExternalRecord
Returns a Boolean value that indicates whether the property data should be written out in an external record file corresponding to the managed object.
-
- isTransient
Returns a Boolean value that indicates whether the receiver is transient.
-
- name
Returns the name of the receiver.
-
- renamingIdentifier
Returns the renaming identifier for the receiver.
-
- setIndexed:
Sets the optionality flag of the receiver.
-
- setIndexedBySpotlight:
Sets whether the property should be indexed by Spotlight.
-
- setName:
Sets the name of the receiver.
-
- setOptional:
Sets the optionality flag of the receiver.
-
- setRenamingIdentifier:
Sets the renaming identifier for the receiver.
-
- setStoredInExternalRecord:
Sets whether the data should be written out in an external record file corresponding to the managed object.
-
- setTransient:
Sets the transient flag of the receiver.
-
- setUserInfo:
Sets the user info dictionary of the receiver.
-
- setValidationPredicates:withValidationWarnings:
Sets the validation predicates and warnings of the receiver.
-
- setVersionHashModifier:
Sets the version hash modifier for the receiver.
-
- userInfo
Returns the user info dictionary of the receiver.
-
- validationPredicates
Returns the validation predicates of the receiver.
-
- validationWarnings
Returns the error strings associated with the receiver’s validation predicates.
-
- versionHash
Returns the version hash for the receiver.
-
- versionHashModifier
Returns the version hash modifier 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
- (NSEntityDescription) entity
Returns the entity description of the receiver.
- (Boolean) isIndexed
Returns a Boolean value that indicates whether the receiver is important for searching. Object stores can optionally use this information upon store creation for operations such as defining indexes.
- (Boolean) isIndexedBySpotlight
Returns a Boolean value that indicates whether the property should be indexed by Spotlight. For details, see Core Data Spotlight Integration Programming Guide.
- (Boolean) isOptional
Returns a Boolean value that indicates whether the receiver is optional.
- (Boolean) isStoredInExternalRecord
Returns a Boolean value that indicates whether the property data should be written out in an external record file corresponding to the managed object. For details, see Core Data Spotlight Integration Programming Guide.
- (Boolean) isTransient
Returns a Boolean value that indicates whether the receiver is transient.
- (String) name
Returns the name of the receiver.
- (String) renamingIdentifier
Returns the renaming identifier for the receiver. This is used to resolve naming conflicts between models. When creating an entity mapping between entities in two managed object models, a source entity property and a destination entity property that share the same identifier indicate that a property mapping should be configured to migrate from the source to the destination. If unset, the identifier will return the property's name.
- (Object) setIndexed(flag)
Sets the optionality flag of the receiver. Object stores can optionally use this information upon store creation for operations such as defining indexes.
- (Object) setIndexedBySpotlight(flag)
Sets whether the property should be indexed by Spotlight. For details, see Core Data Spotlight Integration Programming Guide.
- (Object) setName(name)
Sets the name of the receiver.
- (Object) setOptional(flag)
Sets the optionality flag of the receiver. The optionality flag specifies whether a property’s value can be nil before an object can be saved to a persistent store.
- (Object) setRenamingIdentifier(value)
Sets the renaming identifier for the receiver. See renamingIdentifier for a full discussion.
- (Object) setStoredInExternalRecord(flag)
Sets whether the data should be written out in an external record file corresponding to the managed object. For details, see Core Data Spotlight Integration Programming Guide.
- (Object) setTransient(flag)
Sets the transient flag of the receiver. The transient flag specifies whether or not a property’s value is ignored when an object is saved to a persistent store. Transient properties are not saved to the persistent store, but are still managed for undo, redo, validation, and so on.
- (Object) setUserInfo(dictionary)
Sets the user info dictionary of the receiver.
- (Object) setValidationPredicates(validationPredicates, withValidationWarnings:validationWarnings)
Sets the validation predicates and warnings of the receiver. The validationPredicates and validationWarnings arrays should contain the same number of elements, and corresponding elements should appear at the same index in each array.Instead of implementing individual validation methods, you can use this method to provide a list of predicates that are evaluated against the managed objects and a list of corresponding error messages (which can be localized).
- (Object) setVersionHashModifier(modifierString)
Sets the version hash modifier for the receiver. See versionHashModifier for a full discussion.
- (Hash) userInfo
Returns the user info dictionary of the receiver.
- (Array) validationPredicates
Returns the validation predicates of the receiver.
- (Array) validationWarnings
Returns the error strings associated with the receiver’s validation predicates.
- (NSData) versionHash
Returns the version hash for the receiver. The version hash is used to uniquely identify a property based on its configuration. The version hash uses only values which affect the persistence of data and the user-defined versionHashModifier value. (The values which affect persistence are the name of the property, and the flags for isOptional, isTransient, and isReadOnly.) This value is stored as part of the version information in the metadata for stores, as well as a definition of a property involved in an NSPropertyMapping object.
- (String) versionHashModifier
Returns the version hash modifier for the receiver. This value is included in the version hash for the property. You use it to mark or denote a property as being a different “version” than another even if all of the values which affect persistence are equal. (Such a difference is important in cases where the attributes of a property are unchanged but the format or content of its data are changed.)This value is included in the version hash for the property.