@Test public void fetchEnrichmentTagsForJudgments() { long notExistingJudgmentId = testObjectContext.getCcJudgmentId() + testObjectContext.getScJudgmentId() + testObjectContext.getCtJudgmentId() + testObjectContext.getNacJudgmentId(); List<JudgmentEnrichmentTags> judgmentsEnrichmentTags = judgmentEnrichmentTagsFetcher.fetchEnrichmentTagsForJudgments( Lists.newArrayList(testObjectContext.getCtJudgmentId(), testObjectContext.getNacJudgmentId(), notExistingJudgmentId)); assertEquals(3, judgmentsEnrichmentTags.size()); JudgmentEnrichmentTags ctjEnrichmentTags = getJudgmentEnrichmentTags(judgmentsEnrichmentTags, testObjectContext.getCtJudgmentId()); assertNotNull(ctjEnrichmentTags); assertThat(ctjEnrichmentTags.getEnrichmentTags(), containsInAnyOrder(ccjRefCourtCasesTag, scjRefCourtCasesTag, ctjTag)); JudgmentEnrichmentTags nacjEnrichmentTags = getJudgmentEnrichmentTags(judgmentsEnrichmentTags, testObjectContext.getNacJudgmentId()); assertNotNull(nacjEnrichmentTags); assertThat(nacjEnrichmentTags.getEnrichmentTags(), containsInAnyOrder(scjRefCourtCasesTag)); JudgmentEnrichmentTags notExistingJudgmentEnrichmentTags = getJudgmentEnrichmentTags(judgmentsEnrichmentTags, notExistingJudgmentId); assertNotNull(notExistingJudgmentEnrichmentTags); assertEquals(0, notExistingJudgmentEnrichmentTags.getEnrichmentTags().size()); }
public List<JudgmentEnrichmentTags> fetchEnrichmentTagsForJudgments(List<Long> judgmentIds) { Map<Long, JudgmentEnrichmentTags> judgmentsDirectEnrichmentTagsMap = fetchJudgmentsDirectTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsReferencingEnrichmentTags = fetchJudgmentsReferencingTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsEnrichmentTagsMap = initializeJudgmentsEnrichmentTagsMap(judgmentIds); mergeJudgmentsEnrichmentTagsMaps(judgmentsDirectEnrichmentTagsMap, judgmentsEnrichmentTagsMap); mergeJudgmentsEnrichmentTagsMaps(judgmentsReferencingEnrichmentTags, judgmentsEnrichmentTagsMap); return Lists.newLinkedList(judgmentsEnrichmentTagsMap.values()); }
JudgmentEnrichmentTagsFetcher { public List<JudgmentEnrichmentTags> fetchEnrichmentTagsForJudgments(List<Long> judgmentIds) { Map<Long, JudgmentEnrichmentTags> judgmentsDirectEnrichmentTagsMap = fetchJudgmentsDirectTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsReferencingEnrichmentTags = fetchJudgmentsReferencingTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsEnrichmentTagsMap = initializeJudgmentsEnrichmentTagsMap(judgmentIds); mergeJudgmentsEnrichmentTagsMaps(judgmentsDirectEnrichmentTagsMap, judgmentsEnrichmentTagsMap); mergeJudgmentsEnrichmentTagsMaps(judgmentsReferencingEnrichmentTags, judgmentsEnrichmentTagsMap); return Lists.newLinkedList(judgmentsEnrichmentTagsMap.values()); } }
JudgmentEnrichmentTagsFetcher { public List<JudgmentEnrichmentTags> fetchEnrichmentTagsForJudgments(List<Long> judgmentIds) { Map<Long, JudgmentEnrichmentTags> judgmentsDirectEnrichmentTagsMap = fetchJudgmentsDirectTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsReferencingEnrichmentTags = fetchJudgmentsReferencingTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsEnrichmentTagsMap = initializeJudgmentsEnrichmentTagsMap(judgmentIds); mergeJudgmentsEnrichmentTagsMaps(judgmentsDirectEnrichmentTagsMap, judgmentsEnrichmentTagsMap); mergeJudgmentsEnrichmentTagsMaps(judgmentsReferencingEnrichmentTags, judgmentsEnrichmentTagsMap); return Lists.newLinkedList(judgmentsEnrichmentTagsMap.values()); }  }
JudgmentEnrichmentTagsFetcher { public List<JudgmentEnrichmentTags> fetchEnrichmentTagsForJudgments(List<Long> judgmentIds) { Map<Long, JudgmentEnrichmentTags> judgmentsDirectEnrichmentTagsMap = fetchJudgmentsDirectTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsReferencingEnrichmentTags = fetchJudgmentsReferencingTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsEnrichmentTagsMap = initializeJudgmentsEnrichmentTagsMap(judgmentIds); mergeJudgmentsEnrichmentTagsMaps(judgmentsDirectEnrichmentTagsMap, judgmentsEnrichmentTagsMap); mergeJudgmentsEnrichmentTagsMaps(judgmentsReferencingEnrichmentTags, judgmentsEnrichmentTagsMap); return Lists.newLinkedList(judgmentsEnrichmentTagsMap.values()); }  List<JudgmentEnrichmentTags> fetchEnrichmentTagsForJudgments(List<Long> judgmentIds); }
JudgmentEnrichmentTagsFetcher { public List<JudgmentEnrichmentTags> fetchEnrichmentTagsForJudgments(List<Long> judgmentIds) { Map<Long, JudgmentEnrichmentTags> judgmentsDirectEnrichmentTagsMap = fetchJudgmentsDirectTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsReferencingEnrichmentTags = fetchJudgmentsReferencingTags(judgmentIds); Map<Long, JudgmentEnrichmentTags> judgmentsEnrichmentTagsMap = initializeJudgmentsEnrichmentTagsMap(judgmentIds); mergeJudgmentsEnrichmentTagsMaps(judgmentsDirectEnrichmentTagsMap, judgmentsEnrichmentTagsMap); mergeJudgmentsEnrichmentTagsMaps(judgmentsReferencingEnrichmentTags, judgmentsEnrichmentTagsMap); return Lists.newLinkedList(judgmentsEnrichmentTagsMap.values()); }  List<JudgmentEnrichmentTags> fetchEnrichmentTagsForJudgments(List<Long> judgmentIds);  }