public enum IJPAVersion extends Enum<IJPAVersion>
Enum Constant and Description |
---|
DEFAULT_VERSION
The constant for the default version used by the parsing system, which is always the latest
version of the Java Persistence functional specification.
|
VERSION_1_0
The constant for the Java Persistence version 1.0.
|
VERSION_2_0
The constant for the Java Persistence version 2.0.
|
Modifier and Type | Method and Description |
---|---|
String |
getVersion()
Returns the real version this constant represents.
|
boolean |
isNewerThan(IJPAVersion version)
Determines whether this constant represents a version that is newer than the given version.
|
boolean |
isNewerThanOrEqual(IJPAVersion version)
Determines whether this constant represents a version that is newer than the given version or
if it's the same version.
|
boolean |
isOlderThan(IJPAVersion version)
Determines whether this constant represents a version that is older than the given version.
|
boolean |
isOlderThanOrEqual(IJPAVersion version)
Determines whether this constant represents a version that is older than the given version or
if it's the same version.
|
IJPAVersion |
toCurrentVersion()
Converts the current constant to one of the known versions, this means if the constant is
DEFAULT_VERSION , then it will be converted into the actual constant representing that
version. |
String |
toString() |
static IJPAVersion |
value(String value)
Retrieves the enumeration constant for the given value.
|
static IJPAVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static IJPAVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
static IJPAVersion[] |
versions()
Returns the list of
IJPAVersions excluding DEFAULT_VERSION . |
public static final IJPAVersion DEFAULT_VERSION
public static final IJPAVersion VERSION_1_0
public static final IJPAVersion VERSION_2_0
public static IJPAVersion[] values()
for (IJPAVersion c : IJPAVersion.values()) System.out.println(c);
public static IJPAVersion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static IJPAVersion value(String value)
DEFAULT_VERSION
will be returned.value
- The value to retrieve its constant versionpublic static IJPAVersion[] versions()
IJPAVersions
excluding DEFAULT_VERSION
.public String getVersion()
public boolean isNewerThan(IJPAVersion version)
version
- The constant to verify if it's representing a version that is older than this onetrue
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 versionpublic boolean isNewerThanOrEqual(IJPAVersion version)
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 onetrue
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 versionpublic boolean isOlderThan(IJPAVersion version)
jpaVersion
- The constant to verify if it's representing a version that is more recent
than this onetrue
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 versionpublic boolean isOlderThanOrEqual(IJPAVersion version)
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 onetrue
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
versionpublic IJPAVersion toCurrentVersion()
DEFAULT_VERSION
, then it will be converted into the actual constant representing that
version.public String toString()
toString
in class Enum<IJPAVersion>
EclipseLink 2.3.2, "build v20111125-r10461" API Reference