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

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

本文整理了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

  1. /** Builds MongoDB query based on the given {@code query}. */
  2. public DBObject buildMongoQuery(Query<?> query) {
  3. Predicate predicate = query.getPredicate();
  4. List<DBObject> mongoChildren = new ArrayList<DBObject>();
  5. if (predicate != null) {
  6. mongoChildren.add(buildMongoPredicate(query, predicate));
  7. }
  8. if (!query.isFromAll()) {
  9. Set<ObjectType> types = getEnvironment().getTypesByGroup(query.getGroup());
  10. List<String> typeIds = new ArrayList<String>();
  11. for (ObjectType type : types) {
  12. typeIds.add(type.getId().toString());
  13. }
  14. mongoChildren.add(new BasicDBObject(
  15. TYPE_ID_KEY, new BasicDBObject("$in", typeIds)));
  16. }
  17. return new BasicDBObject("$and", mongoChildren);
  18. }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

相关文章