Interface WorkgroupSettingsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<WorkgroupSettingsEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<WorkgroupSettingsEntity,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<WorkgroupSettingsEntity>,org.springframework.data.repository.ListCrudRepository<WorkgroupSettingsEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<WorkgroupSettingsEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<WorkgroupSettingsEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<WorkgroupSettingsEntity>,org.springframework.data.repository.Repository<WorkgroupSettingsEntity,Long>
@Repository
public interface WorkgroupSettingsRepository
extends org.springframework.data.jpa.repository.JpaRepository<WorkgroupSettingsEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<WorkgroupSettingsEntity>
Repository for WorkgroupSettingsEntity
-
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 w from WorkgroupSettingsEntity w where w.orgUid = :orgUid and w.isDefault = true") Optional<WorkgroupSettingsEntity> findDefaultForUpdate(@Param("orgUid") String orgUid) 使用悲观锁读取默认配置,防止并发下出现多个默认
-