Versions

public final class Versions

Utilities for working with Version.

Functions

Link copied to clipboard
public static void checkIsIncrement(Version currentVersion, Version newVersion)
Ensures that an entity transits into a new version with a greater number.
Link copied to clipboard
public static Version increment(Version version)
Creates a new Version with the number increased by one and the timestamp of the current system time.
Link copied to clipboard
public static Version newVersion(int number, Timestamp timestamp)
Creates a new instance with the passed number and the timestamp.
Link copied to clipboard
public static Version zero()
Creates a new instance with the zero number and current system time.