LocalDataProvider

interface LocalDataProvider<R : IndexableRecord> : IndexableDataProvider<R>

IndexableDataProvider that represents stored locally by the SDK user data.

See also

Types

OnDataChangedListener
Link copied to clipboard
interface OnDataChangedListener<R : IndexableRecord>
Listener to be notified of data provider changes.
OnDataProviderEngineRegisterListener
Link copied to clipboard
interface OnDataProviderEngineRegisterListener
Listener to be notified when IndexableDataProviderEngine registered in this data provider.

Functions

addOnDataChangedListener
Link copied to clipboard
open fun addOnDataChangedListener(listener: LocalDataProvider.OnDataChangedListener<R>)
Adds a listener to be notified of data provider changes.
abstract fun addOnDataChangedListener(executor: Executor, listener: LocalDataProvider.OnDataChangedListener<R>)
Adds a listener to be notified of data provider changes.
addOnDataProviderEngineRegisterListener
Link copied to clipboard
Adds a listener to be notified when IndexableDataProviderEngine registered in this data provider.
Adds a listener to be notified when IndexableDataProviderEngine registered in this data provider.
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 R?>): 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 R?>): 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<R>>): AsyncOperationTask
Retrieves all records from this provider.
abstract fun getAll(executor: Executor, callback: CompletionCallback<List<R>>): AsyncOperationTask
Retrieves all records from this provider.
registerIndexableDataProviderEngine
Link copied to clipboard
open fun registerIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, callback: CompletionCallback<Unit>): AsyncOperationTask
Registers engine with this data provider.
abstract fun registerIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Registers engine with this data provider.
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<R>)
Removes a previously added listener.
Removes a previously added listener.
unregisterIndexableDataProviderEngine
Link copied to clipboard
open fun unregisterIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, callback: CompletionCallback<Boolean>): AsyncOperationTask
Unregisters engine from this data provider.
abstract fun unregisterIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, executor: Executor, callback: CompletionCallback<Boolean>): AsyncOperationTask
Unregisters engine from this data provider.
upsert
Link copied to clipboard
open fun upsert(record: R, callback: CompletionCallback<Unit>): AsyncOperationTask
Insert or update a record to this data provider.
abstract fun upsert(record: R, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Insert or update a record in this data provider.
upsertAll
Link copied to clipboard
open fun upsertAll(records: List<R>, callback: CompletionCallback<Unit>): AsyncOperationTask
Upsert (insert or update) multiple records to this data provider.
abstract fun upsertAll(records: List<R>, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask
Upsert (insert or update) multiple records to this data provider.

Properties

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

Inheritors

FavoritesDataProvider
Link copied to clipboard
HistoryDataProvider
Link copied to clipboard