RoleRepository

interface RoleRepository : KRepository<Role, Long>

角色仓储接口

定义角色数据的查询与持久化操作

Author

lishangbu

Since

2025/08/20

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val entityType: KClass<Role>
Link copied to clipboard
abstract val sql: KSqlClient
Link copied to clipboard
abstract val type: ImmutableType

Functions

Link copied to clipboard
abstract fun count(): Long
Link copied to clipboard
open fun delete(entity: Role)
abstract fun delete(entity: Role, mode: DeleteMode): Int
Link copied to clipboard
abstract fun deleteAll()
open fun deleteAll(entities: Iterable<Role>)
abstract fun deleteAll(entities: Iterable<Role>, mode: DeleteMode): Int
Link copied to clipboard
@AliasFor(value = "deleteByIds")
open fun deleteAllById(ids: Iterable<Long>)
Link copied to clipboard
open fun deleteById(id: Long)
abstract fun deleteById(id: Long, mode: DeleteMode): Int
Link copied to clipboard
@AliasFor(value = "deleteAllById")
open fun deleteByIds(ids: Iterable<Long>)
abstract fun deleteByIds(ids: Iterable<Long>, mode: DeleteMode): Int
Link copied to clipboard
open fun existsById(id: Long): Boolean
Link copied to clipboard
open fun findAll(specification: Specification<Role>?): List<RoleView>

按条件查询角色列表

open fun findAll(specification: Specification<Role>?, pageable: Pageable): Page<RoleView>

按条件分页查询角色

open fun findAll(): List<Role>
abstract fun findAll(fetcher: Fetcher<Role>?): List<Role>
abstract override fun findAll(pageable: Pageable): Page<Role>
open override fun findAll(sort: Sort): List<Role>
abstract fun findAll(fetcher: Fetcher<Role>?, block: SortDsl<Role>.() -> Unit): List<Role>
abstract fun findAll(fetcher: Fetcher<Role>?, sort: Sort): List<Role>
abstract fun findAll(pageable: Pageable, fetcher: Fetcher<Role>?): Page<Role>
abstract fun findAll(pageIndex: Int, pageSize: Int, fetcher: Fetcher<Role>?, block: SortDsl<Role>.() -> Unit?): Page<Role>
abstract fun findAll(pageIndex: Int, pageSize: Int, fetcher: Fetcher<Role>?, sort: Sort): Page<Role>
Link copied to clipboard
@AliasFor(value = "findByIds")
open fun findAllById(ids: Iterable<Long>): List<Role>
Link copied to clipboard
open fun findById(id: Long): Optional<Role>
open fun findById(id: Long, fetcher: Fetcher<Role>): Optional<Role>
Link copied to clipboard
@AliasFor(value = "findAllById")
abstract fun findByIds(ids: Iterable<Long>, fetcher: Fetcher<Role>?): List<Role>
Link copied to clipboard
abstract fun findMapByIds(ids: Iterable<Long>, fetcher: Fetcher<Role>?): Map<Long, Role>
Link copied to clipboard
abstract fun findNullable(id: Long, fetcher: Fetcher<Role>?): Role?
Link copied to clipboard
open fun insert(entity: Role, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
open fun insert(input: Input<Role>, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
Link copied to clipboard
open fun insertIfAbsent(entity: Role, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
open fun insertIfAbsent(input: Input<Role>, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
Link copied to clipboard
open fun listEntitiesWithBindings(specification: Specification<Role>?): List<Role>

按条件查询角色实体列表,并抓取菜单与权限点。

Link copied to clipboard
open fun listEntitiesWithMenus(specification: Specification<Role>?): List<Role>

按条件查询角色实体列表,并抓取菜单

Link copied to clipboard
open fun listViews(specification: Specification<Role>?): List<RoleView>

按条件查询角色视图列表

Link copied to clipboard
open fun listWithMenus(specification: Specification<Role>?): List<RoleView>

按条件查询角色列表,并抓取菜单

Link copied to clipboard
open fun loadViewById(id: Long): RoleView?

按 ID 查询角色视图

Link copied to clipboard
open fun merge(entity: Role, block: KSaveCommandPartialDsl.() -> Unit?): Role
open fun merge(input: Input<Role>, block: KSaveCommandPartialDsl.() -> Unit?): Role
Link copied to clipboard
open fun pageViews(specification: Specification<Role>?, pageable: Pageable): Page<RoleView>

按条件分页查询角色视图

Link copied to clipboard
open fun pageWithMenus(specification: Specification<Role>?, pageable: Pageable): Page<RoleView>

按条件分页查询角色,并抓取菜单

Link copied to clipboard
open fun <S : Role> save(entity: S): S
open fun save(input: Input<Role>, block: KSaveCommandDsl.() -> Unit?): Role
open fun <V : View<Role>> save(entity: Role, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): V
open fun save(entity: Role, fetcher: Fetcher<Role>, block: KSaveCommandDsl.() -> Unit?): Role
open fun <V : View<Role>> save(input: Input<Role>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): V
open fun save(input: Input<Role>, fetcher: Fetcher<Role>, block: KSaveCommandDsl.() -> Unit?): Role
open fun save(entity: Role, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
open fun save(input: Input<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
open fun <V : View<Role>> save(entity: Role, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): V
open fun save(entity: Role, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Role>, block: KSaveCommandPartialDsl.() -> Unit?): Role
open fun <V : View<Role>> save(input: Input<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): V
open fun save(input: Input<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Role>, block: KSaveCommandPartialDsl.() -> Unit?): Role
Link copied to clipboard
open fun <S : Role> saveAll(entity: Iterable<S>): List<S>
Link copied to clipboard
open fun saveCommand(entity: Role, block: KSaveCommandDsl.() -> Unit?): KSimpleEntitySaveCommand<Role>
open fun saveCommand(input: Input<Role>, block: KSaveCommandDsl.() -> Unit?): KSimpleEntitySaveCommand<Role>
open fun saveCommand(entity: Role, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleEntitySaveCommand<Role>
open fun saveCommand(input: Input<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleEntitySaveCommand<Role>
Link copied to clipboard
open fun saveEntities(entities: Iterable<Role>, block: KSaveCommandDsl.() -> Unit?): List<Role>
open fun <V : View<Role>> saveEntities(entities: Iterable<Role>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): List<V>
open fun saveEntities(entities: Iterable<Role>, fetcher: Fetcher<Role>, block: KSaveCommandDsl.() -> Unit?): List<Role>
open fun saveEntities(entities: Iterable<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): List<Role>
open fun <V : View<Role>> saveEntities(entities: Iterable<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): List<V>
open fun saveEntities(entities: Iterable<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Role>, block: KSaveCommandPartialDsl.() -> Unit?): List<Role>
Link copied to clipboard
open fun saveEntitiesCommand(entities: Iterable<Role>, block: KSaveCommandDsl.() -> Unit?): KBatchEntitySaveCommand<Role>
open fun saveEntitiesCommand(entities: Iterable<Role>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KBatchEntitySaveCommand<Role>
Link copied to clipboard
open fun saveInputs(inputs: Iterable<Input<Role>>, block: KSaveCommandDsl.() -> Unit?): List<Role>
open fun <V : View<Role>> saveInputs(inputs: Iterable<Input<Role>>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): List<V>
open fun saveInputs(inputs: Iterable<Input<Role>>, fetcher: Fetcher<Role>, block: KSaveCommandDsl.() -> Unit?): List<Role>
open fun saveInputs(inputs: Iterable<Input<Role>>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): List<Role>
open fun <V : View<Role>> saveInputs(inputs: Iterable<Input<Role>>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): List<V>
open fun saveInputs(inputs: Iterable<Input<Role>>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Role>, block: KSaveCommandPartialDsl.() -> Unit?): List<Role>
Link copied to clipboard
open fun saveInputsCommand(input: Iterable<Input<Role>>, block: KSaveCommandDsl.() -> Unit?): KBatchEntitySaveCommand<Role>
open fun saveInputsCommand(inputs: Iterable<Input<Role>>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KBatchEntitySaveCommand<Role>
Link copied to clipboard
open fun update(entity: Role, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
open fun update(input: Input<Role>, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Role
Link copied to clipboard
abstract fun <V : View<Role>> viewer(viewType: KClass<V>): KRepository.Viewer<Role, Long, V>