ItemRepository

@Repository
interface ItemRepository : KRepository<Item, Long>

道具仓储接口

定义道具数据的查询与持久化操作

Author

lishangbu

Since

2025/09/14

Properties

Link copied to clipboard
abstract val entityType: KClass<Item>
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: Item)
abstract fun delete(entity: Item, mode: DeleteMode): Int
Link copied to clipboard
abstract fun deleteAll()
open fun deleteAll(entities: Iterable<Item>)
abstract fun deleteAll(entities: Iterable<Item>, 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(): List<Item>
abstract fun findAll(fetcher: Fetcher<Item>?): List<Item>
abstract override fun findAll(pageable: Pageable): Page<Item>
open override fun findAll(sort: Sort): List<Item>
abstract fun findAll(fetcher: Fetcher<Item>?, block: SortDsl<Item>.() -> Unit): List<Item>
abstract fun findAll(fetcher: Fetcher<Item>?, sort: Sort): List<Item>
abstract fun findAll(pageable: Pageable, fetcher: Fetcher<Item>?): Page<Item>
abstract fun findAll(pageIndex: Int, pageSize: Int, fetcher: Fetcher<Item>?, block: SortDsl<Item>.() -> Unit?): Page<Item>
abstract fun findAll(pageIndex: Int, pageSize: Int, fetcher: Fetcher<Item>?, sort: Sort): Page<Item>
Link copied to clipboard
@AliasFor(value = "findByIds")
open fun findAllById(ids: Iterable<Long>): List<Item>
Link copied to clipboard
open fun findById(id: Long): Optional<Item>
open fun findById(id: Long, fetcher: Fetcher<Item>): Optional<Item>
Link copied to clipboard
@AliasFor(value = "findAllById")
abstract fun findByIds(ids: Iterable<Long>, fetcher: Fetcher<Item>?): List<Item>
Link copied to clipboard
abstract fun findMapByIds(ids: Iterable<Long>, fetcher: Fetcher<Item>?): Map<Long, Item>
Link copied to clipboard
abstract fun findNullable(id: Long, fetcher: Fetcher<Item>?): Item?
Link copied to clipboard
open fun insert(entity: Item, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
open fun insert(input: Input<Item>, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
Link copied to clipboard
open fun insertIfAbsent(entity: Item, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
open fun insertIfAbsent(input: Input<Item>, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
Link copied to clipboard
open fun merge(entity: Item, block: KSaveCommandPartialDsl.() -> Unit?): Item
open fun merge(input: Input<Item>, block: KSaveCommandPartialDsl.() -> Unit?): Item
Link copied to clipboard
open fun <S : Item> save(entity: S): S
open fun save(input: Input<Item>, block: KSaveCommandDsl.() -> Unit?): Item
open fun <V : View<Item>> save(entity: Item, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): V
open fun save(entity: Item, fetcher: Fetcher<Item>, block: KSaveCommandDsl.() -> Unit?): Item
open fun <V : View<Item>> save(input: Input<Item>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): V
open fun save(input: Input<Item>, fetcher: Fetcher<Item>, block: KSaveCommandDsl.() -> Unit?): Item
open fun save(entity: Item, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
open fun save(input: Input<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
open fun <V : View<Item>> save(entity: Item, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): V
open fun save(entity: Item, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Item>, block: KSaveCommandPartialDsl.() -> Unit?): Item
open fun <V : View<Item>> save(input: Input<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): V
open fun save(input: Input<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Item>, block: KSaveCommandPartialDsl.() -> Unit?): Item
Link copied to clipboard
open fun <S : Item> saveAll(entity: Iterable<S>): List<S>
Link copied to clipboard
open fun saveCommand(entity: Item, block: KSaveCommandDsl.() -> Unit?): KSimpleEntitySaveCommand<Item>
open fun saveCommand(input: Input<Item>, block: KSaveCommandDsl.() -> Unit?): KSimpleEntitySaveCommand<Item>
open fun saveCommand(entity: Item, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleEntitySaveCommand<Item>
open fun saveCommand(input: Input<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KSimpleEntitySaveCommand<Item>
Link copied to clipboard
open fun saveEntities(entities: Iterable<Item>, block: KSaveCommandDsl.() -> Unit?): List<Item>
open fun <V : View<Item>> saveEntities(entities: Iterable<Item>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): List<V>
open fun saveEntities(entities: Iterable<Item>, fetcher: Fetcher<Item>, block: KSaveCommandDsl.() -> Unit?): List<Item>
open fun saveEntities(entities: Iterable<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): List<Item>
open fun <V : View<Item>> saveEntities(entities: Iterable<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): List<V>
open fun saveEntities(entities: Iterable<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Item>, block: KSaveCommandPartialDsl.() -> Unit?): List<Item>
Link copied to clipboard
open fun saveEntitiesCommand(entities: Iterable<Item>, block: KSaveCommandDsl.() -> Unit?): KBatchEntitySaveCommand<Item>
open fun saveEntitiesCommand(entities: Iterable<Item>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KBatchEntitySaveCommand<Item>
Link copied to clipboard
open fun saveInputs(inputs: Iterable<Input<Item>>, block: KSaveCommandDsl.() -> Unit?): List<Item>
open fun <V : View<Item>> saveInputs(inputs: Iterable<Input<Item>>, viewType: KClass<V>, block: KSaveCommandDsl.() -> Unit?): List<V>
open fun saveInputs(inputs: Iterable<Input<Item>>, fetcher: Fetcher<Item>, block: KSaveCommandDsl.() -> Unit?): List<Item>
open fun saveInputs(inputs: Iterable<Input<Item>>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): List<Item>
open fun <V : View<Item>> saveInputs(inputs: Iterable<Input<Item>>, mode: SaveMode, associatedMode: AssociatedSaveMode, viewType: KClass<V>, block: KSaveCommandPartialDsl.() -> Unit?): List<V>
open fun saveInputs(inputs: Iterable<Input<Item>>, mode: SaveMode, associatedMode: AssociatedSaveMode, fetcher: Fetcher<Item>, block: KSaveCommandPartialDsl.() -> Unit?): List<Item>
Link copied to clipboard
open fun saveInputsCommand(input: Iterable<Input<Item>>, block: KSaveCommandDsl.() -> Unit?): KBatchEntitySaveCommand<Item>
open fun saveInputsCommand(inputs: Iterable<Input<Item>>, mode: SaveMode, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): KBatchEntitySaveCommand<Item>
Link copied to clipboard
open fun update(entity: Item, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
open fun update(input: Input<Item>, associatedMode: AssociatedSaveMode, block: KSaveCommandPartialDsl.() -> Unit?): Item
Link copied to clipboard
abstract fun <V : View<Item>> viewer(viewType: KClass<V>): KRepository.Viewer<Item, Long, V>