Class HKQuery

    • Constructor Detail

      • HKQuery

        protected HKQuery​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static HKQuery alloc()
      • allocWithZone

        public static HKQuery 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()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • 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 HKQuery new_objc()
      • predicateForActivitySummariesBetweenStartDateComponentsEndDateComponents

        @NotNull
        public static @NotNull NSPredicate predicateForActivitySummariesBetweenStartDateComponentsEndDateComponents​(@NotNull
                                                                                                                    @NotNull NSDateComponents startDateComponents,
                                                                                                                    @NotNull
                                                                                                                    @NotNull NSDateComponents endDateComponents)
        predicateForActivitySummariesBetweenStartDateComponents:endDateComponents: Creates a predicate for use with HKActivitySummaryQuery Creates a query predicate that matches HKActivitySummaries that fall between the given date components.
        Parameters:
        startDateComponents - The date components that define the beginning of the range. These date components should contain era, year, month, and day components in the gregorian calendar.
        endDateComponents - The date components that define the end of the range. These date components should contain era, year, month, and day components in the gregorian calendar. API-Since: 9.3
      • predicateForActivitySummaryWithDateComponents

        @NotNull
        public static @NotNull NSPredicate predicateForActivitySummaryWithDateComponents​(@NotNull
                                                                                         @NotNull NSDateComponents dateComponents)
        predicateForActivitySummaryWithDateComponents: Creates a predicate for use with HKActivitySummaryQuery Creates a query predicate that matches HKActivitySummaries with the given date components.
        Parameters:
        dateComponents - The date components of the activity summary. These date components should contain era, year, month, and day components in the gregorian calendar. API-Since: 9.3
      • predicateForCategorySamplesWithOperatorTypeValue

        @NotNull
        public static @NotNull NSPredicate predicateForCategorySamplesWithOperatorTypeValue​(long operatorType,
                                                                                            long value)
      • predicateForObjectWithUUID

        @NotNull
        public static @NotNull NSPredicate predicateForObjectWithUUID​(@NotNull
                                                                      @NotNull NSUUID UUID)
        predicateForObjectWithUUID: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches the object saved with a particular UUID.
        Parameters:
        UUID - The UUID of the object.
      • predicateForObjectsFromDevices

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsFromDevices​(@NotNull
                                                                          @NotNull NSSet<? extends HKDevice> devices)
        predicateForObjectsFromDevices: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches objects associated with any of the given devices. All properties of each HKDevice are considered in the query and must match exactly, including nil values. To perform searches based on specific device properties, use predicateForObjectsWithDeviceProperty:allowedValues:.
        Parameters:
        devices - The set of devices that generated data. API-Since: 9.0
      • predicateForObjectsFromSource

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsFromSource​(@NotNull
                                                                         @NotNull HKSource source)
        predicateForObjectsFromSource: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches objects saved by a given source.
        Parameters:
        source - The source.
      • predicateForObjectsFromSourceRevisions

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsFromSourceRevisions​(@NotNull
                                                                                  @NotNull NSSet<? extends HKSourceRevision> sourceRevisions)
        predicateForObjectsFromSourceRevisions: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches objects saved by any of the specified HKSourceRevisions.
        Parameters:
        sourceRevisions - The list of source revisions. API-Since: 9.0
      • predicateForObjectsFromSources

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsFromSources​(@NotNull
                                                                          @NotNull NSSet<? extends HKSource> sources)
        predicateForObjectsFromSources: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches objects saved by any of the given sources.
        Parameters:
        sources - The list of sources.
      • predicateForObjectsFromWorkout

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsFromWorkout​(@NotNull
                                                                          @NotNull HKWorkout workout)
        predicateForObjectsFromWorkout: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches the objects that have been added to the given workout.
        Parameters:
        workout - The HKWorkout that the object was added to.
      • predicateForObjectsWithDevicePropertyAllowedValues

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsWithDevicePropertyAllowedValues​(@NotNull
                                                                                              @NotNull java.lang.String key,
                                                                                              @NotNull
                                                                                              @NotNull NSSet<java.lang.String> allowedValues)
        predicateForObjectsWithDeviceProperty:allowedValues: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches objects associated with an HKDevice with the specified device property matching any value included in allowedValues. To query for samples with devices that match all the properties of an HKDevice, use predicateForObjectsFromDevices.
        Parameters:
        key - The device property key. (See HKDevice.h)
        allowedValues - The set of values for which the device property can match. An empty set will match all devices whose property value is nil. API-Since: 9.0
      • predicateForObjectsWithMetadataKey

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsWithMetadataKey​(@NotNull
                                                                              @NotNull java.lang.String key)
        predicateForObjectsWithMetadataKey: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches objects with metadata that contains a given key.
        Parameters:
        key - The metadata key.
      • predicateForObjectsWithMetadataKeyAllowedValues

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsWithMetadataKeyAllowedValues​(@NotNull
                                                                                           @NotNull java.lang.String key,
                                                                                           @NotNull
                                                                                           @NotNull NSArray<?> allowedValues)
        predicateForObjectsWithMetadataKey:allowedValues: Creates a predicate for use with HKQuery subclasses Creates a query predicate that matches objects with metadata containing a value the matches one of the given values for the given key.
        Parameters:
        key - The metadata key.
        allowedValues - The list of values that the metadata value can be equal to.
      • predicateForObjectsWithMetadataKeyOperatorTypeValue

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsWithMetadataKeyOperatorTypeValue​(@NotNull
                                                                                               @NotNull java.lang.String key,
                                                                                               long operatorType,
                                                                                               @NotNull
                                                                                               @NotNull java.lang.Object value)
        predicateForObjectsWithMetadataKey:operatorType:value: Creates a predicate for use with HKQuery subclasses Creates a query predicate that matches objects with a value for a given metadata key matches the given operator type and value.
        Parameters:
        key - The metadata key.
        operatorType - The comparison operator type for the expression.
        value - The value to be compared against.
      • predicateForObjectsWithNoCorrelation

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsWithNoCorrelation()
        predicateForObjectsNoCorrelation Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches the objects that are not associated with an HKCorrelation.
      • predicateForObjectsWithUUIDs

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsWithUUIDs​(@NotNull
                                                                        @NotNull NSSet<? extends NSUUID> UUIDs)
        predicateForObjectsWithUUIDs: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches the objects saved with one of the given UUIDs.
        Parameters:
        UUIDs - The set of NSUUIDs.
      • predicateForQuantitySamplesWithOperatorTypeQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForQuantitySamplesWithOperatorTypeQuantity​(long operatorType,
                                                                                               @NotNull
                                                                                               @NotNull HKQuantity quantity)
        predicateForQuantitySamplesWithOperatorType:quantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches quantity samples with values that match the expression formed by the given operator and quantity.
        Parameters:
        operatorType - The operator type for the expression.
        quantity - The quantity that the sample's quantity is being compared to. It is the right hand side of the expression.
      • predicateForSamplesWithStartDateEndDateOptions

        @NotNull
        public static @NotNull NSPredicate predicateForSamplesWithStartDateEndDateOptions​(@Nullable
                                                                                          @Nullable NSDate startDate,
                                                                                          @Nullable
                                                                                          @Nullable NSDate endDate,
                                                                                          long options)
        predicateForSamplesWithStartDate:endDate:options: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches samples with a startDate and an endDate that lie inside of a given time interval.
        Parameters:
        startDate - The start date of the predicate's time interval.
        endDate - The end date of the predicate's time interval.
        options - The rules for how a sample's time interval overlaps with the predicate's time interval.
      • predicateForWorkoutsWithOperatorTypeDuration

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeDuration​(long operatorType,
                                                                                        double duration)
        predicateForWorkoutsWithOperatorType:duration: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and duration
        Parameters:
        operatorType - The operator type for the expression.
        duration - The value that the workout's duration is being compared to. It is the right hand side of the expression.
      • predicateForWorkoutsWithOperatorTypeTotalDistance

        @NotNull
        @Deprecated
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeTotalDistance​(long operatorType,
                                                                                             @NotNull
                                                                                             @NotNull HKQuantity totalDistance)
        Deprecated.
        predicateForWorkoutsWithOperatorType:totalDistance: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and totalEnergyBurned
        Parameters:
        operatorType - The operator type for the expression.
        totalDistance - The value that the workout's totalEnergyBurned is being compared to. It is the right hand side of the expression. The unit for this value should be of type Distance. API-Since: 8.0 Deprecated-Since: 100000.0 Deprecated-Message: Use predicateForWorkoutActivitiesWithOperatorType:quantityType:sumQuantity: passing the HKQuantityType for the desired distance type
      • predicateForWorkoutsWithOperatorTypeTotalEnergyBurned

        @NotNull
        @Deprecated
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeTotalEnergyBurned​(long operatorType,
                                                                                                 @NotNull
                                                                                                 @NotNull HKQuantity totalEnergyBurned)
        Deprecated.
        predicateForWorkoutsWithOperatorType:totalEnergyBurned: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and totalEnergyBurned
        Parameters:
        operatorType - The operator type for the expression.
        totalEnergyBurned - The value that the workout's totalEnergyBurned is being compared to. It is the right hand side of the expression. The unit for this value should be of type Energy. API-Since: 8.0 Deprecated-Since: 100000.0 Deprecated-Message: Use predicateForWorkoutActivitiesWithOperatorType:quantityType:sumQuantity: passing the HKQuantityType for HKQuantityTypeIdentifierActiveEnergyBurned
      • predicateForWorkoutsWithOperatorTypeTotalSwimmingStrokeCount

        @NotNull
        @Deprecated
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeTotalSwimmingStrokeCount​(long operatorType,
                                                                                                        @NotNull
                                                                                                        @NotNull HKQuantity totalSwimmingStrokeCount)
        Deprecated.
        predicateForWorkoutsWithOperatorType:totalSwimmingStrokeCount: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and totalSwimmingStrokeCount
        Parameters:
        operatorType - The operator type for the expression.
        totalSwimmingStrokeCount - The value that the workout's totalSwimmingStrokeCount is being compared to. It is the right hand side of the expression. The unit for this value should be of type Count. API-Since: 10.0 Deprecated-Since: 100000.0 Deprecated-Message: Use predicateForWorkoutActivitiesWithOperatorType:quantityType:sumQuantity:
      • predicateForWorkoutsWithWorkoutActivityType

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutsWithWorkoutActivityType​(long workoutActivityType)
        predicateForWorkoutsWithWorkoutActivityType: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts with the given HKWorkoutActivityType.
        Parameters:
        workoutActivityType - The HKWorkoutActivity type of the workout
      • 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()
      • objectType

        @Nullable
        public @Nullable HKObjectType objectType()
        API-Since: 9.3
      • predicate

        @Nullable
        public @Nullable NSPredicate predicate()
      • sampleType

        @Nullable
        @Deprecated
        public @Nullable HKSampleType sampleType()
        Deprecated.
        API-Since: 8.0 Deprecated-Since: 9.3
      • predicateForWorkoutsWithOperatorTypeTotalFlightsClimbed

        @NotNull
        @Deprecated
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeTotalFlightsClimbed​(long operatorType,
                                                                                                   @NotNull
                                                                                                   @NotNull HKQuantity totalFlightsClimbed)
        Deprecated.
        predicateForWorkoutsWithOperatorType:totalFlightsClimbed: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and totalFlightsClimbed
        Parameters:
        operatorType - The operator type for the expression.
        totalFlightsClimbed - The value that the workout's totalFlightsClimbed is being compared to. It is the right hand side of the expression. The unit for this value should be of type Count. API-Since: 11.0 Deprecated-Since: 100000.0 Deprecated-Message: Use predicateForWorkoutActivitiesWithOperatorType:quantityType:sumQuantity: passing the HKQuantityType for HKQuantityTypeIdentifierSwimmingStrokeCount
      • predicateForClinicalRecordsFromSourceFHIRResourceTypeIdentifier

        @NotNull
        public static @NotNull NSPredicate predicateForClinicalRecordsFromSourceFHIRResourceTypeIdentifier​(@NotNull
                                                                                                           @NotNull HKSource source,
                                                                                                           @NotNull
                                                                                                           @NotNull java.lang.String resourceType,
                                                                                                           @NotNull
                                                                                                           @NotNull java.lang.String identifier)
        predicateForClinicalRecordsFromSource:withFHIRResourceType:identifier: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKClinicalRecords for a given source, FHIR resource type, and FHIR identifier.
        Parameters:
        source - The source.
        resourceType - The FHIR resource type.
        identifier - The FHIR identifier. API-Since: 12.0
      • predicateForClinicalRecordsWithFHIRResourceType

        @NotNull
        public static @NotNull NSPredicate predicateForClinicalRecordsWithFHIRResourceType​(@NotNull
                                                                                           @NotNull java.lang.String resourceType)
        predicateForClinicalRecordsWithFHIRResourceType: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKClinicalRecords with a specific FHIR resource type.
        Parameters:
        resourceType - The FHIR resource type. API-Since: 12.0
      • predicateForElectrocardiogramsWithClassification

        @NotNull
        public static @NotNull NSPredicate predicateForElectrocardiogramsWithClassification​(long classification)
        predicateForElectrocardiogramsWithClassification: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKElectrocardiograms with a specific classification.
        Parameters:
        classification - The classification for the electrocardiogram. API-Since: 14.0
      • predicateForElectrocardiogramsWithSymptomsStatus

        @NotNull
        public static @NotNull NSPredicate predicateForElectrocardiogramsWithSymptomsStatus​(long symptomsStatus)
        predicateForElectrocardiogramsWithSymptomsStatus: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKElectrocardiograms with a specificied symptoms status.
        Parameters:
        symptomsStatus - The symptoms status for the electrocardiogram. API-Since: 14.0
      • predicateForObjectsAssociatedWithElectrocardiogram

        @NotNull
        public static @NotNull NSPredicate predicateForObjectsAssociatedWithElectrocardiogram​(@NotNull
                                                                                              @NotNull HKElectrocardiogram electrocardiogram)
        predicateForObjectsAssociatedWithElectrocardiogram: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches the objects that have been added to the given electrocardiogram
        Parameters:
        electrocardiogram - The HKElectrocardiogram that the object was added to. API-Since: 14.0
      • predicateForVerifiableClinicalRecordsWithRelevantDateWithinDateInterval

        @NotNull
        public static @NotNull NSPredicate predicateForVerifiableClinicalRecordsWithRelevantDateWithinDateInterval​(@NotNull
                                                                                                                   @NotNull NSDateInterval dateInterval)
        predicateForVerifiableClinicalRecordsWithRelevantDateWithinDateInterval: Creates a predicate for use with HKQuery subclasses. Creates a predicate that matches HKVerifiableClinicalRecords with a relevant date within a date interval.
        Parameters:
        dateInterval - The date interval that the record's relevant date is in. API-Since: 15.0
      • predicateForCategorySamplesEqualToValues

        @NotNull
        public static @NotNull NSPredicate predicateForCategorySamplesEqualToValues​(@NotNull
                                                                                    @NotNull NSSet<? extends NSNumber> values)
        predicateForCategorySamplesEqualToValues: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches all specified category values.
      • predicateForWorkoutActivitiesWithOperatorTypeDuration

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutActivitiesWithOperatorTypeDuration​(long operatorType,
                                                                                                 double duration)
        predicateForWorkoutActivitiesWithOperatorType:duration: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkoutActivity objects by the given operator type and duration. The resulting predicate should be wrapped using predicateForWorkoutsWithActivityPredicate: before being used in a query.
        Parameters:
        operatorType - The operator type for the expression.
        duration - The value that the workout's duration is being compared to. It is the right hand side of the expression. API-Since: 16.0
      • predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeAverageQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeAverageQuantity​(long operatorType,
                                                                                                                    @NotNull
                                                                                                                    @NotNull HKQuantityType quantityType,
                                                                                                                    @NotNull
                                                                                                                    @NotNull HKQuantity averageQuantity)
        predicateForWorkoutActivitiesWithOperatorType:quantityType:averageQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkoutActivity objetcs by the given operator type and averageQuantity in the statistics for the specified type. The resulting predicate should be wrapped using predicateForWorkoutsWithActivityPredicate: before being used in a query.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a discrete quantity type.
        averageQuantity - The average value that the activity statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeMaximumQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeMaximumQuantity​(long operatorType,
                                                                                                                    @NotNull
                                                                                                                    @NotNull HKQuantityType quantityType,
                                                                                                                    @NotNull
                                                                                                                    @NotNull HKQuantity maximumQuantity)
        predicateForWorkoutActivitiesWithOperatorType:quantityType:maximumQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkoutActivity objetcs by the given operator type and maximumQuantity in the statistics for the specified type. The resulting predicate should be wrapped using predicateForWorkoutsWithActivityPredicate: before being used in a query.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a discrete quantity type.
        maximumQuantity - The maximum value that the activity statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeMinimumQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeMinimumQuantity​(long operatorType,
                                                                                                                    @NotNull
                                                                                                                    @NotNull HKQuantityType quantityType,
                                                                                                                    @NotNull
                                                                                                                    @NotNull HKQuantity minimumQuantity)
        predicateForWorkoutActivitiesWithOperatorType:quantityType:minimumQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkoutActivity objetcs by the given operator type and minimumQuantity in the statistics for the specified type. The resulting predicate should be wrapped using predicateForWorkoutsWithActivityPredicate: before being used in a query.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a discrete quantity type.
        minimumQuantity - The minumum value that the activty statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeSumQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutActivitiesWithOperatorTypeQuantityTypeSumQuantity​(long operatorType,
                                                                                                                @NotNull
                                                                                                                @NotNull HKQuantityType quantityType,
                                                                                                                @NotNull
                                                                                                                @NotNull HKQuantity sumQuantity)
        predicateForWorkoutActivitiesWithOperatorType:quantityType:sumQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkoutActivity objetcs by the given operator type and sumQuantity in the statistics for the specified type. The resulting predicate should be wrapped using predicateForWorkoutsWithActivityPredicate: before being used in a query.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a cumulative quantity type.
        sumQuantity - The sum value that the activity statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • predicateForWorkoutActivitiesWithStartDateEndDateOptions

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutActivitiesWithStartDateEndDateOptions​(@Nullable
                                                                                                    @Nullable NSDate startDate,
                                                                                                    @Nullable
                                                                                                    @Nullable NSDate endDate,
                                                                                                    long options)
        predicateForWorkoutActivitiesWithStartDate:endDate:options: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkoutActivity objects with a startDate and an endDate that lie inside of a given time interval. The resulting predicate should be wrapped using predicateForWorkoutsWithActivityPredicate: before being used in a query.
        Parameters:
        startDate - The start date of the predicate's time interval.
        endDate - The end date of the predicate's time interval.
        options - The rules for how a activity's time interval overlaps with the predicate's time interval. API-Since: 16.0
      • predicateForWorkoutActivitiesWithWorkoutActivityType

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutActivitiesWithWorkoutActivityType​(long workoutActivityType)
        predicateForWorkoutActivitiesWithWorkoutActivityType: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkoutActivity objects with the given HKWorkoutActivityType. The resulting predicate should be wrapped using predicateForWorkoutsWithActivityPredicate: before being used in a query.
        Parameters:
        workoutActivityType - The HKWorkoutActivity type of the workout API-Since: 16.0
      • predicateForWorkoutsWithActivityPredicate

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutsWithActivityPredicate​(@NotNull
                                                                                     @NotNull NSPredicate activityPredicate)
        predicateForWorkoutsWithActivityPredicate: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches workouts containing an activity matching the passed predicate.
        Parameters:
        activityPredicate - The predicate on the activities of the workout API-Since: 16.0
      • predicateForWorkoutsWithOperatorTypeQuantityTypeAverageQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeQuantityTypeAverageQuantity​(long operatorType,
                                                                                                           @NotNull
                                                                                                           @NotNull HKQuantityType quantityType,
                                                                                                           @NotNull
                                                                                                           @NotNull HKQuantity averageQuantity)
        predicateForWorkoutsWithOperatorType:quantityType:averageQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and averageQuantity in the statistics for the specified type.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a discrete quantity type.
        averageQuantity - The average value that the workout statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • predicateForWorkoutsWithOperatorTypeQuantityTypeMaximumQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeQuantityTypeMaximumQuantity​(long operatorType,
                                                                                                           @NotNull
                                                                                                           @NotNull HKQuantityType quantityType,
                                                                                                           @NotNull
                                                                                                           @NotNull HKQuantity maximumQuantity)
        predicateForWorkoutsWithOperatorType:quantityType:maximumQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and maximumQuantity in the statistics for the specified type.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a discrete quantity type.
        maximumQuantity - The maximum value that the workout statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • predicateForWorkoutsWithOperatorTypeQuantityTypeMinimumQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeQuantityTypeMinimumQuantity​(long operatorType,
                                                                                                           @NotNull
                                                                                                           @NotNull HKQuantityType quantityType,
                                                                                                           @NotNull
                                                                                                           @NotNull HKQuantity minimumQuantity)
        predicateForWorkoutsWithOperatorType:quantityType:minimumQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and minimumQuantity in the statistics for the specified type.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a discrete quantity type.
        minimumQuantity - The minumum value that the workout statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • predicateForWorkoutsWithOperatorTypeQuantityTypeSumQuantity

        @NotNull
        public static @NotNull NSPredicate predicateForWorkoutsWithOperatorTypeQuantityTypeSumQuantity​(long operatorType,
                                                                                                       @NotNull
                                                                                                       @NotNull HKQuantityType quantityType,
                                                                                                       @NotNull
                                                                                                       @NotNull HKQuantity sumQuantity)
        predicateForWorkoutsWithOperatorType:quantityType:sumQuantity: Creates a predicate for use with HKQuery subclasses. Creates a query predicate that matches HKWorkouts by the given operator type and sumQuantity in the statistics for the specified type.
        Parameters:
        operatorType - The operator type for the expression.
        quantityType - The quantity type to compare statistics for. Should be a cumulative quantity type.
        sumQuantity - The sum value that the workout statistics are being compared to. The unit for this value should match the allowed values for the quantityType. API-Since: 16.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.