@Repository public interface EmployeeRepository extends org.springframework.data.jpa.repository.JpaRepository<Employee,Long>
| Modifier and Type | Method and Description |
|---|---|
List<Employee> |
findActiveEmployeeByCodeLike(String code) |
Employee |
findByCode(String code) |
List<Employee> |
findByDepartmentDesignationAndBoundary(Long deptId,
Long desigId,
Set<Long> boundaryIds) |
List<Employee> |
findByEmployeeStatus(EmployeeStatus status) |
List<Employee> |
findByEmployeeType_Id(Long id) |
Employee |
findByName(String name) |
List<Employee> |
findByNameLikeOrCodeLike(String name,
String code) |
Employee |
findByUsername(String userName) |
List<Employee> |
findEmployeeByCodeLike(String code) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAll, flush, getOne, save, saveAndFlushfindAllList<Employee> findByEmployeeStatus(EmployeeStatus status)
@Query(value=" select distinct EMP from Employee EMP inner join EMP.assignments ASSIGN inner join fetch EMP.jurisdictions as JRDN where ASSIGN.department.id=:deptId and ASSIGN.designation.id=:desigId and ASSIGN.fromDate<=current_date and ASSIGN.toDate>=current_date and JRDN.boundary.id in :boundaryIds and EMP.active=true order by EMP.code") List<Employee> findByDepartmentDesignationAndBoundary(@Param(value="deptId") Long deptId, @Param(value="desigId") Long desigId, @Param(value="boundaryIds") Set<Long> boundaryIds)
@Query(value="from Employee where upper(code) like \'%\'||upper(:code)||\'%\' order by id") List<Employee> findEmployeeByCodeLike(@Param(value="code") String code)
Copyright © 2015–2017 eGovernments Foundation. All rights reserved.