protected OperationImpl(Class<? extends T> type, Operator operator, ImmutableList<Expression<?>> args) { super(type); Class<?> wrapped = Primitives.wrap(type); Preconditions.checkArgument(operator.getType().isAssignableFrom(wrapped), operator.name()); this.operator = operator; this.args = args; }
protected OperationImpl(Class<? extends T> type, Operator operator, ImmutableList<Expression<?>> args) { super(type); Class<?> wrapped = Primitives.wrap(type); Preconditions.checkArgument(operator.getType().isAssignableFrom(wrapped), operator.name()); this.operator = operator; this.args = args; }
public static SQLFunction createFunction(SQLTemplates templates, Operator operator) { Template template = templates.getTemplate(operator); Type type = HibernateUtil.getType(operator.getType()); return new SQLFunctionTemplate(type, convert(template)); }