public class NSManagedObject extends NSObject implements NSFetchRequestResult
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSManagedObject(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
static NSManagedObject |
alloc() |
static NSManagedObject |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
void |
awakeFromFetch()
invoked after a fetch or after unfaulting (commonly used for computing derived values from the persisted properties)
|
void |
awakeFromInsert()
invoked after an insert (commonly used for initializing special default/initial settings)
|
void |
awakeFromSnapshotEvents(long flags)
Callback for undo, redo, and other multi-property state resets
|
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
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)
|
NSDictionary<java.lang.String,?> |
changedValuesForCurrentEvent() |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
NSDictionary<java.lang.String,?> |
committedValuesForKeys(NSArray<java.lang.String> keys)
returns a dictionary of the last fetched or saved keys and values of this object.
|
static boolean |
contextShouldIgnoreUnmodeledPropertyChanges()
Distinguish between changes that should and should not dirty the object for any key unknown to Core Data.
|
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
didAccessValueForKey(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)
|
void |
didChangeValueForKey(java.lang.String key) |
void |
didChangeValueForKeyWithSetMutationUsingObjects(java.lang.String inKey,
long inMutationKind,
NSSet<?> inObjects) |
void |
didSave()
commonly used to notify other objects after a save
|
void |
didTurnIntoFault()
commonly used to clear out additional transient values or caches
|
static NSEntityDescription |
entity_static()
The Entity represented by this subclass.
|
NSEntityDescription |
entity() |
long |
faultingState()
Allow developers to determine if an object is in a transitional phase when receiving a KVO notification.
|
static NSFetchRequest<?> |
fetchRequest() |
boolean |
hasChanges() |
boolean |
hasFaultForRelationshipNamed(java.lang.String key)
returns a Boolean indicating if the relationship for the specified key is a fault.
|
static long |
hash_static() |
boolean |
hasPersistentChangedValues()
returns YES if any persistent properties do not compare isEqual to their last saved state.
|
NSManagedObject |
init() |
NSManagedObject |
initWithContext(NSManagedObjectContext moc)
Returns a new object, inserted into managedObjectContext.
|
NSManagedObject |
initWithEntityInsertIntoManagedObjectContext(NSEntityDescription entity,
NSManagedObjectContext context)
The designated initializer.
|
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
boolean |
isDeleted() |
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)
|
boolean |
isInserted()
state - methods
|
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
boolean |
isUpdated() |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
NSManagedObjectContext |
managedObjectContext()
identity
|
static NSManagedObject |
new_objc() |
NSManagedObjectID |
objectID() |
NSArray<? extends NSManagedObjectID> |
objectIDsForRelationshipNamed(java.lang.String key)
returns an array of objectIDs for the contents of a relationship.
|
void |
prepareForDeletion()
Callback before delete propagation while the object is still alive.
|
java.lang.Object |
primitiveValueForKey(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
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setPrimitiveValueForKey(java.lang.Object value,
java.lang.String key) |
void |
setValueForKey(java.lang.Object value,
java.lang.String key)
KVC - overridden to access generic dictionary storage unless subclasses explicitly provide accessors
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
boolean |
validateForDelete(org.moe.natj.general.ptr.Ptr<NSError> error) |
boolean |
validateForInsert(org.moe.natj.general.ptr.Ptr<NSError> error) |
boolean |
validateForUpdate(org.moe.natj.general.ptr.Ptr<NSError> error) |
boolean |
validateValueForKeyError(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> value,
java.lang.String key,
org.moe.natj.general.ptr.Ptr<NSError> error)
KVC
|
java.lang.Object |
valueForKey(java.lang.String key)
KVC - overridden to access generic dictionary storage unless subclasses explicitly provide accessors
|
static long |
version_static() |
void |
willAccessValueForKey(java.lang.String key)
read notification
|
void |
willChangeValueForKey(java.lang.String key)
KVO change notification
|
void |
willChangeValueForKeyWithSetMutationUsingObjects(java.lang.String inKey,
long inMutationKind,
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.
|
void |
willSave()
commonly used to compute persisted values from other transient/scratchpad values, to set timestamps, etc.
|
void |
willTurnIntoFault()
invoked automatically by the Core Data framework before receiver is converted (back) to a fault.
|
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyPathError, valueForKeyPath, valueForUndefinedKey, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static NSManagedObject alloc()
public static NSManagedObject allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static boolean contextShouldIgnoreUnmodeledPropertyChanges()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public static NSEntityDescription entity_static()
public static NSFetchRequest<?> fetchRequest()
public static long hash_static()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NSManagedObject new_objc()
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public void awakeFromFetch()
public void awakeFromInsert()
public void awakeFromSnapshotEvents(long flags)
public NSDictionary<java.lang.String,?> changedValues()
public NSDictionary<java.lang.String,?> changedValuesForCurrentEvent()
public NSDictionary<java.lang.String,?> committedValuesForKeys(NSArray<java.lang.String> keys)
public void didAccessValueForKey(java.lang.String key)
public void didChangeValueForKey(java.lang.String key)
didChangeValueForKey in class NSObjectpublic void didChangeValueForKeyWithSetMutationUsingObjects(java.lang.String inKey,
long inMutationKind,
NSSet<?> inObjects)
didChangeValueForKeyWithSetMutationUsingObjects in class NSObjectpublic void didSave()
public void didTurnIntoFault()
public NSEntityDescription entity()
public long faultingState()
public boolean hasChanges()
public boolean hasFaultForRelationshipNamed(java.lang.String key)
public boolean hasPersistentChangedValues()
public NSManagedObject init()
public NSManagedObject initWithContext(NSManagedObjectContext moc)
public NSManagedObject initWithEntityInsertIntoManagedObjectContext(NSEntityDescription entity, NSManagedObjectContext context)
public boolean isDeleted()
public boolean isFault()
public boolean isInserted()
public boolean isUpdated()
public NSManagedObjectContext managedObjectContext()
public NSManagedObjectID objectID()
public NSArray<? extends NSManagedObjectID> objectIDsForRelationshipNamed(java.lang.String key)
public void prepareForDeletion()
public java.lang.Object primitiveValueForKey(java.lang.String key)
public void setPrimitiveValueForKey(java.lang.Object value,
java.lang.String key)
public void setValueForKey(java.lang.Object value,
java.lang.String key)
setValueForKey in class NSObjectpublic boolean validateForDelete(org.moe.natj.general.ptr.Ptr<NSError> error)
public boolean validateForInsert(org.moe.natj.general.ptr.Ptr<NSError> error)
public boolean validateForUpdate(org.moe.natj.general.ptr.Ptr<NSError> error)
public boolean validateValueForKeyError(org.moe.natj.general.ptr.Ptr<org.moe.natj.objc.ObjCObject> value,
java.lang.String key,
org.moe.natj.general.ptr.Ptr<NSError> error)
validateValueForKeyError in class NSObjectpublic java.lang.Object valueForKey(java.lang.String key)
valueForKey in class NSObjectpublic void willAccessValueForKey(java.lang.String key)
public void willChangeValueForKey(java.lang.String key)
willChangeValueForKey in class NSObjectpublic void willChangeValueForKeyWithSetMutationUsingObjects(java.lang.String inKey,
long inMutationKind,
NSSet<?> inObjects)
NSObjectThe 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.
willChangeValueForKeyWithSetMutationUsingObjects in class NSObjectpublic void willSave()
public void willTurnIntoFault()