EnrollmentObjectRepository

class EnrollmentObjectRepository : ReadWriteWithUidDataObjectRepositoryImpl<Enrollment, EnrollmentObjectRepository>

Functions

Link copied to clipboard
open override fun blockingDelete()

Removes the object in scope in a synchronous way. Field DataObject.syncState is marked as State.TO_UPDATE and DeletableDataObject.deleted as true. In the next upload, it will be deleted in the server. It blocks the thread and finishes as soon as the object is deleted in the database. It throws an exception if the object doesn't exist.

Link copied to clipboard
open override fun blockingDeleteIfExist()

Removes the object in scope in an asynchronous way. Field DataObject.syncState is marked as State.TO_POST and DeletableDataObject.deleted as true. Unlike .blockingDelete, it doesn't throw an exception if the object doesn't exist. It blocks the thread and finishes as soon as the object is deleted in the database.

Link copied to clipboard
open override fun blockingExists(): Boolean

Returns if the object exists in a synchronous way. Important: this is a blocking method and it should not be executed in the main thread. Consider the asynchronous version .exists.

Link copied to clipboard
open override fun blockingGet(): Enrollment?

Returns the object 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
Link copied to clipboard
open override fun delete(): Completable

Removes the object in scope in an asynchronous way. Field DataObject.syncState is marked as State.TO_UPDATE and DeletableDataObject.deleted as true. In the next upload, it will be deleted in the server. It returns a Completable that completes as soon as the object is deleted in the database. The Completable fails if the object doesn't exist.

Link copied to clipboard
open override fun deleteIfExist(): Completable

Removes the object in scope in a synchronous way. Field DataObject.syncState is marked as State.TO_POST and DeletableDataObject.deleted as true. Unlike .delete, it doesn't throw an exception if the object doesn't exist. It returns a Completable that completes as soon as the object is deleted in the database.

Link copied to clipboard
open override fun exists(): Single<Boolean>

Returns if the object exists in an asynchronous way, returning a Single<Boolean>.

Link copied to clipboard
open override fun get(): Single<Enrollment?>

Returns the object in an asynchronous way, returning a Single<M>.

Link copied to clipboard
fun setCompletedDate(completedDate: Date?): Unit
Link copied to clipboard
fun setEnrollmentDate(enrollmentDate: Date?): Unit
Link copied to clipboard
fun setFollowUp(followUp: Boolean?): Unit
Link copied to clipboard
fun setGeometry(geometry: Geometry?): Unit
Link copied to clipboard
fun setIncidentDate(incidentDate: Date?): Unit
Link copied to clipboard
fun setOrganisationUnitUid(organisationUnitUid: String?): Unit
Link copied to clipboard
fun setStatus(enrollmentStatus: EnrollmentStatus): Unit