Esempio n. 1
0
  public LogReport getLogReportForAuthor(String author) {
    LogReport report = new LogReport();

    for (LogEntry entry : logEntries) {
      if (entry.getAuthor().equals(author)) {
        report.addLogEntry(entry);
      }
    }

    return report.isEmpty() ? null : report;
  }
Esempio n. 2
0
  public void union(LogReport report) {
    if (report == null) {
      return;
    }

    List<LogEntry> logEntries = report.getOrderedLogEntries();
    for (LogEntry logEntry : logEntries) {
      LogEntry _logEntry = getLogEntryByRevision(logEntry.getRevision());
      if (_logEntry == null) {
        this.addLogEntry(logEntry);
        continue;
      }

      _logEntry.union(logEntry);
    }

    isOrdered = false;
  }