Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun add(o: EventCreateProjection): 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

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

Link copied to clipboard
open override 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
open override fun blockingGet(): List<Event>

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
open override fun blockingGetUids(): List<String>

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

Link copied to clipboard
open override 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
open override 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
Link copied to clipboard
fun byAssignedUser(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
Link copied to clipboard
fun byCompleteDate(): DateFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byCompletedBy(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byCreated(): DateFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byCreatedAtClient(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byDataValue(dataElementId: String): ValueSubQueryFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byDeleted(): BooleanFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byDueDate(): DateFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byEnrollmentUid(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byEventDate(): DateFilterConnector<EventCollectionRepository>
Link copied to clipboard
Link copied to clipboard
fun byGeometryCoordinates(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
Link copied to clipboard
fun byLastUpdated(): DateFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byLastUpdatedAtClient(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byOrganisationUnitUid(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byProgramStageUid(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byProgramUid(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
fun byState(): EnumFilterConnector<EventCollectionRepository, State>
Link copied to clipboard
fun byStatus(): EnumFilterConnector<EventCollectionRepository, EventStatus>
Link copied to clipboard
fun bySyncState(): EnumFilterConnector<EventCollectionRepository, State>
Link copied to clipboard
fun byUid(): StringFilterConnector<EventCollectionRepository>
Link copied to clipboard
open override fun count(): Single<Int>

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

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

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<Event>>

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

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

Uses Paging3 library and return a Flow

Link copied to clipboard
open override 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 override 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 override fun uid(uid: String?): EventObjectRepository

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().

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

Link copied to clipboard