Interface EmployeeAvailabilityRepository

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void deleteForTenant​(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
      • Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

        findAll
      • Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

        count, exists, findAll, findOne
    • 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)