Class AbstractRestoreHistoryService<E extends AbstractNamedEntity>
java.lang.Object
org.qubership.atp.itf.lite.backend.service.history.impl.AbstractRestoreHistoryService<E>
- All Implemented Interfaces:
HistoryService,RestoreHistoryService
- Direct Known Subclasses:
FolderRestoreHistoryService,HttpRequestRestoreHistoryService
public abstract class AbstractRestoreHistoryService<E extends AbstractNamedEntity>
extends Object
implements RestoreHistoryService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final EntityHistoryService<E> protected final org.javers.core.Javersprotected final org.modelmapper.ModelMapperFields inherited from interface org.qubership.atp.itf.lite.backend.service.history.iface.HistoryService
CHILD_ACTIONS_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidcopyValues(E shadow, E actualObject) getChildShadows(org.javers.shadow.Shadow<E> parentShadow, Class targetObject) getShadows(UUID id, long revisionId) Find shadows by snapshot commit id.restoreToRevision(UUID id, long revisionId) Restores the object to a state defined by revision number.protected ObjectrestoreValues(org.javers.shadow.Shadow<E> shadow, E actualObject) saveRestoredObject(E object) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.qubership.atp.itf.lite.backend.service.history.iface.HistoryService
getEntityClass, getItemType
-
Field Details
-
javers
protected final org.javers.core.Javers javers -
entityHistoryService
-
modelMapper
protected final org.modelmapper.ModelMapper modelMapper -
IS_DIFFINLCUDE_ANNOTATED_PROPERTY_FILTER
-
-
Constructor Details
-
AbstractRestoreHistoryService
public AbstractRestoreHistoryService()
-
-
Method Details
-
restoreToRevision
Restores the object to a state defined by revision number.- Specified by:
restoreToRevisionin interfaceRestoreHistoryService- Parameters:
id- of object being restored.revisionId- revision number to restore.
-
restoreValues
-
getPredicates
-
getObject
-
saveRestoredObject
-
getShadows
Find shadows by snapshot commit id.- Parameters:
id- entity id.revisionId- version.- Returns:
- list of shadows.
-
getChildShadows
-
copyValues
-