Module eclipselink

Enum ServiceVersion

    • Enum Constant Detail

      • VERSION_1_0

        public static final ServiceVersion VERSION_1_0
        Version 1.0. Legacy.
      • VERSION_2_0

        public static final ServiceVersion VERSION_2_0
        Version 2.0. Supports pagination and other new features.
      • LATEST

        public static final ServiceVersion LATEST
        The latest version.
    • Method Detail

      • values

        public static ServiceVersion[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ServiceVersion c : ServiceVersion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ServiceVersion valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getCode

        public String getCode()
        Returns the version as in appears in URI.
        Returns:
        the version.
      • fromCode

        public static ServiceVersion fromCode​(String version)
                                       throws IllegalArgumentException
        Returns enumeration value by version number as it appears in URI.
        Parameters:
        version - version as it appears in URI.
        Returns:
        ServiceVersion.
        Throws:
        IllegalArgumentException - in case that the passed code does not match any enumeration value.
      • hasCode

        public static boolean hasCode​(String code)
        Checks if ServiceVersion with given code exists.
        Parameters:
        code - Code to check.
        Returns:
        true if exists, false if not.