本文整理了Java中com.avaje.ebean.Query.setAutofetch
方法的一些代码示例,展示了Query.setAutofetch
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setAutofetch
方法的具体详情如下:
包路径:com.avaje.ebean.Query
类名称:Query
方法名:setAutofetch
[英]Explicitly specify whether to use Autofetch for this query.
If you do not call this method on a query the "Implicit Autofetch mode" is used to determine if Autofetch should be used for a given query.
Autofetch can add additional fetch paths to the query and specify which properties are included for each path. If you have explicitly defined some fetch paths Autofetch will not remove.
[中]
代码示例来源:origin: com.typesafe.play/play-java-ebean
/**
* Explicitly specifies whether to use 'Autofetch' for this query.
*/
public Query<T> setAutofetch(boolean autofetch) {
return query().setAutofetch(autofetch);
}
代码示例来源:origin: org.avaje/ebean
/**
* We need to create and execute a query to get the foreign key values as
* the delete cascades to them (foreign keys).
*/
private Query<?> deleteRequiresQuery(BeanDescriptor<?> desc, BeanPropertyAssocOne<?>[] propImportDelete) {
Query<?> q = server.createQuery(desc.getBeanType());
StringBuilder sb = new StringBuilder(30);
for (int i = 0; i < propImportDelete.length; i++) {
sb.append(propImportDelete[i].getName()).append(",");
}
q.setAutofetch(false);
q.select(sb.toString());
return q;
}
代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server
/**
* We need to create and execute a query to get the foreign key values as
* the delete cascades to them (foreign keys).
*/
private Query<?> deleteRequiresQuery(BeanDescriptor<?> desc, BeanPropertyAssocOne<?>[] propImportDelete) {
Query<?> q = server.createQuery(desc.getBeanType());
StringBuilder sb = new StringBuilder(30);
for (int i = 0; i < propImportDelete.length; i++) {
sb.append(propImportDelete[i].getName()).append(",");
}
q.setAutofetch(false);
q.select(sb.toString());
return q;
}
内容来源于网络,如有侵权,请联系作者删除!