org.apache.metamodel.query.Query.getWhereClause()方法的使用及代码示例

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

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

Query.getWhereClause介绍

暂无

代码示例

代码示例来源:origin: org.apache.metamodel/MetaModel-core

private void replaceParametersInWhereClause(Object[] values, final AtomicInteger parameterIndex,
    Query originalQuery, Query newQuery) {
  // creates a clone of the original query, but rebuilds a completely new
  // where clause based on parameter values
  final List<FilterItem> items = originalQuery.getWhereClause().getItems();
  int i = 0;
  for (FilterItem filterItem : items) {
    final FilterItem newFilter = copyFilterItem(filterItem, values, parameterIndex);
    if (filterItem != newFilter) {
      newQuery.getWhereClause().removeItem(i);
      newQuery.getWhereClause().addItem(i, newFilter);
    }
    i++;
  }
}

代码示例来源:origin: apache/metamodel

private void replaceParametersInWhereClause(Object[] values, final AtomicInteger parameterIndex,
    Query originalQuery, Query newQuery) {
  // creates a clone of the original query, but rebuilds a completely new
  // where clause based on parameter values
  final List<FilterItem> items = originalQuery.getWhereClause().getItems();
  int i = 0;
  for (FilterItem filterItem : items) {
    final FilterItem newFilter = copyFilterItem(filterItem, values, parameterIndex);
    if (filterItem != newFilter) {
      newQuery.getWhereClause().removeItem(i);
      newQuery.getWhereClause().addItem(i, newFilter);
    }
    i++;
  }
}

代码示例来源:origin: apache/metamodel

@Override
protected SatisfiedWhereBuilder<GroupedQueryBuilder> applyFilter(FilterItem filter) {
  if (_parentOrFilter == null) {
    _query.where(filter);
  } else {
    if (_parentOrFilter.getChildItemCount() == 1) {
      _query.getWhereClause().removeItem(_orFilters.get(0));
      _query.getWhereClause().addItem(_parentOrFilter);
    }
  }
  _orFilters.add(filter);
  return this;
}

代码示例来源:origin: org.apache.metamodel/MetaModel-core

@Override
protected SatisfiedWhereBuilder<GroupedQueryBuilder> applyFilter(FilterItem filter) {
  if (_parentOrFilter == null) {
    _query.where(filter);
  } else {
    if (_parentOrFilter.getChildItemCount() == 1) {
      _query.getWhereClause().removeItem(_orFilters.get(0));
      _query.getWhereClause().addItem(_parentOrFilter);
    }
  }
  _orFilters.add(filter);
  return this;
}

代码示例来源:origin: apache/metamodel

private void buildParameterListInWhereClause(List<QueryParameter> parameters, Query query) {
  List<FilterItem> items = query.getWhereClause().getItems();
  for (FilterItem item : items) {
    buildParameterFromFilterItem(parameters, item);
  }
}

代码示例来源:origin: org.apache.metamodel/MetaModel-core

private void buildParameterListInWhereClause(List<QueryParameter> parameters, Query query) {
  List<FilterItem> items = query.getWhereClause().getItems();
  for (FilterItem item : items) {
    buildParameterFromFilterItem(parameters, item);
  }
}

代码示例来源:origin: apache/metamodel

public String rewriteQuery(Query query) {
  query = beforeRewrite(query);
  final StringBuilder sb = new StringBuilder();
  sb.append(rewriteSelectClause(query, query.getSelectClause()));
  sb.append(rewriteFromClause(query, query.getFromClause()));
  sb.append(rewriteWhereClause(query, query.getWhereClause()));
  sb.append(rewriteGroupByClause(query, query.getGroupByClause()));
  sb.append(rewriteHavingClause(query, query.getHavingClause()));
  sb.append(rewriteOrderByClause(query, query.getOrderByClause()));
  return sb.toString();
}

代码示例来源:origin: org.apache.metamodel/MetaModel-jdbc

public String rewriteQuery(Query query) {
  query = beforeRewrite(query);
  final StringBuilder sb = new StringBuilder();
  sb.append(rewriteSelectClause(query, query.getSelectClause()));
  sb.append(rewriteFromClause(query, query.getFromClause()));
  sb.append(rewriteWhereClause(query, query.getWhereClause()));
  sb.append(rewriteGroupByClause(query, query.getGroupByClause()));
  sb.append(rewriteHavingClause(query, query.getHavingClause()));
  sb.append(rewriteOrderByClause(query, query.getOrderByClause()));
  return sb.toString();
}

代码示例来源:origin: org.apache.metamodel/MetaModel-salesforce

for (FilterItem filterItem : query.getWhereClause().getItems()) {
  if (firstWhere) {
    sb.append(" WHERE ");

代码示例来源:origin: apache/metamodel

for (FilterItem filterItem : query.getWhereClause().getItems()) {
  if (firstWhere) {
    sb.append(" WHERE ");

代码示例来源:origin: org.apache.metamodel/MetaModel-core

if (!getScalarFunctionSelectItems(query.getWhereClause().getEvaluatedSelectItems()).isEmpty()) {
  return true;

代码示例来源:origin: apache/metamodel

if (!getScalarFunctionSelectItems(query.getWhereClause().getEvaluatedSelectItems()).isEmpty()) {
  return true;

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo3

&& query.getOrderByClause().isEmpty()) {
final List<FilterItem> whereItems = query.getWhereClause().getItems();

代码示例来源:origin: org.apache.metamodel/MetaModel-mongodb-mongo2

&& query.getOrderByClause().isEmpty()) {
final List<FilterItem> whereItems = query.getWhereClause().getItems();

代码示例来源:origin: apache/metamodel

&& query.getOrderByClause().isEmpty()) {
final List<FilterItem> whereItems = query.getWhereClause().getItems();

代码示例来源:origin: apache/metamodel

&& query.getOrderByClause().isEmpty()) {
final List<FilterItem> whereItems = query.getWhereClause().getItems();

代码示例来源:origin: org.apache.metamodel/MetaModel-core

final List<SelectItem> selectItems = query.getSelectClause().getItems();
final List<FromItem> fromItems = query.getFromClause().getItems();
final List<FilterItem> whereItems = query.getWhereClause().getItems();
final List<SelectItem> whereSelectItems = query.getWhereClause().getEvaluatedSelectItems();
final List<GroupByItem> groupByItems = query.getGroupByClause().getItems();
final List<SelectItem> groupBySelectItems = query.getGroupByClause().getEvaluatedSelectItems();

代码示例来源:origin: apache/metamodel

final List<SelectItem> selectItems = query.getSelectClause().getItems();
final List<FromItem> fromItems = query.getFromClause().getItems();
final List<FilterItem> whereItems = query.getWhereClause().getItems();
final List<SelectItem> whereSelectItems = query.getWhereClause().getEvaluatedSelectItems();
final List<GroupByItem> groupByItems = query.getGroupByClause().getItems();
final List<SelectItem> groupBySelectItems = query.getGroupByClause().getEvaluatedSelectItems();

相关文章