FavoritesDataProvider

interface FavoritesDataProvider : LocalDataProvider<FavoriteRecord>

LocalDataProvider typed to store FavoriteRecord items.

To obtain FavoritesDataProvider instance, please, use MapboxSearchSdk.serviceProvider.

See also

Functions

add
Link copied to clipboard
open fun add(record: FavoriteRecord, callback: CompletionCallback<Unit>): AsyncOperationTask
Adds a record to this data provider.
abstract fun add(record: FavoriteRecord, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Adds a record to this data provider.
addAll
Link copied to clipboard
open fun addAll(records: List<FavoriteRecord>, callback: CompletionCallback<Unit>): AsyncOperationTask
Add multiple records to this data provider.
abstract fun addAll(records: List<FavoriteRecord>, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Add multiple records to this data provider.
addOnDataChangedListener
Link copied to clipboard
Adds a listener to be notified of data provider changes.
abstract fun addOnDataChangedListener(executor: Executor, listener: LocalDataProvider.OnDataChangedListener<FavoriteRecord>)
Adds a listener to be notified of data provider changes.
clear
Link copied to clipboard
open fun clear(callback: CompletionCallback<Unit>): AsyncOperationTask
Removes all the records in this data provider.
abstract fun clear(executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Removes all the records in this data provider.
contains
Link copied to clipboard
open fun contains(id: String, callback: CompletionCallback<Boolean>): AsyncOperationTask
Checks whether this data provider contains a record with specified id.
abstract fun contains(id: String, executor: Executor, callback: CompletionCallback<Boolean>): AsyncOperationTask
Checks whether this data provider contains a record with specified id.
get
Link copied to clipboard
open fun get(id: String, callback: CompletionCallback<in FavoriteRecord?>): AsyncOperationTask
Retrieves the record with specified id or null if there's no such record.
abstract fun get(id: String, executor: Executor, callback: CompletionCallback<in FavoriteRecord?>): AsyncOperationTask
Retrieves the record with specified id or null if there's no such record.
getAll
Link copied to clipboard
open fun getAll(callback: CompletionCallback<List<FavoriteRecord>>): AsyncOperationTask
Retrieves all records from this provider.
abstract fun getAll(executor: Executor, callback: CompletionCallback<List<FavoriteRecord>>): AsyncOperationTask
Retrieves all records from this provider.
open fun registerIndexableDataProviderEngineLayer(dataProviderEngineLayer: IndexableDataProviderEngineLayer, callback: CompletionCallback<Unit>): AsyncOperationTask
Experimental API, can be changed or removed in the next SDK releases.
abstract fun registerIndexableDataProviderEngineLayer(dataProviderEngineLayer: IndexableDataProviderEngineLayer, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Experimental API, can be changed or removed in the next SDK releases.
remove
Link copied to clipboard
open fun remove(id: String, callback: CompletionCallback<Boolean>): AsyncOperationTask
Removes the record with specified id.
abstract fun remove(id: String, executor: Executor, callback: CompletionCallback<Boolean>): AsyncOperationTask
Removes the record with specified id.
removeOnDataChangedListener
Link copied to clipboard
abstract fun removeOnDataChangedListener(listener: LocalDataProvider.OnDataChangedListener<FavoriteRecord>)
Removes listener to stop being notified of data provider changes.
open fun unregisterIndexableDataProviderEngineLayer(dataProviderEngineLayer: IndexableDataProviderEngineLayer, callback: CompletionCallback<Boolean>): AsyncOperationTask
Experimental API, can be changed or removed in the next SDK releases.
abstract fun unregisterIndexableDataProviderEngineLayer(dataProviderEngineLayer: IndexableDataProviderEngineLayer, executor: Executor, callback: CompletionCallback<Boolean>): AsyncOperationTask
Experimental API, can be changed or removed in the next SDK releases.
update
Link copied to clipboard
open fun update(record: FavoriteRecord, callback: CompletionCallback<Unit>): AsyncOperationTask
Updates record in this data provider.
abstract fun update(record: FavoriteRecord, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Updates record in this data provider.

Properties

dataProviderName
Link copied to clipboard
abstract val dataProviderName: String
Data provider name.