java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.copier.version.VersionManager<T>
Type Parameters:
T - type of entity

public class VersionManager<T> extends Object
Manages the versions of one type of entity
  • Constructor Details

  • Method Details

    • incrementVersion

      public void incrementVersion(T entity)
      Increments the version of given entity
      Parameters:
      entity - to increment the version in
    • ensureSameVersion

      public void ensureSameVersion(T workingCopy, T original)
      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.