Class VersionManager<T>
java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.copier.version.VersionManager<T>
- Type Parameters:
T- type of entity
Manages the versions of one type of entity
-
Constructor Summary
ConstructorsConstructorDescriptionVersionManager(Class<T> entityClass, EntityVersionIncrementer<T> entityVersionIncrementer) -
Method Summary
Modifier and TypeMethodDescriptionvoidensureSameVersion(T workingCopy, T original) Checks if the two entities are valid for merge.voidincrementVersion(T entity) Increments the version of given entity
-
Constructor Details
-
VersionManager
-
-
Method Details
-
incrementVersion
Increments the version of given entity- Parameters:
entity- to increment the version in
-
ensureSameVersion
Checks if the two entities are valid for merge. If they have the same version, everything is ok. But if the workingCopy-version is null or different from the original-version, an Exception is thrown.
-