public class JaversExtendedRepository extends java.lang.Object implements JaversRepository
| Constructor and Description |
|---|
JaversExtendedRepository(JaversRepository delegate,
GlobalIdFactory globalIdFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
ensureSchema()
Called at the end of JaVers bootstrap,
good place to put database schema update
|
CommitId |
getHeadId() |
Optional<CdoSnapshot> |
getLatest(GlobalId globalId)
Latest snapshot of given object,
Optional#EMPTY if object is not versioned
|
Optional<CdoSnapshot> |
getLatest(GlobalIdDTO globalCdoIdDTO) |
java.util.List<CdoSnapshot> |
getStateHistory(GlobalIdDTO globalIdDTO,
int limit) |
java.util.List<CdoSnapshot> |
getStateHistory(GlobalId globalId,
int limit)
Snapshots (historical states) of given object
in reverse chronological order
|
void |
persist(Commit commit) |
void |
setJsonConverter(JsonConverter jsonConverter) |
public JaversExtendedRepository(JaversRepository delegate, GlobalIdFactory globalIdFactory)
public java.util.List<CdoSnapshot> getStateHistory(GlobalIdDTO globalIdDTO, int limit)
public java.util.List<CdoSnapshot> getStateHistory(GlobalId globalId, int limit)
JaversRepositorygetStateHistory in interface JaversRepositorylimit - choose reasonable limits, production database could contain more records than you expectpublic Optional<CdoSnapshot> getLatest(GlobalIdDTO globalCdoIdDTO)
public Optional<CdoSnapshot> getLatest(GlobalId globalId)
JaversRepositorygetLatest in interface JaversRepositorypublic void persist(Commit commit)
persist in interface JaversRepositorypublic CommitId getHeadId()
getHeadId in interface JaversRepositorypublic void setJsonConverter(JsonConverter jsonConverter)
setJsonConverter in interface JaversRepositorypublic void ensureSchema()
JaversRepositoryensureSchema in interface JaversRepository