Package com.Server.repository
Interface RoleRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Role,java.lang.Integer>,org.springframework.data.jpa.repository.JpaRepository<Role,java.lang.Integer>,org.springframework.data.repository.PagingAndSortingRepository<Role,java.lang.Integer>,org.springframework.data.repository.query.QueryByExampleExecutor<Role>,org.springframework.data.repository.Repository<Role,java.lang.Integer>
@Repository public interface RoleRepository extends org.springframework.data.jpa.repository.JpaRepository<Role,java.lang.Integer>
Interface repository role to available connect on table database.
- Since:
- 2020-04-27.
- Version:
- 2.0.
- Author:
- Krystian Cwioro Kamil Bieniasz Damian Mierzynski.
-
Method Summary
Modifier and Type Method Description java.util.Optional<Role>findById(int id)Find role on id.java.util.Optional<Role>findByName(Roles name)Find role on name.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findOne
-
Method Details
-
findByName
Find role on name.- Parameters:
name- name of role.- Returns:
- role data.
-
findById
Find role on id.- Parameters:
id- id role.- Returns:
- role data.
-