Package com.alpaca.repository
Interface PermissionRepo
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Permission,,UUID> GenericRepo<Permission,,UUID> org.springframework.data.jpa.repository.JpaRepository<Permission,,UUID> org.springframework.data.repository.ListCrudRepository<Permission,,UUID> org.springframework.data.repository.ListPagingAndSortingRepository<Permission,,UUID> org.springframework.data.repository.PagingAndSortingRepository<Permission,,UUID> org.springframework.data.repository.query.QueryByExampleExecutor<Permission>,org.springframework.data.repository.Repository<Permission,UUID>
Repository interface for managing
Permission entities.
Extends GenericRepo to inherit common CRUD operations and defines additional queries
for permission-specific operations.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistsByPermissionName(String permissionName) Checks whether a permission with the specified name exists.findByPermissionName(String permissionName) Retrieves a permission by their permission name.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface com.alpaca.repository.GenericRepo
countByIdsMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, findAll, findAll, flush, getReferenceById, saveAllAndFlush, saveAndFlushMethods 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
-
existsByPermissionName
Checks whether a permission with the specified name exists.- Parameters:
permissionName- The name of the permission - must not be null.- Returns:
trueif a permission with the given name exists,falseotherwise.
-
findByPermissionName
Retrieves a permission by their permission name.- Parameters:
permissionName- The permission name of the permission - must not be null.- Returns:
- An
Optionalcontaining the permission if found, otherwise empty.
-