nbcp.myoql.db.cache.RedisCacheDefine.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ktmyoql Show documentation
Show all versions of ktmyoql Show documentation
kotlin orm -- mysql,mongo , just like ktorm
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)
}
}