Interface RoleRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Role,Long>, org.springframework.data.jpa.repository.JpaRepository<Role,Long>, org.springframework.data.repository.ListCrudRepository<Role,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<Role,Long>, org.springframework.data.repository.PagingAndSortingRepository<Role,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Role>, org.springframework.data.repository.Repository<Role,Long>

@Repository public interface RoleRepository extends org.springframework.data.jpa.repository.JpaRepository<Role,Long>
Интерфейс представляет собой функциональность взаимодействия объекта Role с базой данных.
  • Method Summary

    Modifier and Type
    Method
    Description
    Выполняет поиск роли в базе данных по её названию.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, 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

      Optional<Role> findByRoleName(String roleName)
      Выполняет поиск роли в базе данных по её названию.
      Parameters:
      roleName - название роли.
      Returns:
      Optional с ролью, если она была найдена, иначе пустой.