org.grails.datastore.mapping.query.Query.list()方法的使用及代码示例

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

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

Query.list介绍

[英]Executes the query returning zero or many results as a list.
[中]执行以列表形式返回零个或多个结果的查询。

代码示例

代码示例来源:origin: org.grails/grails-datastore-gorm

protected Object invokeList() {
  Object result;
  result = query.list();
  return result;
}

代码示例来源:origin: org.grails/grails-datastore-gorm

protected Object invokeQuery(Query q) {
  return q.list();
}

代码示例来源:origin: org.grails/grails-datastore-gorm

protected Object invokeQuery(Query q) {
  return q.list();
}

代码示例来源:origin: org.grails/grails-datastore-gorm

public PagedResultList(Query query) {
  this.query = query;
  this.resultList = query == null ? Collections.<E>emptyList() : query.list();
}

代码示例来源:origin: org.grails/grails-datastore-gorm

/**
 * Defines and executes a list query in a single call. Example: Foo.createCriteria.list { }
 * @param callable The closure to execute
 *
 * @return The result list
 */
public List list(Closure callable) {
  ensureQueryIsInitialized();
  invokeClosureNode(callable);
  return query.list();
}

代码示例来源:origin: org.grails/grails-datastore-gorm

/**
 * Defines and executes a list distinct query in a single call. Example: Foo.createCriteria.listDistinct { }
 * @param callable The closure to execute
 *
 * @return The result list
 */
public List listDistinct(Closure callable) {
  ensureQueryIsInitialized();
  invokeClosureNode(callable);
  query.projections().distinct();
  return query.list();
}

代码示例来源:origin: org.grails/grails-datastore-core

@Override
public List query(Object primaryKey) {
  Association inverseSide = association.getInverseSide();
  Query query = session.createQuery(association.getAssociatedEntity().getJavaClass());
  query.eq(inverseSide.getName(), primaryKey);
  query.projections().id();
  return query.list();
}

相关文章