use of org.hibernate.query.sqm.function.SqmFunctionDescriptor in project hibernate-orm by hibernate.
the class SqmCriteriaNodeBuilder method function.
@Override
public <T> SqmFunction<T> function(String name, Class<T> type, Expression<?>[] args) {
SqmFunctionDescriptor functionTemplate = getFunctionDescriptor(name);
final BasicType<T> resultType = getTypeConfiguration().getBasicTypeForJavaType(type);
if (functionTemplate == null) {
functionTemplate = new NamedSqmFunctionDescriptor(name, true, null, StandardFunctionReturnTypeResolvers.invariant(resultType), null);
}
return functionTemplate.generateSqmExpression(expressionList(args), resultType, getQueryEngine(), getJpaMetamodel().getTypeConfiguration());
}
Aggregations