Package org.openiam.esb.repository
Interface SupervisorRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<SupervisorEntity,SupervisorIDEntity>
,org.springframework.data.jpa.repository.JpaRepository<SupervisorEntity,SupervisorIDEntity>
,org.springframework.data.jpa.repository.JpaSpecificationExecutor<SupervisorEntity>
,org.springframework.data.repository.PagingAndSortingRepository<SupervisorEntity,SupervisorIDEntity>
,org.springframework.data.repository.query.QueryByExampleExecutor<SupervisorEntity>
,org.springframework.data.repository.Repository<SupervisorEntity,SupervisorIDEntity>
,SupervisorRepositoryCustom
@Repository public interface SupervisorRepository extends org.springframework.data.jpa.repository.JpaRepository<SupervisorEntity,SupervisorIDEntity>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<SupervisorEntity>, SupervisorRepositoryCustom
This is repository for working with Supervisor- Author:
- Andrey Lezhebokov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
countDistinctSupervisors()
SupervisorEntity
findPrimarySupervisor(String employeeId)
find findPrimarySupervisor by employeeIdorg.springframework.data.domain.Page<SupervisorEntity>
findSupervisors(String employeeId, org.springframework.data.domain.Pageable page)
Set<String>
getUniqueEmployeeIds()
getUniqueEmployeeIds-
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, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlush
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, exists, findAll, findAll, findAll, findOne
-
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
-
Methods inherited from interface org.openiam.esb.repository.custom.SupervisorRepositoryCustom
find
-
-
-
-
Method Detail
-
findPrimarySupervisor
@Query("SELECT se FROM SupervisorEntity as se where se.primarySuper=true and se.id.employee.id=:employeeId") SupervisorEntity findPrimarySupervisor(@Param("employeeId") String employeeId)
find findPrimarySupervisor by employeeId- Parameters:
employeeId
-- Returns:
-
findSupervisors
@Query("SELECT se FROM SupervisorEntity se WHERE se.id.employee.id=:employeeId") org.springframework.data.domain.Page<SupervisorEntity> findSupervisors(@Param("employeeId") String employeeId, org.springframework.data.domain.Pageable page)
-
getUniqueEmployeeIds
@Query("SELECT distinct se.id.employee.id FROM SupervisorEntity as se") Set<String> getUniqueEmployeeIds()
getUniqueEmployeeIds- Returns:
-
countDistinctSupervisors
@Query("SELECT count(distinct se.id.supervisor.id) FROM SupervisorEntity as se") int countDistinctSupervisors()
-
-