Package com.alpaca.repository
Interface RoleRepo
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Role,
,UUID> GenericRepo<Role,
,UUID> org.springframework.data.jpa.repository.JpaRepository<Role,
,UUID> org.springframework.data.repository.ListCrudRepository<Role,
,UUID> org.springframework.data.repository.ListPagingAndSortingRepository<Role,
,UUID> org.springframework.data.repository.PagingAndSortingRepository<Role,
,UUID> org.springframework.data.repository.query.QueryByExampleExecutor<Role>
,org.springframework.data.repository.Repository<Role,
UUID>
Repository interface for managing
Role
entities.
Extends GenericRepo
to inherit common CRUD operations and defines additional queries
for role-specific operations.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionboolean
existsByRoleName
(String roleName) Checks whether a role with the specified name exists.findByRoleName
(String roleName) Retrieves a role by its name.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface com.alpaca.repository.GenericRepo
countByIds
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, findAll, findAll, flush, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByRoleName
Retrieves a role by its name.- Parameters:
roleName
- The name of the role.- Returns:
- An
Optional
containing the role if found, otherwise empty.
-
existsByRoleName
Checks whether a role with the specified name exists.- Parameters:
roleName
- The name of the role to check - must not be null.- Returns:
true
if a role with the given name exists,false
otherwise.
-