本文整理了Java中org.apache.metamodel.query.Query.where
方法的一些代码示例,展示了Query.where
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.where
方法的具体详情如下:
包路径:org.apache.metamodel.query.Query
类名称:Query
方法名:where
暂无
代码示例来源:origin: org.apache.metamodel/MetaModel-core
@Override
public SatisfiedQueryBuilder<GroupedQueryBuilder> where(Iterable<FilterItem> filters) {
_query.where(filters);
return this;
}
代码示例来源:origin: apache/metamodel
@Override
public void parse(String delim, String itemToken) {
_query.where(itemToken);
}
}
代码示例来源:origin: apache/metamodel
@Override
public SatisfiedQueryBuilder<GroupedQueryBuilder> where(Iterable<FilterItem> filters) {
_query.where(filters);
return this;
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
@Override
public SatisfiedQueryBuilder<GroupedQueryBuilder> where(FilterItem... filters) {
_query.where(filters);
return this;
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
@Override
public void parse(String delim, String itemToken) {
_query.where(itemToken);
}
}
代码示例来源:origin: apache/metamodel
@Override
public SatisfiedQueryBuilder<GroupedQueryBuilder> where(FilterItem... filters) {
_query.where(filters);
return this;
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public Query where(String... whereItemTokens) {
for (String whereItemToken : whereItemTokens) {
FilterItem filterItem = findFilterItem(whereItemToken);
where(filterItem);
}
return this;
}
代码示例来源:origin: apache/metamodel
public Query where(String... whereItemTokens) {
for (String whereItemToken : whereItemTokens) {
FilterItem filterItem = findFilterItem(whereItemToken);
where(filterItem);
}
return this;
}
代码示例来源:origin: datacleaner/DataCleaner
private Query higherQuery(final Query query, final SelectItem selectItem) {
query.where(selectItem, OperatorType.GREATER_THAN, getHighestValue());
return query;
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public Query where(SelectItem selectItem, OperatorType operatorType, Object operand) {
return where(new FilterItem(selectItem, operatorType, operand));
}
代码示例来源:origin: apache/metamodel
public Query where(SelectItem selectItem, OperatorType operatorType, Object operand) {
return where(new FilterItem(selectItem, operatorType, operand));
}
代码示例来源:origin: apache/metamodel
public Query where(Column column, OperatorType operatorType, Object operand) {
SelectItem selectItem = _selectClause.getSelectItem(column);
if (selectItem == null) {
selectItem = new SelectItem(column);
}
return where(selectItem, operatorType, operand);
}
代码示例来源:origin: org.apache.metamodel/MetaModel-core
public Query where(Column column, OperatorType operatorType, Object operand) {
SelectItem selectItem = _selectClause.getSelectItem(column);
if (selectItem == null) {
selectItem = new SelectItem(column);
}
return where(selectItem, operatorType, operand);
}
代码示例来源:origin: datacleaner/DataCleaner
@Override
public Query optimizeQuery(final Query q, final ValidationCategory category) {
assert category == ValidationCategory.VALID;
if (_lastModifiedThresholdMillis != -1L) {
final Column column = lastModifiedColumn.getPhysicalColumn();
if (column.getType().isTimeBased()) {
q.where(column, OperatorType.GREATER_THAN, createQueryOperand());
} else {
q.where(column, OperatorType.GREATER_THAN, _lastModifiedThresholdMillis);
}
}
return q;
}
代码示例来源: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
@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: datacleaner/DataCleaner
private Query lowerQuery(final Query query, final SelectItem selectItem) {
// special case, null is also considered "lower"
final FilterItem isNullFilter = new FilterItem(selectItem, OperatorType.EQUALS_TO, null);
final FilterItem isLowerThanFilter = new FilterItem(selectItem, OperatorType.LESS_THAN, getLowestValue());
query.where(new FilterItem(isNullFilter, isLowerThanFilter));
return query;
}
}
代码示例来源:origin: datacleaner/DataCleaner
@Override
public Query optimizeQuery(final Query q, final Category category) {
if (category == Category.TRUE) {
final Column inputPhysicalColumn = inputColumn.getPhysicalColumn();
final Object operand;
if (compareColumn != null) {
final Column physicalCompareColumn = compareColumn.getPhysicalColumn();
operand = new SelectItem(physicalCompareColumn);
} else {
operand = toOperand(compareValue);
}
q.where(inputPhysicalColumn, operator.getOperatorType(), operand);
return q;
}
throw new UnsupportedOperationException();
}
}
代码示例来源:origin: org.eobjects.analyzerbeans/AnalyzerBeans-core
private void compileLookupQuery() {
try {
final Column[] queryOutputColumns = getQueryOutputColumns(false);
final Column queryOutputColumn = queryOutputColumns[0];
final Table table = queryOutputColumn.getTable();
Query query = new Query().from(table).select(queryOutputColumns);
if (!isCarthesianProductMode()) {
final Column[] queryConditionColumns = getQueryConditionColumns();
for (int i = 0; i < queryConditionColumns.length; i++) {
query = query.where(queryConditionColumns[i], OperatorType.EQUALS_TO, new QueryParameter());
}
}
if (joinSemantic == JoinSemantic.LEFT_JOIN_MAX_ONE) {
query = query.setMaxRows(1);
}
lookupQuery = datastoreConnection.getDataContext().compileQuery(query);
} catch (RuntimeException e) {
logger.error("Error occurred while compiling lookup query", e);
throw e;
}
}
代码示例来源:origin: datacleaner/DataCleaner
private void compileLookupQuery() {
try {
final Column[] queryOutputColumns = getQueryOutputColumns(false);
final Column queryOutputColumn = queryOutputColumns[0];
final Table table = queryOutputColumn.getTable();
Query query = new Query().from(table).select(queryOutputColumns);
if (!isCarthesianProductMode()) {
final Column[] queryConditionColumns = getQueryConditionColumns();
for (int i = 0; i < queryConditionColumns.length; i++) {
query = query.where(queryConditionColumns[i], OperatorType.EQUALS_TO, new QueryParameter());
}
}
if (joinSemantic == JoinSemantic.LEFT_JOIN_MAX_ONE) {
query = query.setMaxRows(1);
}
lookupQuery = datastoreConnection.getDataContext().compileQuery(query);
} catch (final RuntimeException e) {
logger.error("Error occurred while compiling lookup query", e);
throw e;
}
}
内容来源于网络,如有侵权,请联系作者删除!