public class HibernateVersionSupport extends java.lang.Object
Methods to deal with the differences in different Hibernate versions
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static Query |
createQuery(org.hibernate.Session session, java.lang.String query)Creates a query |
|
public static AbstractHibernateDatastore.FlushMode |
getFlushMode(org.hibernate.Session session)Get the native Hibernate FlushMode, adapting between Hibernate 5.0/5.1 and 5.2+. |
|
public static boolean |
isAtLeastVersion(java.lang.String required)Check the current hibernate version |
|
public static void |
setFlushMode(org.hibernate.Session session, AbstractHibernateDatastore.FlushMode flushMode)Set the native Hibernate FlushMode, adapting between Hibernate 5.0/5.1 and 5.2+. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Creates a query
session - The sessionquery - The queryGet the native Hibernate FlushMode, adapting between Hibernate 5.0/5.1 and 5.2+.
session - the Hibernate Session to get the flush mode fromnull)Check the current hibernate version
required - The required versionSet the native Hibernate FlushMode, adapting between Hibernate 5.0/5.1 and 5.2+.
session - the Hibernate Session to get the flush mode from