Enum ServiceVersion
- All Implemented Interfaces:
Serializable
,Comparable<ServiceVersion>
,java.lang.constant.Constable
JPARS service version.
- Since:
- EclipseLink 2.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe latest version.Version 1.0.Version 2.0. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceVersion
Returns enumeration value by version number as it appears in URI.getCode()
Returns the version as in appears in URI.Gets aFeatureSet
related to this service version.static boolean
Checks if ServiceVersion with given code exists.static ServiceVersion
Returns the enum constant of this type with the specified name.static ServiceVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VERSION_1_0
Version 1.0. Legacy. -
VERSION_2_0
Version 2.0. Supports pagination and other new features. -
LATEST
The latest version.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-
getCode
Returns the version as in appears in URI.- Returns:
- the version.
-
fromCode
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.
-
getFeatureSet
Gets aFeatureSet
related to this service version.- Returns:
FeatureSet
related to this version.
-
hasCode
Checks if ServiceVersion with given code exists.- Parameters:
code
- Code to check.- Returns:
- true if exists, false if not.
-