Class: NSAttributeDescription

Inherits:
NSPropertyDescription show all

Overview

The NSAttributeDescription class is used to describe attributes of an entity described by an instance of NSEntityDescription.

Instance Method Summary (collapse)

Methods inherited from NSPropertyDescription

#entity, #isIndexed, #isIndexedBySpotlight, #isOptional, #isStoredInExternalRecord, #isTransient, #name, #renamingIdentifier, #setIndexed:, #setIndexedBySpotlight:, #setName:, #setOptional:, #setRenamingIdentifier:, #setStoredInExternalRecord:, #setTransient:, #setUserInfo:, #setValidationPredicates:withValidationWarnings:, #setVersionHashModifier:, #userInfo, #validationPredicates, #validationWarnings, #versionHashModifier

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

- (Boolean) allowsExternalBinaryDataStorage

Returns a Boolean value that indicates whether the attribute allows external binary storage. If this value is YES, the corresponding attribute may be stored in a file external to the persistent store itself.

Returns:

  • (Boolean)

    YES if the attribute allows external binary storage, otherwise NO.

- (NSAttributeType) attributeType

Returns the type of the receiver.

Returns:

- (String) attributeValueClassName

Returns the name of the class used to represent the receiver.

Returns:

  • (String)

    The name of the class used to represent the receiver, as a string.

- (Object) defaultValue

Returns the default value of the receiver.

Returns:

  • (Object)

    The default value of the receiver.

- (Object) setAllowsExternalBinaryDataStorage(flag)

Sets whether the atribute allows

Parameters:

  • flag (Boolean)

    A Boolean value that indicates whether the attribute should allow external binary storage.

Returns:

- (Object) setAttributeType(type)

Sets the type of the receiver.

Parameters:

Returns:

- (Object) setAttributeValueClassName(className)

Sets the name of the class used to represent the receiver. If you set the value class name, Core Data can check the class of any instance set as the value of an attribute.

Parameters:

  • className (String)

    The name of the class used to represent the receiver.

Returns:

- (Object) setDefaultValue(value)

Sets the default value of the receiver. Default values are retained by a managed object model, not copied. This means that attribute values do not have to implement the NSCopying protocol, however it also means that you should not modify any objects after they have been set as default values.

Parameters:

  • value (Object)

    The default value for the receiver.

Returns:

- (Object) setValueTransformerName(string)

Sets the name of the transformer to use to transform the attribute value. The receiver must be an attribute of type NSTransformedAttributeType.If this value is not set, or is set to nil, Core Data will default to using a transformer which uses NSCoding to archive and unarchive the attribute value.

Parameters:

  • string (String)

    The name of the transformer to use to transform the attribute value. The transformer must output an NSData object from transformedValue: and must allow reverse transformations.

Returns:

- (String) valueTransformerName

Returns the name of the transformer used to transform the attribute value. The receiver must be an attribute of type NSTransformedAttributeType.

Returns:

  • (String)

    The name of the transformer used to transform the attribute value.

- (NSData) versionHash

Returns the version hash for the receiver. The version hash is used to uniquely identify an attribute based on its configuration. This value includes the versionHash information from NSPropertyDescription and the attribute type.

Returns:

  • (NSData)

    The version hash for the receiver.