public enum HibernateVersion extends Enum<HibernateVersion>
HibernateVersion enum specifies all the supported
Hibernate ORM project versions.| Enum Constant and Description |
|---|
ORM_33 |
ORM_35 |
ORM_36 |
ORM_41 |
ORM_42 |
ORM_43 |
ORM_50 |
ORM_51 |
ORM_52 |
ORM_53 |
ORM_54 |
ORM_55 |
ORM_56 |
| Modifier and Type | Method and Description |
|---|---|
static HibernateVersion |
getCurrentVersion()
Get the current Hibernate ORM version, as it was detected based on the
classes found on the Java classpath.
|
int |
getMajorMinorVersion()
Get the associated major and minor Hibernate ORM version.
|
static boolean |
isCurrentVersionAtLeast(HibernateVersion hibernateVersion)
Check if the current Hibernate version is greater than or equals to the provided version.
|
abstract boolean |
matches()
Determines if the current Hibernate version matches the provided enum value.
|
String |
toString() |
static HibernateVersion |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HibernateVersion[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HibernateVersion ORM_33
public static final HibernateVersion ORM_35
public static final HibernateVersion ORM_36
public static final HibernateVersion ORM_41
public static final HibernateVersion ORM_42
public static final HibernateVersion ORM_43
public static final HibernateVersion ORM_50
public static final HibernateVersion ORM_51
public static final HibernateVersion ORM_52
public static final HibernateVersion ORM_53
public static final HibernateVersion ORM_54
public static final HibernateVersion ORM_55
public static final HibernateVersion ORM_56
public static HibernateVersion[] values()
for (HibernateVersion c : HibernateVersion.values()) System.out.println(c);
public static HibernateVersion 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 abstract boolean matches()
public int getMajorMinorVersion()
public static HibernateVersion getCurrentVersion()
public static boolean isCurrentVersionAtLeast(HibernateVersion hibernateVersion)
hibernateVersion - Hibernate version to use as referencepublic String toString()
toString in class Enum<HibernateVersion>Copyright © 2026. All rights reserved.