Interface EntityVersionIncrementer<T>
- All Known Implementing Classes:
NotIncrementingEntityVersionIncrementer,SimpleEntityVersionIncrementer
public interface EntityVersionIncrementer<T>
Increments the version of a given entity. One VersionSetter is created for every entity type.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> EntityVersionIncrementer<T>createVersionSetter(Class<T> classWithId) Creates a new version setter for one specific entity type.voidincrementVersion(T objectToSetVersionIn) This method makes sure, that a version is set for the given object.
-
Method Details
-
createVersionSetter
Creates a new version setter for one specific entity type. If the entity type has no version, aNotIncrementingEntityVersionIncrementeris created, which does nothing. -
incrementVersion
This method makes sure, that a version is set for the given object. If it is already set (not null), then the version is incremented. If it is not set, a new one will be generated and set.
-