Package org.javers.repository.api
Class JaversExtendedRepository
java.lang.Object
org.javers.repository.api.JaversExtendedRepository
- All Implemented Interfaces:
JaversRepository
-
Constructor Summary
ConstructorsConstructorDescriptionJaversExtendedRepository(JaversRepository delegate, SnapshotDiffer snapshotDiffer) -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled at the end of JaVers bootstrap, good place to put database schema updategetChangeHistory(Set<ManagedType> givenClasses, QueryParams queryParams) getChangeHistory(GlobalId globalId, QueryParams queryParams) getChanges(QueryParams queryParams) getHistorical(GlobalId globalId, LocalDateTime timePoint) last snapshot with commitId <= given dategetHistoricals(GlobalId globalId, LocalDateTime timePoint, boolean withChildValueObjects, int limit) getHistoricals(GlobalId globalId, CommitId timePoint, boolean withChildValueObjects, int limit) last snapshot with commitId <= given timePointgetLatest(Collection<GlobalId> globalIds) Latest snapshot of a given object.getSnapshots(Collection<SnapshotIdentifier> snapshotIdentifiers) Snapshots with specified globalId and versiongetSnapshots(QueryParams queryParams) Snapshots of all objects in reverse chronological ordergetStateHistory(Set<ManagedType> givenClasses, QueryParams queryParams) All snapshots of objects within given managed classes, in reverse chronological ordergetStateHistory(GlobalId globalId, QueryParams queryParams) Snapshots (historical states) of given object in reverse chronological ordergetValueObjectChangeHistory(EntityType ownerEntity, String path, QueryParams queryParams) getValueObjectStateHistory(EntityType ownerEntity, String path, QueryParams queryParams) Snapshots of all ValueObjects owned by given ownerEntity at given pathvoidvoidsetJsonConverter(JsonConverter jsonConverter)
-
Constructor Details
-
JaversExtendedRepository
-
-
Method Details
-
getChangeHistory
-
getChangeHistory
-
getValueObjectChangeHistory
public List<Change> getValueObjectChangeHistory(EntityType ownerEntity, String path, QueryParams queryParams) -
getChanges
-
getStateHistory
Description copied from interface:JaversRepositorySnapshots (historical states) of given object in reverse chronological order- Specified by:
getStateHistoryin interfaceJaversRepositoryqueryParams- parameters constraining returned list (size limit, util from/to)- Returns:
- empty List if object is not versioned
-
getValueObjectStateHistory
public List<CdoSnapshot> getValueObjectStateHistory(EntityType ownerEntity, String path, QueryParams queryParams) Description copied from interface:JaversRepositorySnapshots of all ValueObjects owned by given ownerEntity at given path- Specified by:
getValueObjectStateHistoryin interfaceJaversRepository
-
getLatest
Description copied from interface:JaversRepositoryLatest snapshot of a given object.
Optional#EMPTY if object is not versioned- Specified by:
getLatestin interfaceJaversRepository
-
getLatest
- Specified by:
getLatestin interfaceJaversRepository
-
getHistoricals
public List<CdoSnapshot> getHistoricals(GlobalId globalId, CommitId timePoint, boolean withChildValueObjects, int limit) last snapshot with commitId <= given timePoint -
getHistorical
last snapshot with commitId <= given date -
getHistoricals
public List<CdoSnapshot> getHistoricals(GlobalId globalId, LocalDateTime timePoint, boolean withChildValueObjects, int limit) -
getSnapshots
Description copied from interface:JaversRepositorySnapshots of all objects in reverse chronological order- Specified by:
getSnapshotsin interfaceJaversRepository- Parameters:
queryParams- parameters constraining returned list (size limit, util from/to)
-
getSnapshots
Description copied from interface:JaversRepositorySnapshots with specified globalId and version- Specified by:
getSnapshotsin interfaceJaversRepository
-
getStateHistory
Description copied from interface:JaversRepositoryAll snapshots of objects within given managed classes, in reverse chronological order- Specified by:
getStateHistoryin interfaceJaversRepositoryqueryParams- parameters constraining returned list (size limit, util from/to)- Returns:
- empty List if no snapshots found
-
persist
- Specified by:
persistin interfaceJaversRepository
-
getHeadId
- Specified by:
getHeadIdin interfaceJaversRepository
-
setJsonConverter
- Specified by:
setJsonConverterin interfaceJaversRepository
-
ensureSchema
public void ensureSchema()Description copied from interface:JaversRepositoryCalled at the end of JaVers bootstrap, good place to put database schema update- Specified by:
ensureSchemain interfaceJaversRepository
-