Interface EmployeeAvailabilityRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<EmployeeAvailability,Long>,org.springframework.data.jpa.repository.JpaRepository<EmployeeAvailability,Long>,org.springframework.data.repository.PagingAndSortingRepository<EmployeeAvailability,Long>,org.springframework.data.repository.query.QueryByExampleExecutor<EmployeeAvailability>,org.springframework.data.repository.Repository<EmployeeAvailability,Long>
@Repository public interface EmployeeAvailabilityRepository extends org.springframework.data.jpa.repository.JpaRepository<EmployeeAvailability,Long>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteForTenant(Integer tenantId)List<EmployeeAvailability>filterWithEmployee(Integer tenantId, Set<Employee> employeeSet, OffsetDateTime startDateTime, OffsetDateTime endDateTime)List<EmployeeAvailability>findAllByTenantId(Integer tenantId)-
Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
-
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
-
-
-
-
Method Detail
-
findAllByTenantId
@Query("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("tenantId") Integer tenantId)
-
deleteForTenant
@Modifying(flushAutomatically=true, clearAutomatically=true) @Query("delete from EmployeeAvailability ea where ea.tenantId = :tenantId") void deleteForTenant(@Param("tenantId") Integer tenantId)
-
filterWithEmployee
@Query("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("tenantId") Integer tenantId, @Param("employeeSet") Set<Employee> employeeSet, @Param("startDateTime") OffsetDateTime startDateTime, @Param("endDateTime") OffsetDateTime endDateTime)
-
-