Search in sources :

Example 1 with SQLFunctionRegistry

use of org.hibernate.dialect.function.SQLFunctionRegistry in project hibernate-orm by hibernate.

the class RowCountProjection method getFunction.

protected SQLFunction getFunction(CriteriaQuery criteriaQuery) {
    final SQLFunctionRegistry sqlFunctionRegistry = criteriaQuery.getFactory().getSqlFunctionRegistry();
    final SQLFunction function = sqlFunctionRegistry.findSQLFunction("count");
    if (function == null) {
        throw new HibernateException("Unable to locate count function mapping");
    }
    return function;
}
Also used : HibernateException(org.hibernate.HibernateException) SQLFunctionRegistry(org.hibernate.dialect.function.SQLFunctionRegistry) SQLFunction(org.hibernate.dialect.function.SQLFunction)

Aggregations

HibernateException (org.hibernate.HibernateException)1 SQLFunction (org.hibernate.dialect.function.SQLFunction)1 SQLFunctionRegistry (org.hibernate.dialect.function.SQLFunctionRegistry)1