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 TypeMethodDescriptionbooleanexistsByRoleName(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, 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
-
findByRoleName
Retrieves a role by its name.- Parameters:
roleName- The name of the role.- Returns:
- An
Optionalcontaining 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:
trueif a role with the given name exists,falseotherwise.
-