Package apple.coredata
Class NSFetchRequest<_ResultType>
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.coredata.NSPersistentStoreRequest
-
- apple.coredata.NSFetchRequest<_ResultType>
-
public class NSFetchRequest<_ResultType> extends NSPersistentStoreRequest implements NSCoding
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNSFetchRequest(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()NSArray<? extends NSPersistentStore>affectedStores()Stores this request should be sent to.static NSFetchRequest<?>alloc()static java.lang.ObjectallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(java.lang.String key)static voidcancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)static NSArray<java.lang.String>classFallbacksForKeyedArchiver()static org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidencodeWithCoder(NSCoder coder)NSEntityDescriptionentity()java.lang.StringentityName()NSArray<?>execute(org.moe.natj.general.ptr.Ptr<NSError> error)Executes the fetch request using the current managed object context.longfetchBatchSize()This breaks the result set into batches.longfetchLimit()longfetchOffset()Allows you to specify an offset at which rows will begin being returned.static <_ResultType>
NSFetchRequest<?>fetchRequestWithEntityName(java.lang.String entityName)static longhash_static()NSPredicatehavingPredicate()Specifies a predicate that will be used to filter rows being returned by a query containing a GROUP BY.booleanincludesPendingChanges()Results accommodate the currently unsaved changes in the NSManagedObjectContext.booleanincludesPropertyValues()Returns/sets if, when the fetch is executed, property data is obtained from the persistent store.booleanincludesSubentities()Returns/sets if the fetch request includes subentities.NSFetchRequest<?>init()NSFetchRequest<?>initWithCoder(NSCoder coder)NS_DESIGNATED_INITIALIZERNSFetchRequest<?>initWithEntityName(java.lang.String entityName)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)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(java.lang.String key)static java.lang.Objectnew_objc()NSPredicatepredicate()NSArray<?>propertiesToFetch()Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched.NSArray<?>propertiesToGroupBy()Specifies the way in which data should be grouped before a select statement is run in an SQL database.NSArray<java.lang.String>relationshipKeyPathsForPrefetching()Returns/sets an array of relationship keypaths to prefetch along with the entity for the request.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)longresultType()Returns/sets the result type of the fetch request (the instance type of objects returned from executing the request.)booleanreturnsDistinctResults()Returns/sets if the fetch request returns only distinct values for the fields specified by propertiesToFetch.booleanreturnsObjectsAsFaults()Returns/sets if the objects resulting from a fetch request are faults.voidsetAffectedStores(NSArray<? extends NSPersistentStore> value)Stores this request should be sent to.voidsetEntity(NSEntityDescription value)voidsetFetchBatchSize(long value)This breaks the result set into batches.voidsetFetchLimit(long value)voidsetFetchOffset(long value)Allows you to specify an offset at which rows will begin being returned.voidsetHavingPredicate(NSPredicate value)Specifies a predicate that will be used to filter rows being returned by a query containing a GROUP BY.voidsetIncludesPendingChanges(boolean value)Results accommodate the currently unsaved changes in the NSManagedObjectContext.voidsetIncludesPropertyValues(boolean value)Returns/sets if, when the fetch is executed, property data is obtained from the persistent store.voidsetIncludesSubentities(boolean value)Returns/sets if the fetch request includes subentities.voidsetPredicate(NSPredicate value)voidsetPropertiesToFetch(NSArray<?> value)Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched.voidsetPropertiesToGroupBy(NSArray<?> value)Specifies the way in which data should be grouped before a select statement is run in an SQL database.voidsetRelationshipKeyPathsForPrefetching(NSArray<java.lang.String> value)Returns/sets an array of relationship keypaths to prefetch along with the entity for the request.voidsetResultType(long value)Returns/sets the result type of the fetch request (the instance type of objects returned from executing the request.)voidsetReturnsDistinctResults(boolean value)Returns/sets if the fetch request returns only distinct values for the fields specified by propertiesToFetch.voidsetReturnsObjectsAsFaults(boolean value)Returns/sets if the objects resulting from a fetch request are faults.voidsetShouldRefreshRefetchedObjects(boolean value)voidsetSortDescriptors(NSArray<? extends NSSortDescriptor> value)static voidsetVersion_static(long aVersion)booleanshouldRefreshRefetchedObjects()NSArray<? extends NSSortDescriptor>sortDescriptors()static org.moe.natj.objc.Classsuperclass_static()static longversion_static()-
Methods inherited from class apple.coredata.NSPersistentStoreRequest
copyWithZone, requestType
-
Methods inherited from class apple.NSObject
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, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, 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, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static NSFetchRequest<?> alloc()
-
allocWithZone
public static java.lang.Object allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget, org.moe.natj.objc.SEL aSelector, java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
fetchRequestWithEntityName
public static <_ResultType> NSFetchRequest<?> fetchRequestWithEntityName(java.lang.String entityName)
-
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
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
-
new_objc
public static java.lang.Object 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()
-
affectedStores
public NSArray<? extends NSPersistentStore> affectedStores()
Description copied from class:NSPersistentStoreRequestStores this request should be sent to.- Overrides:
affectedStoresin classNSPersistentStoreRequest
-
encodeWithCoder
public void encodeWithCoder(NSCoder coder)
- Specified by:
encodeWithCoderin interfaceNSCoding
-
entity
public NSEntityDescription entity()
-
entityName
public java.lang.String entityName()
-
execute
public NSArray<?> execute(org.moe.natj.general.ptr.Ptr<NSError> error)
Executes the fetch request using the current managed object context. This method must be called from within a block submitted to a managed object context.
-
fetchBatchSize
public long fetchBatchSize()
This breaks the result set into batches. The entire request will be evaluated, and the identities of all matching objects will be recorded, but no more than batchSize objects' data will be fetched from the persistent store at a time. The array returned from executing the request will be a subclass that transparently faults batches on demand. For purposes of thread safety, the returned array proxy is owned by the NSManagedObjectContext the request is executed against, and should be treated as if it were a managed object registered with that context. A batch size of 0 is treated as infinite, which disables the batch faulting behavior. The default is 0.
-
fetchLimit
public long fetchLimit()
-
fetchOffset
public long fetchOffset()
Allows you to specify an offset at which rows will begin being returned. Effectively, the request will skip over 'offset' number of matching entries. For example, given a fetch which would normally return a, b, c, and d, specifying an offset of 1 will return b, c, and d and an offset of 4 will return an empty array. Offsets are ignored in nested requests such as subqueries. Default value is 0.
-
havingPredicate
public NSPredicate havingPredicate()
Specifies a predicate that will be used to filter rows being returned by a query containing a GROUP BY. If a having predicate is supplied, it will be run after the GROUP BY. Specifying a HAVING predicate requires that a GROUP BY also be specified.
-
includesPendingChanges
public boolean includesPendingChanges()
Results accommodate the currently unsaved changes in the NSManagedObjectContext. When disabled, the fetch request skips checking unsaved changes and only returns objects that matched the predicate in the persistent store. Defaults to YES.
-
includesPropertyValues
public boolean includesPropertyValues()
Returns/sets if, when the fetch is executed, property data is obtained from the persistent store. If the value is set to NO, the request will not obtain property information, but only information to identify each object (used to create NSManagedObjectIDs.) If managed objects for these IDs are later faulted (as a result attempting to access property values), they will incur subsequent access to the persistent store to obtain their property values. Defaults to YES.
-
includesSubentities
public boolean includesSubentities()
Returns/sets if the fetch request includes subentities. If set to NO, the request will fetch objects of exactly the entity type of the request; if set to YES, the request will include all subentities of the entity for the request. Defaults to YES.
-
init
public NSFetchRequest<?> init()
- Overrides:
initin classNSPersistentStoreRequest
-
initWithCoder
public NSFetchRequest<?> initWithCoder(NSCoder coder)
Description copied from interface:NSCodingNS_DESIGNATED_INITIALIZER- Specified by:
initWithCoderin interfaceNSCoding
-
initWithEntityName
public NSFetchRequest<?> initWithEntityName(java.lang.String entityName)
-
predicate
public NSPredicate predicate()
-
propertiesToFetch
public NSArray<?> propertiesToFetch()
Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched. The collection may represent attributes, to-one relationships, or NSExpressionDescription. If NSDictionaryResultType is set, the results of the fetch will be dictionaries containing key/value pairs where the key is the name of the specified property description. If NSManagedObjectResultType is set, then NSExpressionDescription cannot be used, and the results are managed object faults partially pre-populated with the named properties
-
propertiesToGroupBy
public NSArray<?> propertiesToGroupBy()
Specifies the way in which data should be grouped before a select statement is run in an SQL database. Values passed to propertiesToGroupBy must be NSPropertyDescriptions, NSExpressionDescriptions, or keypath strings; keypaths can not contain any to-many steps. If GROUP BY is used, then you must set the resultsType to NSDictionaryResultsType, and the SELECT values must be literals, aggregates, or columns specified in the GROUP BY. Aggregates will operate on the groups specified in the GROUP BY rather than the whole table.
-
relationshipKeyPathsForPrefetching
public NSArray<java.lang.String> relationshipKeyPathsForPrefetching()
Returns/sets an array of relationship keypaths to prefetch along with the entity for the request. The array contains keypath strings in NSKeyValueCoding notation, as you would normally use with valueForKeyPath. (Prefetching allows Core Data to obtain developer-specified related objects in a single fetch (per entity), rather than incurring subsequent access to the store for each individual record as their faults are tripped.) Defaults to an empty array (no prefetching.)
-
resultType
public long resultType()
Returns/sets the result type of the fetch request (the instance type of objects returned from executing the request.) Setting the value to NSManagedObjectIDResultType will demote any sort orderings to "best effort" hints if property values are not included in the request. Defaults to NSManagedObjectResultType.
-
returnsDistinctResults
public boolean returnsDistinctResults()
Returns/sets if the fetch request returns only distinct values for the fields specified by propertiesToFetch. This value is only used for NSDictionaryResultType. Defaults to NO.
-
returnsObjectsAsFaults
public boolean returnsObjectsAsFaults()
Returns/sets if the objects resulting from a fetch request are faults. If the value is set to NO, the returned objects are pre-populated with their property values (making them fully-faulted objects, which will immediately return NO if sent the -isFault message.) If the value is set to YES, the returned objects are not pre-populated (and will receive a -didFireFault message when the properties are accessed the first time.) This setting is not utilized if the result type of the request is NSManagedObjectIDResultType, as object IDs do not have property values. Defaults to YES.
-
setAffectedStores
public void setAffectedStores(NSArray<? extends NSPersistentStore> value)
Description copied from class:NSPersistentStoreRequestStores this request should be sent to.- Overrides:
setAffectedStoresin classNSPersistentStoreRequest
-
setEntity
public void setEntity(NSEntityDescription value)
-
setFetchBatchSize
public void setFetchBatchSize(long value)
This breaks the result set into batches. The entire request will be evaluated, and the identities of all matching objects will be recorded, but no more than batchSize objects' data will be fetched from the persistent store at a time. The array returned from executing the request will be a subclass that transparently faults batches on demand. For purposes of thread safety, the returned array proxy is owned by the NSManagedObjectContext the request is executed against, and should be treated as if it were a managed object registered with that context. A batch size of 0 is treated as infinite, which disables the batch faulting behavior. The default is 0.
-
setFetchLimit
public void setFetchLimit(long value)
-
setFetchOffset
public void setFetchOffset(long value)
Allows you to specify an offset at which rows will begin being returned. Effectively, the request will skip over 'offset' number of matching entries. For example, given a fetch which would normally return a, b, c, and d, specifying an offset of 1 will return b, c, and d and an offset of 4 will return an empty array. Offsets are ignored in nested requests such as subqueries. Default value is 0.
-
setHavingPredicate
public void setHavingPredicate(NSPredicate value)
Specifies a predicate that will be used to filter rows being returned by a query containing a GROUP BY. If a having predicate is supplied, it will be run after the GROUP BY. Specifying a HAVING predicate requires that a GROUP BY also be specified.
-
setIncludesPendingChanges
public void setIncludesPendingChanges(boolean value)
Results accommodate the currently unsaved changes in the NSManagedObjectContext. When disabled, the fetch request skips checking unsaved changes and only returns objects that matched the predicate in the persistent store. Defaults to YES.
-
setIncludesPropertyValues
public void setIncludesPropertyValues(boolean value)
Returns/sets if, when the fetch is executed, property data is obtained from the persistent store. If the value is set to NO, the request will not obtain property information, but only information to identify each object (used to create NSManagedObjectIDs.) If managed objects for these IDs are later faulted (as a result attempting to access property values), they will incur subsequent access to the persistent store to obtain their property values. Defaults to YES.
-
setIncludesSubentities
public void setIncludesSubentities(boolean value)
Returns/sets if the fetch request includes subentities. If set to NO, the request will fetch objects of exactly the entity type of the request; if set to YES, the request will include all subentities of the entity for the request. Defaults to YES.
-
setPredicate
public void setPredicate(NSPredicate value)
-
setPropertiesToFetch
public void setPropertiesToFetch(NSArray<?> value)
Specifies a collection of either NSPropertyDescriptions or NSString property names that should be fetched. The collection may represent attributes, to-one relationships, or NSExpressionDescription. If NSDictionaryResultType is set, the results of the fetch will be dictionaries containing key/value pairs where the key is the name of the specified property description. If NSManagedObjectResultType is set, then NSExpressionDescription cannot be used, and the results are managed object faults partially pre-populated with the named properties
-
setPropertiesToGroupBy
public void setPropertiesToGroupBy(NSArray<?> value)
Specifies the way in which data should be grouped before a select statement is run in an SQL database. Values passed to propertiesToGroupBy must be NSPropertyDescriptions, NSExpressionDescriptions, or keypath strings; keypaths can not contain any to-many steps. If GROUP BY is used, then you must set the resultsType to NSDictionaryResultsType, and the SELECT values must be literals, aggregates, or columns specified in the GROUP BY. Aggregates will operate on the groups specified in the GROUP BY rather than the whole table.
-
setRelationshipKeyPathsForPrefetching
public void setRelationshipKeyPathsForPrefetching(NSArray<java.lang.String> value)
Returns/sets an array of relationship keypaths to prefetch along with the entity for the request. The array contains keypath strings in NSKeyValueCoding notation, as you would normally use with valueForKeyPath. (Prefetching allows Core Data to obtain developer-specified related objects in a single fetch (per entity), rather than incurring subsequent access to the store for each individual record as their faults are tripped.) Defaults to an empty array (no prefetching.)
-
setResultType
public void setResultType(long value)
Returns/sets the result type of the fetch request (the instance type of objects returned from executing the request.) Setting the value to NSManagedObjectIDResultType will demote any sort orderings to "best effort" hints if property values are not included in the request. Defaults to NSManagedObjectResultType.
-
setReturnsDistinctResults
public void setReturnsDistinctResults(boolean value)
Returns/sets if the fetch request returns only distinct values for the fields specified by propertiesToFetch. This value is only used for NSDictionaryResultType. Defaults to NO.
-
setReturnsObjectsAsFaults
public void setReturnsObjectsAsFaults(boolean value)
Returns/sets if the objects resulting from a fetch request are faults. If the value is set to NO, the returned objects are pre-populated with their property values (making them fully-faulted objects, which will immediately return NO if sent the -isFault message.) If the value is set to YES, the returned objects are not pre-populated (and will receive a -didFireFault message when the properties are accessed the first time.) This setting is not utilized if the result type of the request is NSManagedObjectIDResultType, as object IDs do not have property values. Defaults to YES.
-
setShouldRefreshRefetchedObjects
public void setShouldRefreshRefetchedObjects(boolean value)
-
setSortDescriptors
public void setSortDescriptors(NSArray<? extends NSSortDescriptor> value)
-
shouldRefreshRefetchedObjects
public boolean shouldRefreshRefetchedObjects()
-
sortDescriptors
public NSArray<? extends NSSortDescriptor> sortDescriptors()
-
-