Package de.dlr.proseo.usermgr.dao
Interface GroupRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Group,,Long> org.springframework.data.jpa.repository.JpaRepository<Group,,Long> org.springframework.data.repository.ListCrudRepository<Group,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<Group,,Long> org.springframework.data.repository.PagingAndSortingRepository<Group,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Group>,org.springframework.data.repository.Repository<Group,Long>
public interface GroupRepository
extends org.springframework.data.jpa.repository.JpaRepository<Group,Long>
Data Access Object for the Group class
- Author:
- Dr. Thomas Bassler *
-
Method Summary
Modifier and TypeMethodDescriptionfindByAuthority(String authority) Get all user groups having the given authority (as directly assigned authority)findByGroupName(String groupName) Get the user group with the given group namefindByMissionCode(String missionCode) Get all user groups for the given missionMethods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, 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
-
findByGroupName
Get the user group with the given group name- Parameters:
groupName- the name of the user group- Returns:
- the unique processing group identified by the given group name
-
findByMissionCode
@Query("select g from groups g where g.groupName like concat(?1, \'-%\')") List<Group> findByMissionCode(String missionCode) Get all user groups for the given mission- Parameters:
missionCode- the code of the mission- Returns:
- a list of user groups with group names starting with the mission code
-
findByAuthority
@Query("select g from groups g join g.groupAuthorities ga where ga.authority = ?1") List<Group> findByAuthority(String authority) Get all user groups having the given authority (as directly assigned authority)- Parameters:
authority- the authority (name) to check for- Returns:
- a list of user groups with the given authority
-