Package apple.coredata
Class NSManagedObject
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.coredata.NSManagedObject
-
- All Implemented Interfaces:
NSFetchRequestResult,NSObject
public class NSManagedObject extends NSObject implements NSFetchRequestResult
API-Since: 3.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSManagedObject(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static NSManagedObjectalloc()static NSManagedObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)voidawakeFromFetch()invoked after a fetch or after unfaulting (commonly used for computing derived values from the persisted properties)voidawakeFromInsert()invoked after an insert (commonly used for initializing special default/initial settings)voidawakeFromSnapshotEvents(long flags)Callback for undo, redo, and other multi-property state resets API-Since: 3.0static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)@NotNull NSDictionary<java.lang.String,?>changedValues()returns a dictionary with the keys and (new) values that have been changed since last fetching or saving the object (this is implemented efficiently without firing relationship faults)@NotNull NSDictionary<java.lang.String,?>changedValuesForCurrentEvent()API-Since: 5.0static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@NotNull NSDictionary<java.lang.String,?>committedValuesForKeys(@Nullable NSArray<java.lang.String> keys)returns a dictionary of the last fetched or saved keys and values of this object.static booleancontextShouldIgnoreUnmodeledPropertyChanges()Distinguish between changes that should and should not dirty the object for any key unknown to Core Data.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voiddidAccessValueForKey(@Nullable java.lang.String key)read notification (together with willAccessValueForKey used to maintain inverse relationships, to fire faults, etc.) - each read access has to be wrapped in this method pair (in the same way as each write access has to be wrapped in the KVO method pair)voiddidChangeValueForKey(@NotNull java.lang.String key)voiddidChangeValueForKeyWithSetMutationUsingObjects(@NotNull java.lang.String inKey, long inMutationKind, @NotNull NSSet<?> inObjects)voiddidSave()commonly used to notify other objects after a savevoiddidTurnIntoFault()commonly used to clear out additional transient values or caches@NotNull NSEntityDescriptionentity()static @NotNull NSEntityDescriptionentity_static()The Entity represented by this subclass.longfaultingState()Allow developers to determine if an object is in a transitional phase when receiving a KVO notification.static @NotNull NSFetchRequest<?>fetchRequest()API-Since: 10.0booleanhasChanges()API-Since: 5.0booleanhasFaultForRelationshipNamed(@NotNull java.lang.String key)returns a Boolean indicating if the relationship for the specified key is a fault.static longhash_static()booleanhasPersistentChangedValues()returns YES if any persistent properties do not compare isEqual to their last saved state.NSManagedObjectinit()NSManagedObjectinitWithContext(@NotNull NSManagedObjectContext moc)Returns a new object, inserted into managedObjectContext.@NotNull NSManagedObjectinitWithEntityInsertIntoManagedObjectContext(@NotNull NSEntityDescription entity, @Nullable NSManagedObjectContext context)The designated initializer.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)booleanisDeleted()booleanisFault()this information is useful in many situations when computations are optional - this can be used to avoid growing the object graph unnecessarily (which allows to control performance as it can avoid time consuming fetches from databases)booleanisInserted()state - methodsstatic booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)booleanisUpdated()static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)@Nullable NSManagedObjectContextmanagedObjectContext()identitystatic NSManagedObjectnew_objc()@NotNull NSManagedObjectIDobjectID()@NotNull NSArray<? extends NSManagedObjectID>objectIDsForRelationshipNamed(@NotNull java.lang.String key)returns an array of objectIDs for the contents of a relationship.voidprepareForDeletion()Callback before delete propagation while the object is still alive.@Nullable java.lang.ObjectprimitiveValueForKey(@NotNull java.lang.String key)primitive methods give access to the generic dictionary storage from subclasses that implement explicit accessors like -setName/-name to add custom document logicstatic booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetPrimitiveValueForKey(@Nullable java.lang.Object value, @NotNull java.lang.String key)voidsetValueForKey(@Nullable java.lang.Object value, @NotNull java.lang.String key)KVC - overridden to access generic dictionary storage unless subclasses explicitly provide accessorsstatic voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()static booleanuseStoredAccessor()Deprecated.booleanvalidateForDelete(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)booleanvalidateForInsert(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)booleanvalidateForUpdate(@Nullable org.moe.natj.general.ptr.Ptr<NSError> error)booleanvalidateValueForKeyError(@NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> value, @NotNull java.lang.String key, @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)KVC@Nullable java.lang.ObjectvalueForKey(@NotNull java.lang.String key)KVC - overridden to access generic dictionary storage unless subclasses explicitly provide accessorsstatic longversion_static()voidwillAccessValueForKey(@Nullable java.lang.String key)read notificationvoidwillChangeValueForKey(@NotNull java.lang.String key)KVO change notificationvoidwillChangeValueForKeyWithSetMutationUsingObjects(@NotNull java.lang.String inKey, long inMutationKind, @NotNull NSSet<?> inObjects)Given a key that identifies an _unordered_ to-many relationship, send -observeValueForKeyPath:ofObject:change:context: notification messages to each observer registered for the key, including those that are registered with other objects using key paths that locate the keyed value in this object.voidwillSave()commonly used to compute persisted values from other transient/scratchpad values, to set timestamps, etc.voidwillTurnIntoFault()invoked automatically by the Core Data framework before receiver is converted (back) to a fault.-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyPathError, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSManagedObject alloc()
-
allocWithZone
public static NSManagedObject allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
contextShouldIgnoreUnmodeledPropertyChanges
public static boolean contextShouldIgnoreUnmodeledPropertyChanges()
Distinguish between changes that should and should not dirty the object for any key unknown to Core Data. 10.5 & earlier default to NO. 10.6 and later default to YES. Similarly, transient attributes may be individually flagged as not dirtying the object by adding +(BOOL)contextShouldIgnoreChangesForwhere is the property name. API-Since: 3.0
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
entity_static
@NotNull public static @NotNull NSEntityDescription entity_static()
The Entity represented by this subclass. This method is only legal to call on subclasses of NSManagedObject that represent a single entity in the model. API-Since: 10.0
-
fetchRequest
@NotNull public static @NotNull NSFetchRequest<?> fetchRequest()
API-Since: 10.0
-
hash_static
public static long hash_static()
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static NSManagedObject new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
awakeFromFetch
public void awakeFromFetch()
invoked after a fetch or after unfaulting (commonly used for computing derived values from the persisted properties)
-
awakeFromInsert
public void awakeFromInsert()
invoked after an insert (commonly used for initializing special default/initial settings)
-
awakeFromSnapshotEvents
public void awakeFromSnapshotEvents(long flags)
Callback for undo, redo, and other multi-property state resets API-Since: 3.0
-
changedValues
@NotNull public @NotNull NSDictionary<java.lang.String,?> changedValues()
returns a dictionary with the keys and (new) values that have been changed since last fetching or saving the object (this is implemented efficiently without firing relationship faults)
-
changedValuesForCurrentEvent
@NotNull public @NotNull NSDictionary<java.lang.String,?> changedValuesForCurrentEvent()
API-Since: 5.0
-
committedValuesForKeys
@NotNull public @NotNull NSDictionary<java.lang.String,?> committedValuesForKeys(@Nullable @Nullable NSArray<java.lang.String> keys)
returns a dictionary of the last fetched or saved keys and values of this object. Pass nil to get all persistent modeled properties.
-
didAccessValueForKey
public void didAccessValueForKey(@Nullable @Nullable java.lang.String key)read notification (together with willAccessValueForKey used to maintain inverse relationships, to fire faults, etc.) - each read access has to be wrapped in this method pair (in the same way as each write access has to be wrapped in the KVO method pair)
-
didChangeValueForKey
public void didChangeValueForKey(@NotNull @NotNull java.lang.String key)- Overrides:
didChangeValueForKeyin classNSObject
-
didChangeValueForKeyWithSetMutationUsingObjects
public void didChangeValueForKeyWithSetMutationUsingObjects(@NotNull @NotNull java.lang.String inKey, long inMutationKind, @NotNull @NotNull NSSet<?> inObjects)- Overrides:
didChangeValueForKeyWithSetMutationUsingObjectsin classNSObject
-
didSave
public void didSave()
commonly used to notify other objects after a save
-
didTurnIntoFault
public void didTurnIntoFault()
commonly used to clear out additional transient values or caches
-
entity
@NotNull public @NotNull NSEntityDescription entity()
-
faultingState
public long faultingState()
Allow developers to determine if an object is in a transitional phase when receiving a KVO notification. Returns 0 if the object is fully initialized as a managed object and not transitioning to or from another state API-Since: 3.0
-
hasChanges
public boolean hasChanges()
API-Since: 5.0
-
hasFaultForRelationshipNamed
public boolean hasFaultForRelationshipNamed(@NotNull @NotNull java.lang.String key)returns a Boolean indicating if the relationship for the specified key is a fault. If a value of NO is returned, the resulting relationship is a realized object; otherwise the relationship is a fault. If the specified relationship is a fault, calling this method does not result in the fault firing. API-Since: 3.0
-
hasPersistentChangedValues
public boolean hasPersistentChangedValues()
returns YES if any persistent properties do not compare isEqual to their last saved state. Relationship faults will not be unnecessarily fired. This differs from the existing -hasChanges method which is a simple dirty flag and also includes transient properties API-Since: 7.0
-
init
public NSManagedObject init()
-
initWithContext
public NSManagedObject initWithContext(@NotNull @NotNull NSManagedObjectContext moc)
Returns a new object, inserted into managedObjectContext. This method is only legal to call on subclasses of NSManagedObject that represent a single entity in the model. API-Since: 10.0
-
initWithEntityInsertIntoManagedObjectContext
@NotNull public @NotNull NSManagedObject initWithEntityInsertIntoManagedObjectContext(@NotNull @NotNull NSEntityDescription entity, @Nullable @Nullable NSManagedObjectContext context)
The designated initializer.
-
isDeleted
public boolean isDeleted()
-
isFault
public boolean isFault()
this information is useful in many situations when computations are optional - this can be used to avoid growing the object graph unnecessarily (which allows to control performance as it can avoid time consuming fetches from databases)
-
isInserted
public boolean isInserted()
state - methods
-
isUpdated
public boolean isUpdated()
-
managedObjectContext
@Nullable public @Nullable NSManagedObjectContext managedObjectContext()
identity
-
objectID
@NotNull public @NotNull NSManagedObjectID objectID()
-
objectIDsForRelationshipNamed
@NotNull public @NotNull NSArray<? extends NSManagedObjectID> objectIDsForRelationshipNamed(@NotNull @NotNull java.lang.String key)
returns an array of objectIDs for the contents of a relationship. to-one relationships will return an NSArray with a single NSManagedObjectID. Optional relationships may return an empty NSArray. The objectIDs will be returned in an NSArray regardless of the type of the relationship. API-Since: 8.3
-
prepareForDeletion
public void prepareForDeletion()
Callback before delete propagation while the object is still alive. Useful to perform custom propagation before the relationships are torn down or reconfigure KVO observers. API-Since: 3.0
-
primitiveValueForKey
@Nullable public @Nullable java.lang.Object primitiveValueForKey(@NotNull @NotNull java.lang.String key)primitive methods give access to the generic dictionary storage from subclasses that implement explicit accessors like -setName/-name to add custom document logic
-
setPrimitiveValueForKey
public void setPrimitiveValueForKey(@Nullable @Nullable java.lang.Object value, @NotNull @NotNull java.lang.String key)
-
setValueForKey
public void setValueForKey(@Nullable @Nullable java.lang.Object value, @NotNull @NotNull java.lang.String key)KVC - overridden to access generic dictionary storage unless subclasses explicitly provide accessors- Overrides:
setValueForKeyin classNSObject
-
validateForDelete
public boolean validateForDelete(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
-
validateForInsert
public boolean validateForInsert(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
-
validateForUpdate
public boolean validateForUpdate(@Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
-
validateValueForKeyError
public boolean validateValueForKeyError(@NotNull @NotNull org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> value, @NotNull @NotNull java.lang.String key, @Nullable @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)KVC- Overrides:
validateValueForKeyErrorin classNSObject
-
valueForKey
@Nullable public @Nullable java.lang.Object valueForKey(@NotNull @NotNull java.lang.String key)KVC - overridden to access generic dictionary storage unless subclasses explicitly provide accessors- Overrides:
valueForKeyin classNSObject
-
willAccessValueForKey
public void willAccessValueForKey(@Nullable @Nullable java.lang.String key)read notification
-
willChangeValueForKey
public void willChangeValueForKey(@NotNull @NotNull java.lang.String key)KVO change notification- Overrides:
willChangeValueForKeyin classNSObject
-
willChangeValueForKeyWithSetMutationUsingObjects
public void willChangeValueForKeyWithSetMutationUsingObjects(@NotNull @NotNull java.lang.String inKey, long inMutationKind, @NotNull @NotNull NSSet<?> inObjects)Description copied from class:NSObjectGiven a key that identifies an _unordered_ to-many relationship, send -observeValueForKeyPath:ofObject:change:context: notification messages to each observer registered for the key, including those that are registered with other objects using key paths that locate the keyed value in this object. The passed-in mutation kind corresponds to an NSMutableSet method. The passed-in set must contain the set that would be passed to the corresponding NSMutableSet method. Invocations of these methods must always be paired, with identical arguments. The value of the NSKeyValueChangeKindKey entry in change dictionaries in notifications resulting from use of these methods depends on the passed-in mutationKind value: - NSKeyValueUnionSetMutation -> NSKeyValueChangeInsertion - NSKeyValueMinusSetMutation -> NSKeyValueChangeRemoval - NSKeyValueIntersectSetMutation -> NSKeyValueChangeRemoval - NSKeyValueSetSetMutation -> NSKeyValueChangeReplacement The change dictionaries may also contain optional entries: - The NSKeyValueChangeOldKey entry, if present (only for for NSKeyValueChangeRemoval and NSKeyValueChangeReplacement), contains the set of objects that were removed. - The NSKeyValueChangeNewKey entry, if present (only for NSKeyValueChangeInsertion and NSKeyValueChangeReplacement), contains the set of objects that were added.- Overrides:
willChangeValueForKeyWithSetMutationUsingObjectsin classNSObject
-
willSave
public void willSave()
commonly used to compute persisted values from other transient/scratchpad values, to set timestamps, etc. - this method can have "side effects" on the persisted values
-
willTurnIntoFault
public void willTurnIntoFault()
invoked automatically by the Core Data framework before receiver is converted (back) to a fault. This method is the companion of the -didTurnIntoFault method, and may be used to (re)set state which requires access to property values (for example, observers across keypaths.) The default implementation does nothing. API-Since: 3.0
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
-