Package com.bytedesk.core.rbac.authority
Interface AuthorityRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AuthorityEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<AuthorityEntity,,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<AuthorityEntity>,org.springframework.data.repository.ListCrudRepository<AuthorityEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<AuthorityEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<AuthorityEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<AuthorityEntity>,org.springframework.data.repository.Repository<AuthorityEntity,Long>
public interface AuthorityRepository
extends org.springframework.data.jpa.repository.JpaRepository<AuthorityEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<AuthorityEntity>
- Author:
- im.bytedesk.com
-
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 TypeMethodDescriptionvoiddeleteById(Long id) booleanexistsById(Long id) existsByValue(String value) findByName(String code) findByValue(String value) intintintMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, 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
-
findByName
-
findByValue
-
existsByValue
-
existsById
- Specified by:
existsByIdin interfaceorg.springframework.data.repository.CrudRepository<AuthorityEntity,Long>
-
deleteById
- Specified by:
deleteByIdin interfaceorg.springframework.data.repository.CrudRepository<AuthorityEntity,Long>
-
findByValueContainingIgnoreCaseAndDeletedFalse
-
findByDeletedFalse
List<AuthorityEntity> findByDeletedFalse() -
resetSettingsAuthoritiesLevelToPlatform
@Modifying @Transactional @Query(value="UPDATE bytedesk_core_authority SET level_type = \'PLATFORM\' WHERE is_deleted = 0 AND authority_value IS NOT NULL AND authority_value <> \'\' AND authority_value LIKE \'SETTINGS_%\' AND (level_type IS NULL OR level_type <> \'PLATFORM\')", nativeQuery=true) int resetSettingsAuthoritiesLevelToPlatform() -
resetNonSettingsAuthoritiesLevelToOrganization
@Modifying @Transactional @Query(value="UPDATE bytedesk_core_authority SET level_type = \'ORGANIZATION\' WHERE is_deleted = 0 AND authority_value IS NOT NULL AND authority_value <> \'\' AND authority_value NOT LIKE \'SETTINGS_%\' AND (level_type IS NULL OR level_type <> \'ORGANIZATION\')", nativeQuery=true) int resetNonSettingsAuthoritiesLevelToOrganization() -
resetAuthoritiesDescriptionToI18nDescriptionKey
@Modifying @Transactional @Query(value="UPDATE bytedesk_core_authority SET description = CONCAT(\'i18n.description.\', authority_value) WHERE is_deleted = 0 AND authority_value IS NOT NULL AND authority_value <> \'\' AND (description IS NULL OR description = \'\' OR description LIKE \'Permission for %\' OR description = CONCAT(\'i18n.\', authority_value)) AND (description IS NULL OR description NOT LIKE \'i18n.description.%\')", nativeQuery=true) int resetAuthoritiesDescriptionToI18nDescriptionKey()
-