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

nbcp.myoql.db.cache.RedisCacheDefine.kt Maven / Gradle / Ivy

The newest version!
package nbcp.myoql.db.cache

import nbcp.base.comm.*
import nbcp.base.db.annotation.DbEntityIndex
import java.lang.annotation.Inherited
import java.util.*

/**
 * 使用注解在指定单表上启用 RedisCache
 * 用于补充 DbEntityIndex 之外的缓存项,如 _id
 *
 * @see nbcp.myoql.db.DbEntityIndex
 */
@Inherited
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
@Repeatable
@java.lang.annotation.Repeatable(RedisCacheDefines::class)
annotation class RedisCacheDefine(
    /**
    if()
     * 分组的字段,mongo默认包含 _id, 必须有值
     */
    vararg val value: String
)

@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
@Inherited
annotation class RedisCacheDefines(vararg val value: RedisCacheDefine)



class RedisCacheColumns() : LinkedList() {
    constructor(vararg ary: String) : this() {
        addAll(ary)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy