Package com.bytedesk.ai.robot_settings
Interface RobotSettingsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<RobotSettingsEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<RobotSettingsEntity,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<RobotSettingsEntity>,org.springframework.data.repository.ListCrudRepository<RobotSettingsEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<RobotSettingsEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<RobotSettingsEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<RobotSettingsEntity>,org.springframework.data.repository.Repository<RobotSettingsEntity,Long>
@Repository
public interface RobotSettingsRepository
extends org.springframework.data.jpa.repository.JpaRepository<RobotSettingsEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<RobotSettingsEntity>
Repository for RobotSettingsEntity
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
org.springframework.data.jpa.repository.JpaSpecificationExecutor.SpecificationFluentQuery<T extends Object> -
Method Summary
Modifier and TypeMethodDescriptionexistsByNameAndOrgUid(String name, String orgUid) findByOrgUid(String orgUid) findByOrgUidAndEnabledTrue(String orgUid) findByOrgUidAndIsDefaultTrue(String orgUid) findDefaultForUpdate(String orgUid) 使用悲观锁读取默认配置,防止并发下出现多个默认Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, delete, exists, findAll, findAll, findAll, findAll, findBy, findOneMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByUid
-
findByOrgUid
-
findByOrgUidAndIsDefaultTrue
-
findByOrgUidAndEnabledTrue
-
existsByNameAndOrgUid
-
findDefaultForUpdate
@Lock(PESSIMISTIC_WRITE) @Query("select r from RobotSettingsEntity r where r.orgUid = :orgUid and r.isDefault = true") Optional<RobotSettingsEntity> findDefaultForUpdate(@Param("orgUid") String orgUid) 使用悲观锁读取默认配置,防止并发下出现多个默认
-