ReadRecordsRequestUsingIds.Builder


public static final class ReadRecordsRequestUsingIds.Builder
extends Object

java.lang.Object
   ↳ android.health.connect.ReadRecordsRequestUsingIds.Builder<T extends android.health.connect.datatypes.Record>


Builder class for ReadRecordsRequestUsingIds

Summary

Public constructors

Builder(Class<T> recordType)

Public methods

Builder<T> addClientRecordId(String clientRecordId)

Add a client id to the read request.

Builder<T> addId(String id)

Add an UUID to the read request.

ReadRecordsRequestUsingIds<T> build()

Returns Object of ReadRecordsRequestUsingIds

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

Builder

Added in API level 34
public Builder (Class<T> recordType)

Parameters
recordType Class: Record class for which the id is being set This value cannot be null.

Public methods

addClientRecordId

Added in API level 34
public Builder<T> addClientRecordId (String clientRecordId)

Add a client id to the read request.

The maximum number of ids in a single ReadRecordsRequestUsingIds that Health Connect accepts is 5000. The limit includes all ids and clientIds.

Parameters
clientRecordId String: identifier that was set while inserting the record This value cannot be null.

Returns
Builder<T> This value cannot be null.

addId

Added in API level 34
public Builder<T> addId (String id)

Add an UUID to the read request.

The maximum number of ids in a single ReadRecordsRequestUsingIds that Health Connect accepts is 5000. The limit includes all ids and clientIds.

Parameters
id String: Identifier generated by the platform and returned by HealthConnectManager.insertRecords(List, Executor, OutcomeReceiver) This value cannot be null.

Returns
Builder<T> This value cannot be null.

build

Added in API level 34
public ReadRecordsRequestUsingIds<T> build ()

Returns Object of ReadRecordsRequestUsingIds

Returns
ReadRecordsRequestUsingIds<T> This value cannot be null.