org.appng.core.repository

## Interface SubjectRepository

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

      public interface SubjectRepository
      extends SearchRepository<SubjectImpl,Integer>

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `SubjectImpl` | `findByEmail(String email)`
    `SubjectImpl` | `findByName(String name)`
    `List<SubjectImpl>` | `findByUserType(UserType type)`
    `List<SubjectImpl>` | `findSubjectsForApplication(Integer applicationId)`

    - ### 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

          SubjectImpl findByName(String name)

    - #### findByEmail

          SubjectImpl findByEmail(String email)

    - #### findByUserType

          List<SubjectImpl> findByUserType(UserType type)

    - #### findSubjectsForApplication

          @Query(value="select distinct(s) from GroupImpl g join g.subjects s join g.roles pr left outer join pr.permissions p where pr.application.id = ?1")
          List<SubjectImpl> findSubjectsForApplication(Integer applicationId)

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