Interface HistoryDataStore
- All Known Implementing Classes:
HistoryDataStoreImpl
public interface HistoryDataStore
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the underlying session factory.void
deleteOldHistoryEntries
(long maximumAge) Deletes all HistoryEntries that are older then maximumAge@Nullable HistorySnapshot
fetch
(long pk) Fetch a specificHistorySnapshot
by primary key.getCount
(HistorySearchParams searchParams) Returns the number ofhistory entries
which apply to the givenHistorySearchParams
.getHistoryEntries
(HistorySearchParams searchParams) Returns a list ofHistoryEntry
instances that are ordered by timestamp (descending).boolean
hasPermissionForModel
(String entityModel) Returns true if the current user has access to the history of the given entity modelsaveOrUpdateHistoryEntries
(List<HistorySnapshot> domainEntity) Saves the givenHistorySnapshot
instances into the store.
-
Method Details
-
getDataSource
DataSource getDataSource()- Returns:
- the
DataSource
of the history database
-
saveOrUpdateHistoryEntries
Saves the givenHistorySnapshot
instances into the store. If theHistorySnapshot
contains an existing primary key, the existing entry is updated. -
getCount
Returns the number ofhistory entries
which apply to the givenHistorySearchParams
. -
getHistoryEntries
Returns a list ofHistoryEntry
instances that are ordered by timestamp (descending).- Parameters:
searchParams
- bean that defines the pagination and filtering of the results
-
fetch
Fetch a specificHistorySnapshot
by primary key. The primary key can be obtained from theVersion
object 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
-