Package org.javers.repository.inmemory
Class InMemoryRepository
java.lang.Object
org.javers.repository.inmemory.InMemoryRepository
- All Implemented Interfaces:
JaversRepository
Fake impl of JaversRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled at the end of JaVers bootstrap, good place to put database schema updateLatest 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 ordergetValueObjectStateHistory(EntityType ownerEntity, String path, QueryParams queryParams) Snapshots of all ValueObjects owned by given ownerEntity at given pathbooleanbooleanisDateInRange(QueryParams q, LocalDateTime date) voidvoidsetJsonConverter(JsonConverter jsonConverter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.javers.repository.api.JaversRepository
getLatest
-
Constructor Details
-
InMemoryRepository
public InMemoryRepository()
-
-
Method Details
-
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
-
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
-
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
-
isDateInRange
-
getLatest
Description copied from interface:JaversRepositoryLatest snapshot of a given object.
Optional#EMPTY if object is not versioned- Specified by:
getLatestin interfaceJaversRepository
-
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
-
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
-
hasInstants
-