org.babyfish.jimmer.sql.kt.impl.KCachesImpl.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.impl
import org.babyfish.jimmer.kt.toImmutableProp
import org.babyfish.jimmer.meta.ImmutableProp
import org.babyfish.jimmer.meta.ImmutableType
import org.babyfish.jimmer.sql.cache.Cache
import org.babyfish.jimmer.sql.cache.Caches
import org.babyfish.jimmer.sql.event.DatabaseEvent
import org.babyfish.jimmer.sql.kt.KCaches
import kotlin.reflect.KClass
import kotlin.reflect.KProperty1
internal class KCachesImpl(
private val javaCaches: Caches
): KCaches {
override fun getObjectCache(type: KClass): Cache? =
javaCaches.getObjectCache(type.java)
override fun getObjectCache(type: ImmutableType): Cache? =
javaCaches.getObjectCache(type)
override fun getPropertyCache(prop: KProperty1<*, *>): Cache? =
javaCaches.getPropertyCache(prop.toImmutableProp())
override fun getPropertyCache(prop: ImmutableProp): Cache? =
javaCaches.getPropertyCache(prop)
override fun isAffectedBy(e: DatabaseEvent): Boolean =
javaCaches.isAffectedBy(e)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy