public final class HibernateHelper extends Object
Modifier | Constructor and Description |
---|---|
private |
HibernateHelper()
Private constructor
|
Modifier and Type | Method and Description |
---|---|
static org.hibernate.dialect.Dialect |
getDialect(org.hibernate.Session session) |
static String |
getSqlString(org.hibernate.Criteria criteria)
Get the SQL query string from Criteria.
|
static String |
getSqlString(org.hibernate.Query query,
org.hibernate.Session session)
Get the SQL query string from HQL Query.
|
static List<List<Long>> |
getValidSizedLists(Collection<Long> queryIds) |
static boolean |
isColumnSupported(Class<?> clazz,
String column)
Checks if the specified column is supported by this entity.
|
static boolean |
isEntitySupported(Class<?> clazz)
Checks if the specified entity is supported.
|
static boolean |
isNamedQuerySupported(String namedQuery,
org.hibernate.Session session)
Checks if the specified named query is supported.
|
static boolean |
supportsFunction(org.hibernate.dialect.Dialect dialect,
String function)
Check if the requested function is supported by the requested dialect
|
public static String getSqlString(org.hibernate.Criteria criteria)
criteria
- Criteria to get SQL query string frompublic static String getSqlString(org.hibernate.Query query, org.hibernate.Session session)
query
- HQL query to convert to SQLpublic static boolean isEntitySupported(Class<?> clazz)
clazz
- the classpublic static boolean isColumnSupported(Class<?> clazz, String column)
clazz
- the classcolumn
- the columnpublic static boolean isNamedQuerySupported(String namedQuery, org.hibernate.Session session)
namedQuery
- the named querysession
- Hibernate sessionpublic static org.hibernate.dialect.Dialect getDialect(org.hibernate.Session session)
public static List<List<Long>> getValidSizedLists(Collection<Long> queryIds)
public static boolean supportsFunction(org.hibernate.dialect.Dialect dialect, String function)
dialect
- Dialect to checkfunction
- Function to checktrue
, if function is supportedCopyright © 2012-2015 52north.org. All Rights Reserved.