Created
October 16, 2023 15:29
-
-
Save igorescodro/469e4997082721085ec92c9652f8027a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val alarmIntervalAdapter = object : ColumnAdapter<AlarmInterval, Long> { | |
override fun decode(databaseValue: Long): AlarmInterval = | |
AlarmInterval.values().find { it.id == databaseValue.toInt() }!! | |
override fun encode(value: AlarmInterval): Long = | |
value.id.toLong() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment