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

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

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

Query.fromGroup介绍

[英]Queries over objects of types that belong to the given ObjectType#getGroups.
[中]查询属于给定ObjectType#getGroups的类型的对象。

代码示例

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

Query<?> query = Query.fromGroup(group.replace('_', '.'));
if (!ObjectUtils.isBlank(id)) {
  query.and("_id = ?", id);

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

/**
 * Creates a query that can return all objects that reference this
 * index.
 */
public Query<Object> createItemsQuery() {
  Query<Object> query;
  String declaringClass = getJavaDeclaringClassName();
  if (ObjectUtils.isBlank(declaringClass)) {
    query = Query.fromGroup(declaringClass);
  } else {
    ObjectStruct parent = getParent();
    if (parent instanceof ObjectType) {
      query = Query.fromType((ObjectType) parent);
    } else {
      query = Query.fromAll();
    }
  }
  query.resolveToReferenceOnly();
  query.fields(getField());
  return query;
}

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

query = isAllSearchable ? Query.fromGroup(Content.SEARCHABLE_GROUP) : Query.fromAll();

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

UUID id = page.param(UUID.class, "id");
Query<Object> query = Query
    .fromGroup(Content.SEARCHABLE_GROUP)
    .and("* matches ?", id)
    .and("_type != ?", Draft.class)

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

Query<Object> query = (type != null
    ? Query.fromType(type)
    : Query.fromGroup(Content.SEARCHABLE_GROUP))
    .where(predicate);

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

Query<?> contentQuery = (itemType != null && !visibilities.contains("d")
    ? Query.fromType(itemType)
    : Query.fromGroup(Content.SEARCHABLE_GROUP))
    .where(page.siteItemsSearchPredicate())
    .and(Content.UPDATE_DATE_FIELD + " != missing")

相关文章