io.ebean.Query.fetchLazy()方法的使用及代码示例

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

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

Query.fetchLazy介绍

[英]Fetch the path lazily (via batch lazy loading).

This is the same as:

fetch(path, new FetchConfig().lazy())

The reason for using fetchLazy() is to either:

  • Control/tune what is fetched as part of lazy loading
  • Make use of the L2 cache, build this part of the graph from L2 cache
    [中]延迟获取路径(通过批量延迟加载)。
    这与:
fetch(path, new FetchConfig().lazy())

使用fetchLazy()的原因是:
*控制/调整作为延迟加载的一部分获取的内容
*利用二级缓存,从二级缓存构建这部分图形

代码示例

代码示例来源:origin: org.actframework/act-ebean

@Override
public EbeanQuery<MODEL_TYPE> fetchLazy(String path, String fetchProperties) {
  q.fetchLazy(path, fetchProperties);
  qReadOnly.fetchLazy(path, fetchProperties);
  return this;
}

代码示例来源:origin: org.actframework/act-ebean

@Override
public EbeanQuery<MODEL_TYPE> fetchLazy(String path) {
  q.fetchLazy(path);
  qReadOnly.fetchLazy(path);
  return this;
}

代码示例来源:origin: org.actframework/act-ebean2

@Override
public EbeanQuery<MODEL_TYPE> fetchLazy(String path, String fetchProperties) {
  q.fetchLazy(path, fetchProperties);
  return this;
}

代码示例来源:origin: org.actframework/act-ebean2

@Override
public EbeanQuery<MODEL_TYPE> fetchLazy(String path) {
  q.fetchLazy(path);
  return this;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Use lazy loading for fetching this association.
 */
public R fetchLazy() {
 ((TQRootBean) _root).query().fetchLazy(_name);
 return _root;
}

代码示例来源:origin: io.ebean/ebean-querybean

/**
 * Eagerly fetch query this association fetching some of the properties.
 */
protected R fetchLazyProperties(TQProperty<?>... props) {
 ((TQRootBean) _root).query().fetchLazy(_name, properties(props));
 return _root;
}

相关文章

Query类方法