Interface HistoryDataStore
- All Known Implementing Classes:
HistoryDataStoreImpl
public interface HistoryDataStore
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the underlying session factory.voiddeleteOldHistoryEntries(long maximumAge) Deletes all HistoryEntries that are older then maximumAge@Nullable HistorySnapshotfetch(long pk) Fetch a specificHistorySnapshotby primary key.getCount(HistorySearchParams searchParams) Returns the number ofhistory entrieswhich apply to the givenHistorySearchParams.getHistoryEntries(HistorySearchParams searchParams) Returns a list ofHistoryEntryinstances that are ordered by timestamp (descending).booleanhasPermissionForModel(String entityModel) Returns true if the current user has access to the history of the given entity modelsaveOrUpdateHistoryEntries(List<HistorySnapshot> domainEntity) Saves the givenHistorySnapshotinstances into the store.
-
Method Details
-
getDataSource
DataSource getDataSource()- Returns:
- the
DataSourceof the history database
-
saveOrUpdateHistoryEntries
Saves the givenHistorySnapshotinstances into the store. If theHistorySnapshotcontains an existing primary key, the existing entry is updated. -
getCount
Returns the number ofhistory entrieswhich apply to the givenHistorySearchParams. -
getHistoryEntries
Returns a list ofHistoryEntryinstances that are ordered by timestamp (descending).- Parameters:
searchParams- bean that defines the pagination and filtering of the results
-
fetch
Fetch a specificHistorySnapshotby primary key. The primary key can be obtained from theVersionobject returned bygetHistoryEntries(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
Returns true if the current user has access to the history of the given entity model
-