com.psddev.dari.db.Query.isFromAll()方法的使用及代码示例

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

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

Query.isFromAll介绍

[英]Returns true if this queries over all objects.
[中]如果查询所有对象,则返回true。

代码示例

代码示例来源:origin: perfectsense/dari

/** Builds MongoDB query based on the given {@code query}. */
public DBObject buildMongoQuery(Query<?> query) {
  Predicate predicate = query.getPredicate();
  List<DBObject> mongoChildren = new ArrayList<DBObject>();
  if (predicate != null) {
    mongoChildren.add(buildMongoPredicate(query, predicate));
  }
  if (!query.isFromAll()) {
    Set<ObjectType> types = getEnvironment().getTypesByGroup(query.getGroup());
    List<String> typeIds = new ArrayList<String>();
    for (ObjectType type : types) {
      typeIds.add(type.getId().toString());
    }
    mongoChildren.add(new BasicDBObject(
        TYPE_ID_KEY, new BasicDBObject("$in", typeIds)));
  }
  return new BasicDBObject("$and", mongoChildren);
}

代码示例来源:origin: perfectsense/dari

codeBuilder.append("Query");
if (isFromAll()) {
  codeBuilder.append(".fromAll()");

代码示例来源:origin: perfectsense/dari

codeBuilder.append("Query");
if (query.isFromAll()) {
  codeBuilder.append(".fromAll()");

代码示例来源:origin: perfectsense/dari

if (isFromAll()) {
  fieldTypes = Collections.emptySet();

代码示例来源:origin: perfectsense/dari

if (!query.isFromAll()) {
  Set<UUID> typeIds = query.getConcreteTypeIds(database);
  whereBuilder.append("\nAND ");

代码示例来源:origin: perfectsense/dari

if (!query.isFromAll()) {
  Set<ObjectType> types = query.getConcreteTypes(getEnvironment());

代码示例来源:origin: perfectsense/dari

protected Table<?> initialize(Table<?> table) {
  whereCondition = query.isFromAll()
      ? DSL.trueCondition()
      : recordTypeIdField.in(query.getConcreteTypeIds(database));

代码示例来源:origin: perfectsense/brightspot-cms

if (query.isFromAll() && !validTypeIds.isEmpty()) {
  query.and("_type = ?", validTypeIds);

相关文章