Class Version

  • All Implemented Interfaces:
    Comparable<Version>

    public class Version
    extends Object
    implements Comparable<Version>
    Simple class to parse utPLSQL Version-information and provide the separate version-numbers
    Author:
    pesse
    • Field Detail

      • V3_0_0

        public static final Version V3_0_0
      • V3_0_1

        public static final Version V3_0_1
      • V3_0_2

        public static final Version V3_0_2
      • V3_0_3

        public static final Version V3_0_3
      • V3_0_4

        public static final Version V3_0_4
      • V3_1_0

        public static final Version V3_1_0
      • V3_1_1

        public static final Version V3_1_1
      • V3_1_2

        public static final Version V3_1_2
      • V3_1_3

        public static final Version V3_1_3
      • V3_1_4

        public static final Version V3_1_4
      • V3_1_5

        public static final Version V3_1_5
      • V3_1_6

        public static final Version V3_1_6
      • V3_1_7

        public static final Version V3_1_7
      • V3_1_8

        public static final Version V3_1_8
      • V3_1_9

        public static final Version V3_1_9
      • V3_1_10

        public static final Version V3_1_10
      • V3_1_11

        public static final Version V3_1_11
      • V3_1_12

        public static final Version V3_1_12
      • V3_1_13

        public static final Version V3_1_13
      • LATEST

        public static final Version LATEST
    • Method Detail

      • create

        public static Version create​(String versionString)
      • isValid

        public boolean isValid()
      • getNormalizedString

        public String getNormalizedString()
        Returns a normalized form of the parsed version information
        Returns:
        normalized string
      • compareTo

        public int compareTo​(Version o,
                             boolean nullMeansEqual)
      • isGreaterOrEqualThan

        public boolean isGreaterOrEqualThan​(Version v)
                                     throws InvalidVersionException
        Compares this version to a given version and returns true if this version is greater or equal than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws an InvalidVersionException if either this or the given version are invalid
        Parameters:
        v - Version to compare with
        Returns:
        true if is greater or equal
        Throws:
        InvalidVersionException - If the version does not match
      • isGreaterThan

        public boolean isGreaterThan​(Version v)
                              throws InvalidVersionException
        Compares this version to a given version and returns true if this version is greater than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws an InvalidVersionException if either this or the given version are invalid
        Parameters:
        v - Version to compare with
        Returns:
        true if is greater
        Throws:
        InvalidVersionException - If the version does not match
      • isLessOrEqualThan

        public boolean isLessOrEqualThan​(Version v)
                                  throws InvalidVersionException
        Compares this version to a given version and returns true if this version is less or equal than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws an InvalidVersionException if either this or the given version are invalid
        Parameters:
        v - Version to compare with
        Returns:
        if version is less or equal
        Throws:
        InvalidVersionException - If version is invalid
      • isLessThan

        public boolean isLessThan​(Version v)
                           throws InvalidVersionException
        Compares this version to a given version and returns true if this version is less than the given one If one of the version parts of the base version is null, this level is assumed equal no matter the comparing level's version part Throws an InvalidVersionException if either this or the given version are invalid
        Parameters:
        v - Version to compare with
        Returns:
        if version is less
        Throws:
        InvalidVersionException - If version is invalid