本文整理了Java中org.grails.datastore.mapping.query.Query.list
方法的一些代码示例,展示了Query.list
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.list
方法的具体详情如下:
包路径:org.grails.datastore.mapping.query.Query
类名称: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();
}
内容来源于网络,如有侵权,请联系作者删除!