# PartialObject

    public struct PartialObject<O> where O : CoreStoreObject

A `PartialObject` is only used when overriding getters and setters for `CoreStoreObject` properties. Custom getters and setters are implemented as a closure that overrides the default property getter/setter. The closure receives a `PartialObject<O>`, which acts as a fast, type-safe KVC interface for `CoreStoreObject`. The reason a `CoreStoreObject` instance is not passed directly is because the Core Data runtime is not aware of `CoreStoreObject` properties’ static typing, and so loading those info everytime KVO invokes this accessor method incurs a heavy performance hit (especially in KVO-heavy operations such as `ListMonitor` observing.) When accessing the property value from `PartialObject<O>`, make sure to use `PartialObject<O>.persistentValue(for:)` instead of `PartialObject<O>.value(for:)`, which would unintentionally execute the same closure again recursively.

- `completeObject()`

  Returns a the actual `CoreStoreObject` instance for the receiver.

  #### Declaration

  Swift

      public func completeObject() -> O

### Value.Required accessors/mutators

- `value(for:)`

  Returns the value for the property identified by a given key.

  #### Declaration

  Swift

      public func value<V>(for property: (O) -> ValueContainer<O>.Required<V>) -> V where V : ImportableAttributeType

- `setValue(_:for:)`

  Sets the property of the receiver specified by a given key to a given value.

  #### Declaration

  Swift

      public func setValue<V>(_ value: V, for property: (O) -> ValueContainer<O>.Required<V>) where V : ImportableAttributeType

- `primitiveValue(for:)`

  Returns the value for the specified property from the managed object’s private internal storage.

  This method does not invoke the access notification methods (`willAccessValue(forKey:)` and `didAccessValue(forKey:)`). This method is used primarily by subclasses that implement custom accessor methods that need direct access to the receiver’s private storage.

  #### Declaration

  Swift

      public func primitiveValue<V>(for property: (O) -> ValueContainer<O>.Required<V>) -> V where V : ImportableAttributeType

- `setPrimitiveValue(_:for:)`

  Sets in the object’s private internal storage the value of a given property.

  Sets in the receiver’s private internal storage the value of the property specified by key to value.

  #### Declaration

  Swift

      public func setPrimitiveValue<V>(_ value: V, for property: (O) -> ValueContainer<O>.Required<V>) where V : ImportableAttributeType

### Value.Optional utilities

- `value(for:)`

  Returns the value for the property identified by a given key.

  #### Declaration

  Swift

      public func value<V>(for property: (O) -> ValueContainer<O>.Optional<V>) -> V? where V : ImportableAttributeType

- `setValue(_:for:)`

  Sets the property of the receiver specified by a given key to a given value.

  #### Declaration

  Swift

      public func setValue<V>(_ value: V?, for property: (O) -> ValueContainer<O>.Optional<V>) where V : ImportableAttributeType

- `primitiveValue(for:)`

  Returns the value for the specified property from the managed object’s private internal storage.

  This method does not invoke the access notification methods (`willAccessValue(forKey:)` and `didAccessValue(forKey:)`). This method is used primarily by subclasses that implement custom accessor methods that need direct access to the receiver’s private storage.

  #### Declaration

  Swift

      public func primitiveValue<V>(for property: (O) -> ValueContainer<O>.Optional<V>) -> V? where V : ImportableAttributeType

- `setPrimitiveValue(_:for:)`

  Sets in the object’s private internal storage the value of a given property.

  Sets in the receiver’s private internal storage the value of the property specified by key to value.

  #### Declaration

  Swift

      public func setPrimitiveValue<V>(_ value: V?, for property: (O) -> ValueContainer<O>.Optional<V>) where V : ImportableAttributeType

### Transformable.Required utilities

- `value(for:)`

  Returns the value for the property identified by a given key.

  #### Declaration

  Swift

      public func value<V>(for property: (O) -> TransformableContainer<O>.Required<V>) -> V where V : NSCoding, V : NSCopying

- `setValue(_:for:)`

  Sets the property of the receiver specified by a given key to a given value.

  #### Declaration

  Swift

      public func setValue<V>(_ value: V, for property: (O) -> TransformableContainer<O>.Required<V>) where V : NSCoding, V : NSCopying

- `primitiveValue(for:)`

  Returns the value for the specified property from the managed object’s private internal storage.

  This method does not invoke the access notification methods (`willAccessValue(forKey:)` and `didAccessValue(forKey:)`). This method is used primarily by subclasses that implement custom accessor methods that need direct access to the receiver’s private storage.

  #### Declaration

  Swift

      public func primitiveValue<V>(for property: (O) -> TransformableContainer<O>.Required<V>) -> V where V : NSCoding, V : NSCopying

- `setPrimitiveValue(_:for:)`

  Sets in the object’s private internal storage the value of a given property.

  Sets in the receiver’s private internal storage the value of the property specified by key to value.

  #### Declaration

  Swift

      public func setPrimitiveValue<V>(_ value: V, for property: (O) -> TransformableContainer<O>.Required<V>) where V : NSCoding, V : NSCopying

### Transformable.Optional utilities

- `value(for:)`

  Returns the value for the property identified by a given key.

  #### Declaration

  Swift

      public func value<V>(for property: (O) -> TransformableContainer<O>.Optional<V>) -> V? where V : NSCoding, V : NSCopying

- `setValue(_:for:)`

  Sets the property of the receiver specified by a given key to a given value.

  #### Declaration

  Swift

      public func setValue<V>(_ value: V?, for property: (O) -> TransformableContainer<O>.Optional<V>) where V : NSCoding, V : NSCopying

- `primitiveValue(for:)`

  Returns the value for the specified property from the managed object’s private internal storage.

  This method does not invoke the access notification methods (`willAccessValue(forKey:)` and `didAccessValue(forKey:)`). This method is used primarily by subclasses that implement custom accessor methods that need direct access to the receiver’s private storage.

  #### Declaration

  Swift

      public func primitiveValue<V>(for property: (O) -> TransformableContainer<O>.Optional<V>) -> V? where V : NSCoding, V : NSCopying

- `setPrimitiveValue(_:for:)`

  Sets in the object’s private internal storage the value of a given property.

  Sets in the receiver’s private internal storage the value of the property specified by key to value.

  #### Declaration

  Swift

      public func setPrimitiveValue<V>(_ value: V?, for property: (O) -> TransformableContainer<O>.Optional<V>) where V : NSCoding, V : NSCopying

### CustomDebugStringConvertible

- `debugDescription`

  #### Declaration

  Swift

      public var debugDescription: String { get }