All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.babyfish.jimmer.sql.kt.event.DatabaseEvents.kt Maven / Gradle / Ivy

There is a newer version: 0.8.184
Show newest version
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())




© 2015 - 2024 Weber Informatics LLC | Privacy Policy