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

org.babyfish.jimmer.sql.kt.impl.KCachesImpl.kt Maven / Gradle / Ivy

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