Interface HistoryDataStore

All Known Implementing Classes:
HistoryDataStoreImpl

public interface HistoryDataStore
  • Method Details

    • getDataSource

      DataSource getDataSource()
      Returns:
      the DataSource of the history database
    • saveOrUpdateHistoryEntries

      List<Long> saveOrUpdateHistoryEntries(List<HistorySnapshot> domainEntity)
      Saves the given HistorySnapshot instances into the store. If the HistorySnapshot contains an existing primary key, the existing entry is updated.
    • getCount

      Long getCount(HistorySearchParams searchParams)
      Returns the number of history entries which apply to the given HistorySearchParams.
    • getHistoryEntries

      List<HistoryEntry> getHistoryEntries(HistorySearchParams searchParams)
      Returns a list of HistoryEntry instances that are ordered by timestamp (descending).
      Parameters:
      searchParams - bean that defines the pagination and filtering of the results
    • fetch

      @Nullable @Nullable HistorySnapshot fetch(long pk)
      Fetch a specific HistorySnapshot by primary key. The primary key can be obtained from the Version object returned by getHistoryEntries(HistorySearchParams).
    • deleteOldHistoryEntries

      void deleteOldHistoryEntries(long maximumAge)
      Deletes all HistoryEntries that are older then maximumAge
      Parameters:
      maximumAge - the maximum age of history entries in months
    • close

      void close()
      Closes the underlying session factory.
    • hasPermissionForModel

      boolean hasPermissionForModel(String entityModel)
      Returns true if the current user has access to the history of the given entity model