org.babyfish.jimmer.sql.kt.event.DatabaseEvents.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jimmer-sql-kotlin Show documentation
Show all versions of jimmer-sql-kotlin Show documentation
A revolutionary ORM framework for both java and kotlin
package org.babyfish.jimmer.sql.kt.event
import org.babyfish.jimmer.kt.toImmutableProp
import org.babyfish.jimmer.lang.Ref
import org.babyfish.jimmer.sql.event.ChangedRef
import org.babyfish.jimmer.sql.event.DatabaseEvent
import org.babyfish.jimmer.sql.event.EntityEvent
import kotlin.reflect.KProperty1
fun DatabaseEvent.isChanged(prop: KProperty1<*, *>): Boolean =
isChanged(prop.toImmutableProp())
fun EntityEvent<*>.getUnchangedRef(prop: KProperty1<*, R>): Ref? =
getUnchangedRef(prop.toImmutableProp())
fun EntityEvent<*>.getChangedRef(prop: KProperty1<*, R>): ChangedRef ?=
getChangedRef(prop.toImmutableProp())
fun EntityEvent<*>.getUnchangedValue(prop: KProperty1<*, R>): R =
getUnchangedValue(prop.toImmutableProp())