Interface TicketSettingsRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<TicketSettingsEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<TicketSettingsEntity,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<TicketSettingsEntity>,org.springframework.data.repository.ListCrudRepository<TicketSettingsEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<TicketSettingsEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<TicketSettingsEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<TicketSettingsEntity>,org.springframework.data.repository.Repository<TicketSettingsEntity,Long>
public interface TicketSettingsRepository
extends org.springframework.data.jpa.repository.JpaRepository<TicketSettingsEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<TicketSettingsEntity>
-
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 TypeMethodDescriptionexistsByUid(String uid) findByNameAndOrgUidAndTypeAndDeletedFalse(String name, String orgUid, String type) findByOrgUidAndIsDefaultTrue(String orgUid) findByOrgUidAndTypeAndIsDefaultTrue(String orgUid, String type) findDefaultForUpdate(String orgUid, String type) 悲观锁读取 org 默认 TicketSettings,保证并发下只创建一个默认。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
-
existsByUid
-
findByNameAndOrgUidAndTypeAndDeletedFalse
Optional<TicketSettingsEntity> findByNameAndOrgUidAndTypeAndDeletedFalse(String name, String orgUid, String type) -
findByOrgUidAndIsDefaultTrue
-
findByOrgUidAndTypeAndIsDefaultTrue
-
findDefaultForUpdate
@Lock(PESSIMISTIC_WRITE) @Query("select t from TicketSettingsEntity t where t.orgUid = :orgUid and t.type = :type and t.isDefault = true and t.deleted = false") Optional<TicketSettingsEntity> findDefaultForUpdate(@Param("orgUid") String orgUid, @Param("type") String type) 悲观锁读取 org 默认 TicketSettings,保证并发下只创建一个默认。
-