Enum Class HibernateVersion
- All Implemented Interfaces:
Serializable,Comparable<HibernateVersion>,Constable
The
HibernateVersion enum specifies all the supported
Hibernate ORM project versions.- Since:
- 1.0.0
- Author:
- Vlad Mihalcea
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic HibernateVersionGet the current Hibernate ORM version, as it was detected based on the classes found on the Java classpath.intGet the associated major and minor Hibernate ORM version.static booleanisCurrentVersionAtLeast(HibernateVersion hibernateVersion) Check if the current Hibernate version is greater than or equals to the provided version.abstract booleanmatches()Determines if the current Hibernate version matches the provided enum value.toString()static HibernateVersionReturns the enum constant of this class with the specified name.static HibernateVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ORM_60
-
ORM_62
-
ORM_63
-
ORM_66
-
ORM_70
-
ORM_71
-
ORM_72
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
matches
public abstract boolean matches()Determines if the current Hibernate version matches the provided enum value.- Returns:
- if the current Hibernate version matches the provided enum value
-
getMajorMinorVersion
public int getMajorMinorVersion()Get the associated major and minor Hibernate ORM version.- Returns:
- the associated major and minor Hibernate ORM version
-
getCurrentVersion
Get the current Hibernate ORM version, as it was detected based on the classes found on the Java classpath.- Returns:
- the current Hibernate ORM version
-
isCurrentVersionAtLeast
Check if the current Hibernate version is greater than or equals to the provided version.- Parameters:
hibernateVersion- Hibernate version to use as reference- Returns:
- the current Hibernate version is greater than or equals to the provided version
-
toString
- Overrides:
toStringin classEnum<HibernateVersion>
-