org.hswebframework.ezorm.core.dsl.Query.getParam()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(112)

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

Query.getParam介绍

暂无

代码示例

代码示例来源:origin: hs-web/hsweb-framework

private QueryParamEntity get() {
    return query.getParam();
  }
}

代码示例来源:origin: hs-web/hsweb-framework

private QueryParamParser parse(Object obj) {
  if (obj instanceof Map) {
    ((Map) obj).forEach((k, v) -> {
      String key = String.valueOf(k);
      if ("pageIndex".equals(key)) {
        query.getParam().setPageIndex(StringUtils.toInt(v));
      }
      if ("pageSize".equals(key)) {
        query.getParam().setPageSize(StringUtils.toInt(v));
      }
      if (v != null) {
        if (v instanceof Entity || v instanceof Map) {
          List<Term> terms = new QueryParamParser().parse(v).get().getTerms();
          Term term = new Term();
          term.setType(key.equalsIgnoreCase("or") ? Term.Type.or : Term.Type.and);
          term.setTerms(terms);
          query.getParam().getTerms().add(term);
        } else {
          consumer.accept(String.valueOf(key), v);
        }
      }
    });
  } else {
    parse(FastBeanCopier.copy(obj, new LinkedHashMap<>()));
  }
  return this;
}

代码示例来源:origin: hs-web/hsweb-framework

return conditional.getParam().getTerms();

代码示例来源:origin: hs-web/hsweb-framework

public Stream<Relation> relationStream(Supplier<List<String>> supplier) {
  List<String> personIdList = supplier.get();
  QueryParamEntity queryParamEntity = query.end()
      .and()
      .nest()
      .in("relationFrom", personIdList)
      .or()
      .in("relationTo", personIdList)
      .end()
      .getParam();
  return serviceContext.getRelationInfoService().select(queryParamEntity).stream()
      .map(info -> {
        SimpleRelation relation = new SimpleRelation();
        relation.setTarget(info.getRelationTo());
        relation.setTargetObject(RelationTargetHolder.get(info.getRelationTypeTo(), info.getRelationTo()).orElse(null));
        relation.setRelation(info.getRelationId());
        if (personIdList.contains(info.getRelationFrom())) {
          relation.setDimension(info.getRelationTypeFrom());
          relation.setDirection(Relation.Direction.POSITIVE);
        } else {
          relation.setDimension(info.getRelationTypeTo());
          relation.setDirection(Relation.Direction.REVERSE);
        }
        return relation;
      });
}

代码示例来源:origin: org.hswebframework.web/hsweb-commons-dao-mybatis

private QueryParamEntity get() {
    return query.getParam();
  }
}

代码示例来源:origin: hs-web/hsweb-easy-orm

public Q getParam() {
  return proxy.getParam();
}

代码示例来源:origin: hs-web/hsweb-easy-orm

@Override
public NestConditionalFromBean<B, QueryFromBean<T, Q, B>> nest() {
  return new SimpleNestConditionalForBean<>(this, proxy.getParam().nest());
}

代码示例来源:origin: hs-web/hsweb-easy-orm

@Override
public NestConditionalFromBean<B, QueryFromBean<T, Q, B>> orNest() {
  return new SimpleNestConditionalForBean<>(this, proxy.getParam().orNest());
}

代码示例来源:origin: hs-web/hsweb-easy-orm

@Override
public NestConditionalFromBean<B, QueryFromBean<T, Q, B>> nest(String column) {
  return new SimpleNestConditionalForBean<>(this, proxy.getParam().nest(column, getValue(column)));
}

代码示例来源:origin: hs-web/hsweb-easy-orm

@Override
public NestConditionalFromBean<B, QueryFromBean<T, Q, B>> orNest(String column) {
  return new SimpleNestConditionalForBean<>(this, proxy.getParam().orNest(column, getValue(column)));
}

代码示例来源:origin: org.hswebframework.web/hsweb-commons-dao-mybatis

private QueryParamParser parse(Object obj) {
  if (obj instanceof Map) {
    ((Map) obj).forEach((k, v) -> {
      String key = String.valueOf(k);
      if ("pageIndex".equals(key)) {
        query.getParam().setPageIndex(StringUtils.toInt(v));
      }
      if ("pageSize".equals(key)) {
        query.getParam().setPageSize(StringUtils.toInt(v));
      }
      if (v != null) {
        if (v instanceof Entity || v instanceof Map) {
          List<Term> terms = new QueryParamParser().parse(v).get().getTerms();
          Term term = new Term();
          term.setType(key.equalsIgnoreCase("or") ? Term.Type.or : Term.Type.and);
          term.setTerms(terms);
          query.getParam().getTerms().add(term);
        } else {
          consumer.accept(String.valueOf(key), v);
        }
      }
    });
  } else {
    parse(FastBeanCopier.copy(obj, new LinkedHashMap<>()));
  }
  return this;
}

相关文章