Class AbstractRestoreHistoryService<E extends DateAuditorEntity>

java.lang.Object
org.qubership.atp.mia.service.history.impl.AbstractRestoreHistoryService<E>
All Implemented Interfaces:
HistoryService, RestoreHistoryService
Direct Known Subclasses:
CompoundConfigurationRestoreHistoryService, ProcessConfigurationRestoreHistoryService, ProjectConfigurationRestoreHistoryService, SectionConfigurationRestoreHistoryService

public abstract class AbstractRestoreHistoryService<E extends DateAuditorEntity> extends Object implements RestoreHistoryService
  • Field Details

    • javers

      protected final org.javers.core.Javers javers
    • entityHistoryService

      protected final EntityHistoryService<E extends DateAuditorEntity> entityHistoryService
    • modelMapper

      protected final org.qubership.atp.mia.service.history.impl.AbstractRestoreMapper modelMapper
  • Constructor Details

    • AbstractRestoreHistoryService

      public AbstractRestoreHistoryService()
  • Method Details

    • restoreToRevision

      public Object restoreToRevision(UUID id, long revisionId)
      Restores the object to a state defined by revision number.
      Specified by:
      restoreToRevision in interface RestoreHistoryService
      Parameters:
      id - of object being restored.
      revisionId - revision number to restore.
    • restoreToCommit

      public Object restoreToCommit(UUID id, org.javers.core.commit.CommitId commitId)
      Restores the object to a state defined by commit id.
      Parameters:
      id - of object being restored.
      commitId - commit id to restore.
    • restoreValues

      protected Object restoreValues(org.javers.shadow.Shadow<E> shadow, E actualObject)
    • getObject

      public E getObject(UUID id)
    • saveRestoredObject

      public E saveRestoredObject(E object)
    • copyValues

      protected abstract void copyValues(E shadow, E actualObject)