Class AbstractRetrieveHistoryService<S extends DateAuditorEntity,D extends AbstractCompareEntityDto>
java.lang.Object
org.qubership.atp.mia.service.history.impl.AbstractRetrieveHistoryService<S,D>
- All Implemented Interfaces:
HistoryService<S>,RetrieveHistoryService<S>
- Direct Known Subclasses:
CompoundRetrieveHistoryService,DirectoryRetrieveHistoryService,FileRetrieveHistoryService,ProcessRetrieveHistoryService,ProjectConfigurationRetrieveHistoryService,SectionRetrieveHistoryService
public abstract class AbstractRetrieveHistoryService<S extends DateAuditorEntity,D extends AbstractCompareEntityDto>
extends Object
implements RetrieveHistoryService<S>
-
Field Summary
FieldsFields inherited from interface org.qubership.atp.mia.service.history.HistoryService
CHILD_ACTIONS_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionAbstractRetrieveHistoryService(org.javers.core.Javers javers, AbstractVersioningMapper<S, D> abstractVersioningMapper) -
Method Summary
Modifier and TypeMethodDescriptiongetAllHistory(UUID id, Integer offset, Integer limit) Finds all history of changes for provided entity id.protected org.javers.repository.jql.JqlQuerygetChangesByIdPaginationQuery(UUID id, Collection<BigDecimal> commitIds) protected org.javers.repository.jql.JqlQuerygetEntitiesByVersions(UUID id, List<String> versions) Returns collection of entities with requested revision numbers.protected org.javers.repository.jql.JqlQuerygetSnapshotsByLimit(UUID id, Integer offset, Integer limit) protected IntegergetVersionByCommitId(List<org.javers.core.metamodel.object.CdoSnapshot> snapshots, org.javers.core.commit.CommitId id) protected voidprocessChildChanges(org.javers.core.diff.Change propertyChange, HistoryItemDto historyItemDto) protected voidsetCommonFields(S source, D destination, org.javers.core.commit.CommitMetadata commitMetadata, UUID uuid) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.qubership.atp.mia.service.history.HistoryService
getEntityClass, getItemType
-
Field Details
-
abstractVersioningMapper
protected final AbstractVersioningMapper<S extends DateAuditorEntity,D extends AbstractCompareEntityDto> abstractVersioningMapper
-
-
Constructor Details
-
AbstractRetrieveHistoryService
public AbstractRetrieveHistoryService(org.javers.core.Javers javers, AbstractVersioningMapper<S, D> abstractVersioningMapper)
-
-
Method Details
-
getAllHistory
Finds all history of changes for provided entity id.- Specified by:
getAllHistoryin interfaceRetrieveHistoryService<S extends DateAuditorEntity>- Parameters:
id- object id of requested entityoffset- index of the first element in collectionlimit- number of items in collection- Returns:
- list of changes
-
getEntitiesByVersions
Returns collection of entities with requested revision numbers.- Specified by:
getEntitiesByVersionsin interfaceRetrieveHistoryService<S extends DateAuditorEntity>- Parameters:
id- uuid of entity in DB.versions- collection of requested revision numbers.- Returns:
- collection of CompareEntityResponse.
-
getChangesByIdPaginationQuery
protected org.javers.repository.jql.JqlQuery getChangesByIdPaginationQuery(UUID id, Collection<BigDecimal> commitIds) -
getSnapshotsByLimit
-
getChangesByIdQuery
-
getVersionByCommitId
-
processChildChanges
protected void processChildChanges(org.javers.core.diff.Change propertyChange, HistoryItemDto historyItemDto) -
setCommonFields
-
getCountOfCommits
-