@Test public void testSearch() { AlertSearcher searcher = new AlertSearcher(); Map<String, Object> result = searcher.search(new AlertSearchFilter(), 10 ,0); Assert.assertEquals(result.get("count"), 4L); Assert.assertEquals(result.get("limit"), 10L); Assert.assertEquals(result.get("offset"), 0L); }
public Map<String, Object> search(AlertSearchFilter searchFilter, long limit, long offset) { AlertSearchQuery searchQuery = new AlertSearchQuery(searchFilter, limit, offset); List<DetectionAlertConfigDTO> subscriptionGroups = findRelatedSubscriptionGroups(searchQuery); List<DetectionConfigDTO> detectionConfigs = findDetectionConfig(searchQuery, subscriptionGroups); return getResult(searchQuery, subscriptionGroups, detectionConfigs); }
AlertSearcher { public Map<String, Object> search(AlertSearchFilter searchFilter, long limit, long offset) { AlertSearchQuery searchQuery = new AlertSearchQuery(searchFilter, limit, offset); List<DetectionAlertConfigDTO> subscriptionGroups = findRelatedSubscriptionGroups(searchQuery); List<DetectionConfigDTO> detectionConfigs = findDetectionConfig(searchQuery, subscriptionGroups); return getResult(searchQuery, subscriptionGroups, detectionConfigs); } }
AlertSearcher { public Map<String, Object> search(AlertSearchFilter searchFilter, long limit, long offset) { AlertSearchQuery searchQuery = new AlertSearchQuery(searchFilter, limit, offset); List<DetectionAlertConfigDTO> subscriptionGroups = findRelatedSubscriptionGroups(searchQuery); List<DetectionConfigDTO> detectionConfigs = findDetectionConfig(searchQuery, subscriptionGroups); return getResult(searchQuery, subscriptionGroups, detectionConfigs); } AlertSearcher(); }
AlertSearcher { public Map<String, Object> search(AlertSearchFilter searchFilter, long limit, long offset) { AlertSearchQuery searchQuery = new AlertSearchQuery(searchFilter, limit, offset); List<DetectionAlertConfigDTO> subscriptionGroups = findRelatedSubscriptionGroups(searchQuery); List<DetectionConfigDTO> detectionConfigs = findDetectionConfig(searchQuery, subscriptionGroups); return getResult(searchQuery, subscriptionGroups, detectionConfigs); } AlertSearcher(); Map<String, Object> search(AlertSearchFilter searchFilter, long limit, long offset); }
AlertSearcher { public Map<String, Object> search(AlertSearchFilter searchFilter, long limit, long offset) { AlertSearchQuery searchQuery = new AlertSearchQuery(searchFilter, limit, offset); List<DetectionAlertConfigDTO> subscriptionGroups = findRelatedSubscriptionGroups(searchQuery); List<DetectionConfigDTO> detectionConfigs = findDetectionConfig(searchQuery, subscriptionGroups); return getResult(searchQuery, subscriptionGroups, detectionConfigs); } AlertSearcher(); Map<String, Object> search(AlertSearchFilter searchFilter, long limit, long offset);  }