@Repository public interface EmployeeAvailabilityRepository extends org.springframework.data.jpa.repository.JpaRepository<EmployeeAvailability,Long>
| Modifier and Type | Method and Description |
|---|---|
void |
deleteForTenant(Integer tenantId) |
List<EmployeeAvailability> |
filterWithEmployee(Integer tenantId,
Set<Employee> employeeSet,
OffsetDateTime startDateTime,
OffsetDateTime endDateTime) |
List<EmployeeAvailability> |
findAllByTenantId(Integer tenantId) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlushfindAll@Query(value="select distinct ea from EmployeeAvailability ea left join fetch ea.employee e where ea.tenantId = :tenantId order by e.name, ea.startDateTime") List<EmployeeAvailability> findAllByTenantId(@Param(value="tenantId") Integer tenantId)
@Modifying(flushAutomatically=true,
clearAutomatically=true)
@Query(value="delete from EmployeeAvailability ea where ea.tenantId = :tenantId")
void deleteForTenant(@Param(value="tenantId")
Integer tenantId)
@Query(value="select distinct ea from EmployeeAvailability ea left join fetch ea.employee e where ea.tenantId = :tenantId and ea.employee IN :employeeSet and ea.endDateTime >= :startDateTime and ea.startDateTime < :endDateTime order by e.name, ea.startDateTime") List<EmployeeAvailability> filterWithEmployee(@Param(value="tenantId") Integer tenantId, @Param(value="employeeSet") Set<Employee> employeeSet, @Param(value="startDateTime") OffsetDateTime startDateTime, @Param(value="endDateTime") OffsetDateTime endDateTime)
Copyright © 2017–2021 JBoss by Red Hat. All rights reserved.