Package org.eclipse.persistence.jpa.jpql
Enum EclipseLinkVersion
- java.lang.Object
-
- java.lang.Enum<EclipseLinkVersion>
-
- org.eclipse.persistence.jpa.jpql.EclipseLinkVersion
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EclipseLinkVersion>
public enum EclipseLinkVersion extends java.lang.Enum<EclipseLinkVersion>
An enumeration listing the various releases of EclipseLink.- Version:
- 2.6
- Author:
- Pascal Filion
- Since:
- 2.5
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT_VERSION
A constant that points to the current release of EclipseLink, which is 2.6.VERSION_1_x
The constant for the EclipseLink 1.x release.VERSION_2_0
The constant for the EclipseLink 2.0 release.VERSION_2_1
The constant for the EclipseLink 2.1 release.VERSION_2_2
The constant for the EclipseLink 2.2 release.VERSION_2_3
The constant for the EclipseLink 2.3 release.VERSION_2_4
The constant for the EclipseLink 2.4 release.VERSION_2_5
The constant for the EclipseLink 2.5 release.VERSION_2_6
The constant for the EclipseLink 2.6 release.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getVersion()
Returns the real version this constant represents.boolean
isNewerThan(EclipseLinkVersion version)
Determines whether this constant represents a version that is newer than the given version.boolean
isNewerThanOrEqual(EclipseLinkVersion version)
Determines whether this constant represents a version that is newer than the given version or if it's the same version.boolean
isOlderThan(EclipseLinkVersion version)
Determines whether this constant represents a version that is older than the given version.boolean
isOlderThanOrEqual(EclipseLinkVersion version)
Determines whether this constant represents a version that is older than the given version or if it's the same version.EclipseLinkVersion
toCurrentVersion()
Converts the current constant to one of the known versions, this means if the constant isDEFAULT_VERSION
, then it will be converted into the actual constant representing that version.java.lang.String
toString()
static EclipseLinkVersion
value(java.lang.String value)
Retrieves the enumeration constant for the given value.static EclipseLinkVersion
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EclipseLinkVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.static EclipseLinkVersion[]
versions()
Returns the list ofEclipseLinkVersion
excludingDEFAULT_VERSION
.
-
-
-
Enum Constant Detail
-
DEFAULT_VERSION
public static final EclipseLinkVersion DEFAULT_VERSION
A constant that points to the current release of EclipseLink, which is 2.6.
-
VERSION_1_x
public static final EclipseLinkVersion VERSION_1_x
The constant for the EclipseLink 1.x release.
-
VERSION_2_0
public static final EclipseLinkVersion VERSION_2_0
The constant for the EclipseLink 2.0 release.
-
VERSION_2_1
public static final EclipseLinkVersion VERSION_2_1
The constant for the EclipseLink 2.1 release.
-
VERSION_2_2
public static final EclipseLinkVersion VERSION_2_2
The constant for the EclipseLink 2.2 release.
-
VERSION_2_3
public static final EclipseLinkVersion VERSION_2_3
The constant for the EclipseLink 2.3 release.
-
VERSION_2_4
public static final EclipseLinkVersion VERSION_2_4
The constant for the EclipseLink 2.4 release.
-
VERSION_2_5
public static final EclipseLinkVersion VERSION_2_5
The constant for the EclipseLink 2.5 release.
-
VERSION_2_6
public static final EclipseLinkVersion VERSION_2_6
The constant for the EclipseLink 2.6 release.
-
-
Method Detail
-
values
public static EclipseLinkVersion[] 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 (EclipseLinkVersion c : EclipseLinkVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EclipseLinkVersion valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
value
public static EclipseLinkVersion value(java.lang.String value)
Retrieves the enumeration constant for the given value. If the value is not known, thenDEFAULT_VERSION
will be returned.- Parameters:
value
- The value to retrieve its constant version- Returns:
- The constant version of the given value
-
versions
public static EclipseLinkVersion[] versions()
Returns the list ofEclipseLinkVersion
excludingDEFAULT_VERSION
.- Returns:
- The list of unique constants
-
getVersion
public java.lang.String getVersion()
Returns the real version this constant represents.- Returns:
- The string value of the version
-
isNewerThan
public boolean isNewerThan(EclipseLinkVersion version)
Determines whether this constant represents a version that is newer than the given version.- Parameters:
version
- The constant to verify if it's representing a version that is older than this one- Returns:
true
if this constant represents a newer version and the given constant represents a version that is older;false
if the given constant represents a newer and this constant represents an older version
-
isNewerThanOrEqual
public boolean isNewerThanOrEqual(EclipseLinkVersion version)
Determines whether this constant represents a version that is newer than the given version or if it's the same version.- Parameters:
version
- The constant to verify if it's representing a version that is older than this one or if it's the same than this one- Returns:
true
if this constant represents a newer version and the given constant represents a version that is older or if it's the same constant;false
if the given constant represents a newer and this constant represents an older version
-
isOlderThan
public boolean isOlderThan(EclipseLinkVersion version)
Determines whether this constant represents a version that is older than the given version.- Parameters:
version
- The constant to verify if it's representing a version that is more recent than this one- Returns:
true
if this constant represents an earlier version and the given constant represents a version that is more recent;false
if the given constant represents an earlier version and this constant represents a more recent version
-
isOlderThanOrEqual
public boolean isOlderThanOrEqual(EclipseLinkVersion version)
Determines whether this constant represents a version that is older than the given version or if it's the same version.- Parameters:
version
- The constant to verify if it's representing a version that is more recent than this one or if it's the same than this one- Returns:
true
if this constant represents an earlier version and the given constant represents a version that is more recent or if it's the same constant;false
if the given constant represents an earlier version and this constant represents a more recent version
-
toCurrentVersion
public EclipseLinkVersion toCurrentVersion()
Converts the current constant to one of the known versions, this means if the constant isDEFAULT_VERSION
, then it will be converted into the actual constant representing that version.- Returns:
- Either this same constant or the actual version constant
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<EclipseLinkVersion>
-
-