Package apple.healthkit
Class HKQuantitySeriesSampleBuilder
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.healthkit.HKQuantitySeriesSampleBuilder
-
- All Implemented Interfaces:
NSObject
public class HKQuantitySeriesSampleBuilder extends NSObject
HKQuantitySeriesSampleBuilder An HKQuantitySeriesSampleBuilder is used to generate HKQuantitySample(s) with multiple quantities. An HKQuantitySeriesSampleBuilder is used to incrementally create a new quantity series sample in the HealthKit database. This class may be used to create long-running quantity series samples that are associated with an activity like a workout. After inserting each of the quantities that make up the series, the series may be finalized by calling -finishSeriesWithMetadata:completion:. Calling -discard invalidates the series and discards any data that was previously associated with it.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceHKQuantitySeriesSampleBuilder.Block_finishSeriesWithMetadataCompletionstatic interfaceHKQuantitySeriesSampleBuilder.Block_finishSeriesWithMetadataEndDateCompletion-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHKQuantitySeriesSampleBuilder(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static HKQuantitySeriesSampleBuilderalloc()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()HKDevicedevice()[@property] devicevoiddiscard()discard Discards all previously inserted data and invalidates the series.voidfinishSeriesWithMetadataCompletion(NSDictionary<java.lang.String,?> metadata, HKQuantitySeriesSampleBuilder.Block_finishSeriesWithMetadataCompletion completion)finishSeriesWithMetadata:completion: Finalizes the series and returns the resulting HKQuantitySample(s).voidfinishSeriesWithMetadataEndDateCompletion(NSDictionary<java.lang.String,?> metadata, NSDate endDate, HKQuantitySeriesSampleBuilder.Block_finishSeriesWithMetadataEndDateCompletion completion)finishSeriesWithMetadata:endDate:completion: Finalizes the series and returns the resulting HKQuantitySample(s).static longhash_static()HKQuantitySeriesSampleBuilderinit()HKQuantitySeriesSampleBuilderinitWithHealthStoreQuantityTypeStartDateDevice(HKHealthStore healthStore, HKQuantityType quantityType, NSDate startDate, HKDevice device)initWithHealthStore:quantityType:device: The designated initializer to create an HKQuantitySeriesSampleBuilder.booleaninsertQuantityDateError(HKQuantity quantity, NSDate date, org.moe.natj.general.ptr.Ptr<NSError> error)insertQuantity:date:completion: Associate a new quantity with the receiver at a specific instantaneous date interval.booleaninsertQuantityDateIntervalError(HKQuantity quantity, NSDateInterval dateInterval, org.moe.natj.general.ptr.Ptr<NSError> error)insertQuantity:dateInterval:completion: Associate a new quantity with the receiver with a specific date interval.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()HKQuantityTypequantityType()[@property] quantityTypestatic booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)static voidsetVersion_static(long aVersion)NSDatestartDate()[@property] startDatestatic org.moe.natj.objc.Classsuperclass_static()static longversion_static()-
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 HKQuantitySeriesSampleBuilder 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()
-
device
public HKDevice device()
[@property] device
-
discard
public void discard()
discard Discards all previously inserted data and invalidates the series. Calling this method will delete all quantities that were previously inserted into the series and invalidate the receiver. Calling other methods on the receiver after calling -discard will result in an exception.
-
finishSeriesWithMetadataCompletion
public void finishSeriesWithMetadataCompletion(NSDictionary<java.lang.String,?> metadata, HKQuantitySeriesSampleBuilder.Block_finishSeriesWithMetadataCompletion completion)
finishSeriesWithMetadata:completion: Finalizes the series and returns the resulting HKQuantitySample(s). Call this method when all quantities for the series have been inserted. The completion handler will return the resulting HKQuantitySample(s) Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If no quantity data was added, then samples will be nil and an error will be returned. This method functions as a convenience for finishSeriesWithMetadata:endDate:completion: when endDate is nil. After calling this method, the receiver will be considered invalid and calling any other method will result in an error.- Parameters:
metadata- Optional metadata may be added to associate with the series. Predefined keys are found in HKMetadata.h, or custom NSString keys used by the client are allowed. Acceptable metadata value types are NSString, NSDate, NSNumber and HKQuantity.completion- The completion handler will return the resulting HKQuantitySample(s) for the series. Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If data could not be inserted because of an authorization failure, samples will be nil and and an error with code HKErrorAuthorizationDenied or HKErrorAuthorizationNotDetermined will be returned. If the resulting sample(s) could not be accessed after they have been created, then samples will be nil and an error with code HKErrorDatabaseInaccessible will be returned. Any other error indicates the resulting samples could not be returned. After calling this method, the receiver will be considered invalid and calling any other method will result in an error.
-
finishSeriesWithMetadataEndDateCompletion
public void finishSeriesWithMetadataEndDateCompletion(NSDictionary<java.lang.String,?> metadata, NSDate endDate, HKQuantitySeriesSampleBuilder.Block_finishSeriesWithMetadataEndDateCompletion completion)
finishSeriesWithMetadata:endDate:completion: Finalizes the series and returns the resulting HKQuantitySample(s). Call this method when all quantities for the series have been inserted. The completion handler will return the resulting HKQuantitySample(s) Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If no quantity data was added, then samples will be nil and an error will be returned. After calling this method, the receiver will be considered invalid and calling any other method will result in an error.- Parameters:
metadata- Optional metadata may be added to associate with the series. Predefined keys are found in HKMetadata.h, or custom NSString keys used by the client are allowed. Acceptable metadata value types are NSString, NSDate, NSNumber and HKQuantity.endDate- Optional date at which the produced sample(s) end. An HKErrorInvalidArgument will be returned if endDate is earlier than the receiver's startDate, or is earlier than the dateInterval.endDate of any inserted quantity.completion- The completion handler will return the resulting HKQuantitySample(s) for the series. Note that it is possible for a single HKQuantitySeriesSampleBuilder to produce multiple samples. If data could not be inserted because of an authorization failure, samples will be nil and and an error with code HKErrorAuthorizationDenied or HKErrorAuthorizationNotDetermined will be returned. If the resulting sample(s) could not be accessed after they have been created, then samples will be nil and an error with code HKErrorDatabaseInaccessible will be returned. Any other error indicates the resulting samples could not be returned. After calling this method, the receiver will be considered invalid and calling any other method will result in an error.
-
hash_static
public static long hash_static()
-
init
public HKQuantitySeriesSampleBuilder init()
-
initWithHealthStoreQuantityTypeStartDateDevice
public HKQuantitySeriesSampleBuilder initWithHealthStoreQuantityTypeStartDateDevice(HKHealthStore healthStore, HKQuantityType quantityType, NSDate startDate, HKDevice device)
initWithHealthStore:quantityType:device: The designated initializer to create an HKQuantitySeriesSampleBuilder. The HKHealthStore is retained during the life of the object for the saving of the series data and final return of the series sample.- Parameters:
healthStore- Specifies the HKHealthStore object to use for building the series.quantityType- Specifies the quantity type for which to build the series.startDate- The date from which the produced sample(s) start.device- The optional device represents the HKDevice from which the data is provided.
-
insertQuantityDateError
public boolean insertQuantityDateError(HKQuantity quantity, NSDate date, org.moe.natj.general.ptr.Ptr<NSError> error)
insertQuantity:date:completion: Associate a new quantity with the receiver at a specific instantaneous date interval. This method acts as a convenience for insertQuantity:dateInterval:completion: where dateInterval has a duration of 0.- Parameters:
quantity- The quantity to insert.date- The start date associated with the quantity. If this is the same start date as a previously-provided quantity, the new value will replace the old value. An HKErrorInvalidArgument will be returned if date is earlier than the receiver's startDate.
-
insertQuantityDateIntervalError
public boolean insertQuantityDateIntervalError(HKQuantity quantity, NSDateInterval dateInterval, org.moe.natj.general.ptr.Ptr<NSError> error)
insertQuantity:dateInterval:completion: Associate a new quantity with the receiver with a specific date interval. Use this method to add a quantity to the series. The quantity must have a unit that is compatible with the receiver's quantity type. See -[HKQuantityType isCompatibleWithUnit:]. Note that quantities may be inserted in any order, but will be sorted by dateInterval.startDate when the series is finished.- Parameters:
quantity- The quantity to insert.dateInterval- The dateInterval associated with the quantity. If dateInterval.startDate is the same as a previously-provided quantity, the new value will replace the old value. An HKErrorInvalidArgument will be returned if dateInterval.startDate is earlier than the receiver's startDate.
-
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()
-
quantityType
public HKQuantityType quantityType()
[@property] quantityType
-
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)
-
startDate
public NSDate startDate()
[@property] startDate
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
version_static
public static long version_static()
-
-