Functions

Link copied to clipboard
abstract fun blockingCount(): Int

Get the count of elements. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .count.

Link copied to clipboard
abstract fun blockingGet(): List<M>

Get the list of objects in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .get.

Link copied to clipboard
abstract fun blockingIsEmpty(): Boolean

Check if selection of objects with applied filters is empty in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .isEmpty.

Link copied to clipboard
abstract fun blockingUpload()

Uploads the resources in scope in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .upload. The method will finish as soon as the whole upload an processing is finished.

Link copied to clipboard
abstract fun count(): Single<Int>

Get the count of elements in an asynchronous way, returning a Single.

Link copied to clipboard
abstract fun get(): Single<List<M>>

Get the objects in scope in an asynchronous way, returning a Single<List>.

Link copied to clipboard
abstract fun getPaged(pageSize: Int): LiveData<PagedList<M>>

Handy method to use in conjunction with PagedListAdapter to build paged lists.

Link copied to clipboard
abstract fun getPagingData(pageSize: Int): Flow<PagingData<M>>

Uses Paging3 library and return a Flow

Link copied to clipboard
abstract fun isEmpty(): Single<Boolean>

Check if selection of objects in current scope with applied filters is empty in an asynchronous way, returning a Single.

Link copied to clipboard
abstract fun one(): ReadOnlyObjectRepository<M>

Get a ReadOnlyObjectRepository pointing to the first element in the list.

Link copied to clipboard
abstract fun upload(): Observable<D2Progress>

Uploads the resources in scope in an asynchronous way. An Observable<D2Progress> is returned, which will emit progress until the whole upload is finished and the Observable is completed.