{
List<HistoryEntry> historyEntries = new LinkedList<HistoryEntry>();
result.setItems(historyEntries);
for (BasePersistentHistoryEntry entry : history.getResults())
{
HistoryEntry historyEntry = new HistoryEntry();
historyEntry.setId(entry.getEntityId());
historyEntry.setHistoryAction(entry.getHistoryAction());
historyEntry.setTimestamp(entry.getTimestamp());
historyEntry.setUser(entry.getUser());
historyEntry.setApiVersion(entry.getApiVersion());
historyEntry.setEntry(historyEntryFactory.readEntry(entry,context));
historyEntries.add(historyEntry);
}
}
else
result.setItems(Collections.EMPTY_LIST);