@Test public void overwriteJudgment_SourceInfo() { JudgmentSourceInfo oldSource = new JudgmentSourceInfo(); oldSource.setPublicationDate(new DateTime(2003, 12, 23, 23, 23)); oldSource.setPublisher("123dssds d sd"); oldSource.setReviser("2323232escxcvxv3"); oldSource.setSourceJudgmentId("212121212 2121 212 12 12"); oldSource.setSourceJudgmentUrl("http: oldSource.setSourceCode(SourceCode.ADMINISTRATIVE_COURT); oldJudgment.setSourceInfo(oldSource); JudgmentSourceInfo newSource = new JudgmentSourceInfo(); DateTime newPublicationDate = new DateTime(2003, 12, 23, 23, 23); newSource.setPublicationDate(newPublicationDate); String newPublisher = "12232w sds df sd s"; newSource.setPublisher(newPublisher); String newReviser = "12232w sds df sd s"; newSource.setReviser(newReviser); String newSourceJudgmentId = "212121212sd2121 212 12 12"; newSource.setSourceJudgmentId(newSourceJudgmentId); String newSourceUrl = "http: newSource.setSourceJudgmentUrl(newSourceUrl); SourceCode newSourceType = SourceCode.COMMON_COURT; newSource.setSourceCode(newSourceType); newJudgment.setSourceInfo(newSource); judgmentOverwriter.overwriteJudgment(oldJudgment, newJudgment, correctionList); JudgmentSourceInfoAssertUtils.assertSourceInfo(oldJudgment.getSourceInfo(), newJudgment.getSourceInfo(), newPublicationDate, newPublisher, newReviser, newSourceJudgmentId, newSourceUrl, newSourceType); }
@Override public final void overwriteJudgment(Judgment oldJudgment, Judgment newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); overwriteCourtCases(oldJudgment, newJudgment); oldJudgment.setJudgmentDate(newJudgment.getJudgmentDate()); overwriteCourtReporters(oldJudgment, newJudgment); oldJudgment.setDecision(newJudgment.getDecision()); oldJudgment.setJudgmentType(newJudgment.getJudgmentType()); overwriteLegalBases(oldJudgment, newJudgment); oldJudgment.setSummary(newJudgment.getSummary()); overwriteJudgmentTextContent(oldJudgment.getTextContent(), newJudgment.getTextContent()); overwriteSourceInfo(oldJudgment.getSourceInfo(), newJudgment.getSourceInfo()); overwriteJudges(oldJudgment, newJudgment, correctionList); overwriteReferencedRegulations(oldJudgment, newJudgment); oldJudgment.setReceiptDate(newJudgment.getReceiptDate()); oldJudgment.setMeansOfAppeal(newJudgment.getMeansOfAppeal()); oldJudgment.setJudgmentResult(newJudgment.getJudgmentResult()); overwriteLowerCourtJudgments(oldJudgment, newJudgment); }
CommonJudgmentOverwriter implements JudgmentOverwriter<Judgment> { @Override public final void overwriteJudgment(Judgment oldJudgment, Judgment newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); overwriteCourtCases(oldJudgment, newJudgment); oldJudgment.setJudgmentDate(newJudgment.getJudgmentDate()); overwriteCourtReporters(oldJudgment, newJudgment); oldJudgment.setDecision(newJudgment.getDecision()); oldJudgment.setJudgmentType(newJudgment.getJudgmentType()); overwriteLegalBases(oldJudgment, newJudgment); oldJudgment.setSummary(newJudgment.getSummary()); overwriteJudgmentTextContent(oldJudgment.getTextContent(), newJudgment.getTextContent()); overwriteSourceInfo(oldJudgment.getSourceInfo(), newJudgment.getSourceInfo()); overwriteJudges(oldJudgment, newJudgment, correctionList); overwriteReferencedRegulations(oldJudgment, newJudgment); oldJudgment.setReceiptDate(newJudgment.getReceiptDate()); oldJudgment.setMeansOfAppeal(newJudgment.getMeansOfAppeal()); oldJudgment.setJudgmentResult(newJudgment.getJudgmentResult()); overwriteLowerCourtJudgments(oldJudgment, newJudgment); } }
CommonJudgmentOverwriter implements JudgmentOverwriter<Judgment> { @Override public final void overwriteJudgment(Judgment oldJudgment, Judgment newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); overwriteCourtCases(oldJudgment, newJudgment); oldJudgment.setJudgmentDate(newJudgment.getJudgmentDate()); overwriteCourtReporters(oldJudgment, newJudgment); oldJudgment.setDecision(newJudgment.getDecision()); oldJudgment.setJudgmentType(newJudgment.getJudgmentType()); overwriteLegalBases(oldJudgment, newJudgment); oldJudgment.setSummary(newJudgment.getSummary()); overwriteJudgmentTextContent(oldJudgment.getTextContent(), newJudgment.getTextContent()); overwriteSourceInfo(oldJudgment.getSourceInfo(), newJudgment.getSourceInfo()); overwriteJudges(oldJudgment, newJudgment, correctionList); overwriteReferencedRegulations(oldJudgment, newJudgment); oldJudgment.setReceiptDate(newJudgment.getReceiptDate()); oldJudgment.setMeansOfAppeal(newJudgment.getMeansOfAppeal()); oldJudgment.setJudgmentResult(newJudgment.getJudgmentResult()); overwriteLowerCourtJudgments(oldJudgment, newJudgment); }  }
CommonJudgmentOverwriter implements JudgmentOverwriter<Judgment> { @Override public final void overwriteJudgment(Judgment oldJudgment, Judgment newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); overwriteCourtCases(oldJudgment, newJudgment); oldJudgment.setJudgmentDate(newJudgment.getJudgmentDate()); overwriteCourtReporters(oldJudgment, newJudgment); oldJudgment.setDecision(newJudgment.getDecision()); oldJudgment.setJudgmentType(newJudgment.getJudgmentType()); overwriteLegalBases(oldJudgment, newJudgment); oldJudgment.setSummary(newJudgment.getSummary()); overwriteJudgmentTextContent(oldJudgment.getTextContent(), newJudgment.getTextContent()); overwriteSourceInfo(oldJudgment.getSourceInfo(), newJudgment.getSourceInfo()); overwriteJudges(oldJudgment, newJudgment, correctionList); overwriteReferencedRegulations(oldJudgment, newJudgment); oldJudgment.setReceiptDate(newJudgment.getReceiptDate()); oldJudgment.setMeansOfAppeal(newJudgment.getMeansOfAppeal()); oldJudgment.setJudgmentResult(newJudgment.getJudgmentResult()); overwriteLowerCourtJudgments(oldJudgment, newJudgment); }  @Override final void overwriteJudgment(Judgment oldJudgment, Judgment newJudgment, ImportCorrectionList correctionList); }
CommonJudgmentOverwriter implements JudgmentOverwriter<Judgment> { @Override public final void overwriteJudgment(Judgment oldJudgment, Judgment newJudgment, ImportCorrectionList correctionList) { Preconditions.checkNotNull(oldJudgment); Preconditions.checkNotNull(newJudgment); overwriteCourtCases(oldJudgment, newJudgment); oldJudgment.setJudgmentDate(newJudgment.getJudgmentDate()); overwriteCourtReporters(oldJudgment, newJudgment); oldJudgment.setDecision(newJudgment.getDecision()); oldJudgment.setJudgmentType(newJudgment.getJudgmentType()); overwriteLegalBases(oldJudgment, newJudgment); oldJudgment.setSummary(newJudgment.getSummary()); overwriteJudgmentTextContent(oldJudgment.getTextContent(), newJudgment.getTextContent()); overwriteSourceInfo(oldJudgment.getSourceInfo(), newJudgment.getSourceInfo()); overwriteJudges(oldJudgment, newJudgment, correctionList); overwriteReferencedRegulations(oldJudgment, newJudgment); oldJudgment.setReceiptDate(newJudgment.getReceiptDate()); oldJudgment.setMeansOfAppeal(newJudgment.getMeansOfAppeal()); oldJudgment.setJudgmentResult(newJudgment.getJudgmentResult()); overwriteLowerCourtJudgments(oldJudgment, newJudgment); }  @Override final void overwriteJudgment(Judgment oldJudgment, Judgment newJudgment, ImportCorrectionList correctionList);  }