com.mysema.query.types.Expression.accept()方法的使用及代码示例

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

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

Expression.accept介绍

[英]Accept the visitor with the given context
[中]接受具有给定上下文的访问者

代码示例

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

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

代码示例来源: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-core

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

代码示例来源: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

private ImmutableList<Expression<?>> visit(List<Expression<?>> args) {
    ImmutableList.Builder<Expression<?>> builder = ImmutableList.builder();
    for (Expression<?> arg : args) {
      builder.add(arg.accept(this, null));
    }
    return builder.build();
  }
}

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

@Override
public Set<Expression<?>> visit(TemplateExpression<?> expr, Set<Expression<?>> known) {
  for (Object arg : expr.getArgs()) {
    if (arg instanceof Expression<?>) {
      known = ((Expression<?>)arg).accept(this, known);
    }
  }
  return known;
}

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

@Override
  public boolean apply(Bindings bindings) {
    return Objects.equal(
        expr.getArg(0).accept(QueryRDFVisitor.this, bindings),
        expr.getArg(1).accept(QueryRDFVisitor.this, bindings));
  }
};

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

@Override
public Set<Expression<?>> visit(FactoryExpression<?> expr, Set<Expression<?>> known) {
  for (Expression<?> arg : expr.getArgs()) {
    known = arg.accept(this, known);
  }
  return known;
}

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

@Override
public Set<RelationalPath<?>> visit(FactoryExpression<?> expr, Set<RelationalPath<?>> known) {
  for (Expression<?> arg : expr.getArgs()) {
    known = arg.accept(this, known);
  }
  return known;
}

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

@Override
public Void visit(TemplateExpression<?> expr, QueryMetadata context) {
  for (Object arg : expr.getArgs()) {
    if (arg instanceof Expression<?>) {
      ((Expression<?>)arg).accept(this, context);
    }
  }
  return null;
}

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

public final S handle(Object arg) {
  if (arg instanceof Expression) {
    ((Expression)arg).accept(this, null);
  } else {
    visitConstant(arg);
  }
  return self;
}

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

@Override
public Set<RelationalPath<?>> visit(Operation<?> expr, Set<RelationalPath<?>> known) {
  for (Expression<?> arg : expr.getArgs()) {
    known = arg.accept(this, known);
  }
  return known;
}

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

@Override
public Set<RelationalPath<?>> visit(TemplateExpression<?> expr, Set<RelationalPath<?>> known) {
  for (Object arg : expr.getArgs()) {
    if (arg instanceof Expression<?>) {
      known = ((Expression<?>)arg).accept(this, known);
    }
  }
  return known;
}

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

@Override
  public STMT apply(Bindings input) {
    return new STMT(
        (ID) expr.getSubject().accept(QueryRDFVisitor.this, input),
        (UID) expr.getPredicate().accept(QueryRDFVisitor.this, input),
        (NODE) expr.getObject().accept(QueryRDFVisitor.this, input),
        (UID) expr.getContext().accept(QueryRDFVisitor.this, input));
  }
};

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

@SuppressWarnings("unchecked")
private Predicate<Bindings> createOrPredicate(final Operation<?> expr, Bindings bindings) {
  return Predicates.or(
      (Predicate) expr.getArg(0).accept(this, bindings),
      (Predicate) expr.getArg(1).accept(this, bindings));
}

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

@Override
  public boolean apply(Bindings bindings) {
    NODE lhs = (NODE) expr.getArg(0).accept(QueryRDFVisitor.this, bindings);
    NODE rhs = (NODE) expr.getArg(1).accept(QueryRDFVisitor.this, bindings);
    if (lhs != null && rhs != null) {
      return lhs.getValue().equalsIgnoreCase(rhs.getValue());
    } else {
      return lhs == rhs;
    }
  }
};

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

public DBObject toSort(List<OrderSpecifier<?>> orderBys) {
  BasicDBObject sort = new BasicDBObject();
  for (OrderSpecifier<?> orderBy : orderBys) {
    Object key = orderBy.getTarget().accept(this, null);
    sort.append(key.toString(), orderBy.getOrder() == Order.ASC ? 1 : -1);
  }
  return sort;
}

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

private Set<Path<?>> getRootPaths(Collection<Expression<?>> exprs) {
  Set<Path<?>> paths = Sets.newHashSet();
  for (Expression<?> e : exprs) {
    Path<?> path = e.accept(PathExtractor.DEFAULT, null);
    if (path != null && !path.getMetadata().isRoot()) {
      paths.add(path.getMetadata().getRoot());
    }
  }
  return paths;
}

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

@Override
public Set<Expression<?>> visit(Operation<?> expr, Set<Expression<?>> known) {
  if (expr.getOperator() == Ops.ALIAS) {
    known = add(known, expr.getArg(1));
  }
  for (Expression<?> arg : expr.getArgs()) {
    known = arg.accept(this, known);
  }
  return known;
}

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

private Set<RelationalPath<?>> visitJoins(Iterable<JoinExpression> joins, Set<RelationalPath<?>> known) {
  for (JoinExpression j : joins) {
    known = j.getTarget().accept(this, known);
    if (j.getCondition() != null) {
      known = j.getCondition().accept(this, known);
    }
  }
  return known;
}

相关文章