public class HibernateUtil
extends java.lang.Object
| Constructor and Description |
|---|
HibernateUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <AT extends AttributeType> |
addAttributeCriteria(org.hibernate.Criteria criteria,
java.util.Map<AT,java.lang.String> serializedAttributeValues)
Adds attribute value criteria to the given criteria query
|
static java.lang.String |
escapeSqlWildcards(java.lang.String oldString,
java.sql.Connection connection)
Escapes all sql wildcards in the given string, returns the same string if it doesn't contain
any sql wildcards
|
static java.lang.String |
escapeSqlWildcards(java.lang.String oldString,
org.hibernate.SessionFactory sessionFactory) |
static org.hibernate.dialect.Dialect |
getDialect(org.hibernate.SessionFactory sessionFactory)
Fetch the current Dialect of the given SessionFactory
|
static <T> T |
getRealObjectFromProxy(T persistentObject)
Gets an object as an instance of its persistent type if it is a hibernate proxy otherwise
returns the same passed in object
|
static boolean |
isHSQLDialect(org.hibernate.SessionFactory sessionFactory)
Check and cache whether the currect dialect is HSQL or not.
|
public static boolean isHSQLDialect(org.hibernate.SessionFactory sessionFactory)
sessionFactory - public static org.hibernate.dialect.Dialect getDialect(org.hibernate.SessionFactory sessionFactory)
sessionFactory - SessionFactory to pull the dialect frompublic static java.lang.String escapeSqlWildcards(java.lang.String oldString,
org.hibernate.SessionFactory sessionFactory)
escapeSqlWildcards(String, Connection)public static java.lang.String escapeSqlWildcards(java.lang.String oldString,
java.sql.Connection connection)
oldString - the string in which to escape the sql wildcardsconnection - The underlying database connectionpublic static <AT extends AttributeType> void addAttributeCriteria(org.hibernate.Criteria criteria, java.util.Map<AT,java.lang.String> serializedAttributeValues)
AT - the attribute typecriteria - the criteriaserializedAttributeValues - the serialized attribute valuespublic static <T> T getRealObjectFromProxy(T persistentObject)
persistentObject - the object to unproxyCopyright © 2018 OpenMRS Inc.. All Rights Reserved.