class DetectorServiceImpl implements DetectorService {

    @Override
    public List<Detector> getLastUsedDetectors(int noOfDays) {
        val now = DateUtil.now().toInstant();
        val fromDate = DateUtil.toUtcDateString((now.minus(noOfDays, ChronoUnit.DAYS)));
        return repository.findByMeta_DateLastAccessedLessThan(fromDate);
    }

}