Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun add(o: P): Single<String>

Adds a new object to the given collection in an asynchronous way based on the provided CreateProjection. It returns a Single<String> with the generated UID, which is completed when the object is added to the database. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload.

Link copied to clipboard
open fun blockingAdd(o: P): String

Adds a new object to the given collection in a synchronous way based on the provided CreateProjection. It blocks the current thread and returns the generated UID. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .rxAdd.

Link copied to clipboard
open 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 .rxCount.

Link copied to clipboard
open 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 .rxGet.

Link copied to clipboard

Get the list of uids of objects 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 .rxGetUids.

Link copied to clipboard

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 .rxIsEmpty.

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

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

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

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

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

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

Link copied to clipboard
fun getPager(pageSize: Int): Pager<Int, M>
Link copied to clipboard
open override fun getPagingData(pageSize: Int): Flow<PagingData<M>>

Uses Paging3 library and return a Flow

Link copied to clipboard
open fun getUids(): Single<List<String>>

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

Link copied to clipboard
open 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

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

Link copied to clipboard
open fun rxAdd(o: P): Single<String>

Adds a new object to the given collection in an asynchronous way based on the provided CreateProjection. It returns a Single<String> with the generated UID, which is completed when the object is added to the database. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload.

Link copied to clipboard
open fun rxCount(): Single<Int>

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

Link copied to clipboard
open fun rxGet(): Single<List<M>>

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

Link copied to clipboard
open fun rxGetUids(): Single<List<String>>

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

Link copied to clipboard
open fun rxIsEmpty(): 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
open suspend override fun suspendAdd(o: P): String

Adds a new object to the given collection in a suspend way based on the provided CreateProjection. It returns the generated UID when the object is added to the database. It adds an object with a State.TO_POST, which will be uploaded to the server in the next upload.

Link copied to clipboard
open suspend override fun suspendCount(): Int

Get the count of elements in a suspend way.

Link copied to clipboard
open suspend override fun suspendGet(): List<M>

Get the objects in scope in a suspend way.

Link copied to clipboard
open suspend override fun suspendGetUids(): List<String>

Get the list of uids of objects in scope in a suspend way.

Link copied to clipboard
open suspend override fun suspendIsEmpty(): Boolean

Check if selection of objects in current scope with applied filters is empty in a suspend way.

Link copied to clipboard
abstract fun uid(uid: String?): ReadOnlyObjectRepository<M>

Returns a new ReadOnlyObjectRepository whose scope is the one of the current repository plus the equal filter applied to the uid. This method is equivalent to byUid().eq(uid).one().