org.appng.core.repository

## Interface GroupRepository

- All Superinterfaces:
    org.springframework.data.repository.CrudRepository<GroupImpl,Integer>, org.springframework.data.jpa.repository.JpaRepository<GroupImpl,Integer>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<GroupImpl>, org.springframework.data.repository.PagingAndSortingRepository<GroupImpl,Integer>, org.springframework.data.repository.query.QueryByExampleExecutor<GroupImpl>, org.springframework.data.repository.Repository<GroupImpl,Integer>, SearchRepository<GroupImpl,Integer>

      public interface GroupRepository
      extends SearchRepository<GroupImpl,Integer>

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<GroupImpl>` | `findByDefaultAdmin(boolean defaultAdmin)`
    `GroupImpl` | `findByName(String name)`
    `List<Group>` | `findByNameIn(List<String> names)`
    `List<GroupImpl>` | `findGroupsForApplicationRole(Integer applicationRoleId)`
    `GroupImpl` | `getGroup(Integer groupId)`
    `List<Integer>` | `getGroupIdsForNames(List<String> groupNames)`

    - ### Methods inherited from interface org.appng.persistence.repository.SearchRepository

      `createSearchQuery, detach, getHistory, getRevision, getRevisionNumber, isUnique, isUnique, search, search, search, search`

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

      `deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlush`

    - ### Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

      `findAll`

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

      `count, delete, delete, delete, deleteAll, exists, findOne, save`

    - ### Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

      `count, exists, findAll, findOne`

    - ### Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor

      `count, findAll, findAll, findAll, findOne`

- - ### Method Detail

    - #### findByName

          GroupImpl findByName(String name)

    - #### getGroupIdsForNames

          @Query(value="select g.id from GroupImpl g where g.name in (?1)")
          List<Integer> getGroupIdsForNames(List<String> groupNames)

    - #### findGroupsForApplicationRole

          @Query(value="select g from GroupImpl g join g.roles r where r.id = ?1")
          List<GroupImpl> findGroupsForApplicationRole(Integer applicationRoleId)

    - #### getGroup

          @Query(value="select g from GroupImpl g left join fetch g.roles r left join fetch r.permissions p where g.id = ?1")
          GroupImpl getGroup(Integer groupId)

    - #### findByDefaultAdmin

          List<GroupImpl> findByDefaultAdmin(boolean defaultAdmin)

    - #### findByNameIn

          List<Group> findByNameIn(List<String> names)

Copyright © 2011–2023 aiticon GmbH. All rights reserved.