PeriodHelper

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Get a period object specifying a periodId. If the periodId does not exist in the database, it is inserted.

Link copied to clipboard
fun blockingGetPeriodForPeriodTypeAndDate(periodType: PeriodType, date: Date, periodOffset: Int = 0): Period

Get a period object specifying a periodType and a date in the period. If the period does not exist in the database, it is inserted.

Link copied to clipboard
Link copied to clipboard
fun getPeriod(periodType: PeriodType, date: Date): Period

Get a period object specifying a periodType and a date in the period. If the period does not exist in the database, it is inserted.

Link copied to clipboard
fun getPeriodForPeriodTypeAndDate(periodType: PeriodType, date: Date): Single<Period>
fun getPeriodForPeriodTypeAndDate(periodType: PeriodType, date: Date, periodOffset: Int): Single<Period>

Get a period object specifying a periodType and a date in the period. If the period does not exist in the database, it is inserted.

Link copied to clipboard
fun getPeriodsForDataSet(dataSetUid: String): Single<List<Period>>
Link copied to clipboard
fun rxGetPeriodForPeriodTypeAndDate(periodType: PeriodType, date: Date): Single<Period>
fun rxGetPeriodForPeriodTypeAndDate(periodType: PeriodType, date: Date, periodOffset: Int): Single<Period>
Link copied to clipboard
fun rxGetPeriodsForDataSet(dataSetUid: String): Single<List<Period>>
Link copied to clipboard
suspend fun suspendGetPeriodForPeriodId(periodId: String): Period