Package se.conciliate.extensions.store
Interface MTHistory
public interface MTHistory
A history object used to determine the export/import history
of an entity and detect conflicting changes when importing.
-
Method Summary
Modifier and TypeMethodDescriptiongetPath()
Returns the "path" of the entity.boolean
isEdited()
Returns true if the entity has been modified since the current path was generated.void
lock()
This must be called before exporting the entity from the repository.void
lock
(MTBulkOperations ops) This must be called before exporting the entity from the repository.void
save()
Saves the history.void
Manually updates the history for an entity.
-
Method Details
-
getPath
String getPath()Returns the "path" of the entity. Each time changes are made and the entity is exported the path will be added to. This is basically a list of unique identifiers that together identifies how the entity has been exported/imported between repositories. -
isEdited
boolean isEdited()Returns true if the entity has been modified since the current path was generated. If so, the next time the entity is locked for export the path will be added to. -
lock
void lock()This must be called before exporting the entity from the repository. Note that if isEdited() returns true this will result in a trip to the server layer for updating the current path. -
lock
This must be called before exporting the entity from the repository. Note that if isEdited() returns true this will result in an operation being added to the bulk operations for updating the history. -
update
Manually updates the history for an entity. This should only be used when importing/merging entities, otherwise the history is updated automatically. -
save
void save()Saves the history. This only needs to be called when the history has been updated manually using update() or for newly created entities (note that the new entity must be saved first)
-