com.mysema.query.types.Expression类的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中com.mysema.query.types.Expression类的一些代码示例,展示了Expression类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Expression类的具体详情如下:
包路径:com.mysema.query.types.Expression
类名称:Expression

Expression介绍

[英]Expression defines a general typed expression in a Query instance. The generic type parameter is a reference to the type the expression is bound to.

The central Expression subinterfaces are

  • Constant - for constants such as Strings, numbers and entity instances
  • FactoryExpression - for row based result processing
  • Operation - for common supported operations and function calls
  • ParamExpression - for bindable query parameters
  • Path - for variables, properties and collection member access
  • SubQueryExpression - for subqueries
  • TemplateExpression - for custom syntax
    [中]表达式在查询实例中定义常规类型表达式。泛型类型参数是对表达式绑定到的类型的引用。
    中心表达式子接口是
    *常量-用于字符串、数字和实体实例等常量
    *FactoryExpression-用于基于行的结果处理
    *操作-用于常见支持的操作和函数调用
    *ParameterExpression-用于可绑定查询参数
    *路径-用于变量、属性和集合成员访问
    *SubQueryExpression-用于子查询
    *TemplateExpression-用于自定义语法

代码示例

代码示例来源:origin: com.mysema.rdf/rdfbean-core

private void handle(List<?> args) {
  for (Object arg : args) {
    if (arg instanceof Expression) {
      ((Expression) arg).accept(this, null);
    }
  }
}

代码示例来源:origin: com.mysema.querydsl/querydsl-sql

@Override
  public RT produceNext(ResultSet rs) throws Exception {
    return get(rs, expr, 1, expr.getType());
  }
};

代码示例来源:origin: com.mysema.querydsl/querydsl-core

@SuppressWarnings("unchecked")
public GMax(Expression<T> expr) {
  super((Class)expr.getType(), expr);
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

private void visit(Expression<?> expr, QueryMetadata context) {
  if (expr != null) {
    expr.accept(this, context);
  }
}

代码示例来源:origin: arnaudroger/SimpleFlatMapper

@Override
public Type getType(Type targetType) {
  return expression.getType();
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

private void visit(List<Expression<?>> exprs, QueryMetadata context) {
  for (Expression<?> arg : exprs) {
    arg.accept(this, context);
  }
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

@Override
public final Class<? extends T> getType() {
  return mixin.getType();
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

public final S handle(Expression<?> expr) {
  expr.accept(this, null);
  return self;
}

代码示例来源:origin: com.mysema.querydsl/querydsl-sql

public WindowFunction(Expression<A> expr) {
  super(expr.getType());
  this.target = expr;
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

private void validate(Expression<?> expr) {
  if (extractParams) {
    expr.accept(ParamsVisitor.DEFAULT, this);
  }
  if (validate) {
    exprInJoins = expr.accept(validatingVisitor, exprInJoins);
  }
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

@SuppressWarnings("unchecked")
public GMin(Expression<T> expr) {
  super((Class) expr.getType(), expr);
}

代码示例来源:origin: com.mysema.rdf/rdfbean-core

private void handle(@Nullable Expression<?> e) {
  if (e != null) {
    e.accept(this, null);
  }
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

@SuppressWarnings("unchecked")
public GOne(Expression<T> expr) {
  super((Class)expr.getType(), expr);
}

代码示例来源:origin: com.mysema.rdf/rdfbean-sesame

@Nullable
private ValueExpr toValue(Expression<?> expr, QueryMetadata md) {
  return (ValueExpr)expr.accept(this, md);
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

protected void typeMismatch(Class<?> type, Expression<?> expr) {
  final String msg = expr.getType().getName() + " is not compatible with " + type.getName();
  throw new IllegalArgumentException(msg);
}

代码示例来源:origin: com.mysema.rdf/rdfbean-core

@Nullable
private Expression<?> transform(Expression<?> expr, Filters filters) {
  return (Expression<?>) expr.accept(this, filters);
}

代码示例来源:origin: com.mysema.querydsl/querydsl-core

private <T extends Comparable> Cases<T, DateExpression<T>> thenDate(Expression<T> expr) {
  return new Cases<T, DateExpression<T>>((Class)expr.getType()) {
    @Override
    protected DateExpression<T> createResult(Class<T> type, Expression<T> last) {
      return DateOperation.create(type, Ops.CASE, last);
    }
  }.addCase(when, expr);
}

代码示例来源:origin: com.mysema.rdf/rdfbean-sesame2

@Nullable
private ValueExpr toValue(Expression<?> expr, QueryMetadata md) {
  return (ValueExpr) expr.accept(this, md);
}

代码示例来源:origin: com.mysema.querydsl/querydsl-sql

/**
 * @param measureExpr
 * @param n
 * @return
 */
public static <T> WindowOver<T> nthValue(Expression<T> measureExpr, Expression<? extends Number> n) {
  return new WindowOver<T>((Class<T>)measureExpr.getType(), SQLOps.NTHVALUE, measureExpr, n);
}

代码示例来源:origin: com.mysema.querydsl/querydsl-sql

public static Set<RelationalPath<?>> extract(Expression<?> expr) {
  return expr.accept(DEFAULT, ImmutableSet.<RelationalPath<?>>of());
}

相关文章