AppSearchBatchResult

public final class AppSearchBatchResult
extends Object

java.lang.Object
   ↳ androidx.appsearch.app.AppSearchBatchResult<KeyType, ValueType>


Provides results for AppSearch batch operations which encompass multiple documents.

Individual results of a batch operation are separated into two maps: one for successes and one for failures. For successes, getSuccesses() will return a map of keys to instances of the value type. For failures, getFailures() will return a map of keys to AppSearchResult objects.

Alternatively, getAll() returns a map of keys to AppSearchResult objects for both successes and failures.

Summary

Nested classes

class AppSearchBatchResult.Builder<KeyType, ValueType>

Builder for AppSearchBatchResult objects. 

Public methods

Map<KeyType, AppSearchResult<ValueType>> getAll()

Returns a Map of keys mapped to instances of AppSearchResult for all individual results.

Map<KeyType, AppSearchResult<ValueType>> getFailures()

Returns a Map of keys mapped to instances of AppSearchResult for all failed individual results.

Map<KeyType, ValueType> getSuccesses()

Returns a Map of keys mapped to instances of the value type for all successful individual results.

boolean isSuccess()

Returns true if this AppSearchBatchResult has no failures.

String toString()

Inherited methods