Package oracle.kv

# Class KVVersion

java.lang.Object
oracle.kv.KVVersion

All Implemented Interfaces:
  `Serializable`, `Comparable<KVVersion>`

public class KVVersion extends Object implements Comparable<KVVersion>, Serializable
Oracle NoSQL DB version information. Versions consist of major, minor and patch numbers.

There is one KVVersion object per running JVM and it may be accessed using the static field `CURRENT_VERSION`.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final KVVersion`
  `CURRENT_VERSION`
  The current software version.
  `static final KVVersion`
  `PREREQUISITE_VERSION`
  The current prerequisite version.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `KVVersion(int oracleMajor, int oracleMinor, int majorNum, int minorNum, int patchNum, String name)`
  `KVVersion(int majorNum, int minorNum, int patchNum, String name)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(KVVersion comparedVersion)`
  `boolean`
  `equals(Object o)`
  `int`
  `getMajor()`
  Major number of the release version.
  `int`
  `getMinor()`
  Minor number of the release version.
  `String`
  `getNumericVersionString()`
  The numeric version string, without the patch tag.
  `int`
  `getOracleMajor()`
  Oracle Major number of the release version.
  `int`
  `getOracleMinor()`
  Oracle Minor number of the release version.
  `int`
  `getPatch()`
  Patch number of the release version.
  `String`
  `getReleaseDate()`
  Returns the release date for the release version, or null if not known.
  `String`
  `getReleaseEdition()`
  Returns the name of the edition of the release version, or null if not known.
  `String`
  `getReleaseId()`
  Returns the internal release ID for the release version, or null if not known.
  `String`
  `getVersionString()`
  Release version, suitable for display.
  `int`
  `hashCode()`
  `static void`
  `main(String[] argv)`
  `static KVVersion`
  `parseVersion(String versionString)`
  Returns a KVVersion object representing the specified version string without the release ID, release date,and name parts filled in.
  `void`
  `setReleaseId(String releaseId)`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### CURRENT_VERSION

    public static final KVVersion CURRENT_VERSION
    The current software version.

  - ### PREREQUISITE_VERSION

    public static final KVVersion PREREQUISITE_VERSION
    The current prerequisite version. Nodes can only join the cluster if they are running at least this version of the software. NOTE: As of 25.1 the prerequisite *should* be 23.1 but in order to make cloud upgrades to 25.x the prerequisite is 22.3 (the last public release before 22.4 which is the cloud version as of Jan 2025). This is a temporary departure from the convention that the prerequisite version is a "XX.1" version. See note in SerialVersion.java about how to manage prerequisite version, compatibility, and dead code that occurs when the prerequisite moves.

- ## Constructor Details

  - ### KVVersion

    public KVVersion(int majorNum, int minorNum, int patchNum, String name)

  - ### KVVersion

    public KVVersion(int oracleMajor, int oracleMinor, int majorNum, int minorNum, int patchNum, String name)

- ## Method Details

  - ### main

    public static void main(String[] argv)

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getOracleMajor

    public int getOracleMajor()
    Oracle Major number of the release version.
    Returns:
      The Oracle major number of the release version.

  - ### getOracleMinor

    public int getOracleMinor()
    Oracle Minor number of the release version.
    Returns:
      The Oracle minor number of the release version.

  - ### getMajor

    public int getMajor()
    Major number of the release version.
    Returns:
      The major number of the release version.

  - ### getMinor

    public int getMinor()
    Minor number of the release version.
    Returns:
      The minor number of the release version.

  - ### getPatch

    public int getPatch()
    Patch number of the release version.
    Returns:
      The patch number of the release version.

  - ### getReleaseId

    public String getReleaseId()
    Returns the internal release ID for the release version, or null if not known.
    Returns:
      the release ID or null

  - ### getReleaseDate

    public String getReleaseDate()
    Returns the release date for the release version, or null if not known.
    Returns:
      the release date or null

  - ### getReleaseEdition

    public String getReleaseEdition()
    Returns the name of the edition of the release version, or null if not known.
    Returns:
      the release edition or null

  - ### getNumericVersionString

    public String getNumericVersionString()
    The numeric version string, without the patch tag.
    Returns:
      The release version

  - ### getVersionString

    public String getVersionString()
    Release version, suitable for display.
    Returns:
      The release version, suitable for display.

  - ### parseVersion

    public static KVVersion parseVersion(String versionString)
    Returns a KVVersion object representing the specified version string without the release ID, release date,and name parts filled in. This method is basically the inverse of getNumericVersionString(). This method will also parse a full version string (returned from toString()) but only the numeric version portion of the string.
    Parameters:
      `versionString` - version string to parse
    Returns:
      a KVVersion object

  - ### setReleaseId

    public void setReleaseId(String releaseId)

  - ### compareTo

    public int compareTo(KVVersion comparedVersion)
    Specified by:
      `compareTo` in interface `Comparable<KVVersion>`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`