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 Type
    Method
    Description
    Get all user groups having the given authority (as directly assigned authority)
    Get the user group with the given group name
    Get all user groups for the given mission

    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

    • findByGroupName

      Group findByGroupName(String groupName)
      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