org.datanucleus.store.query.Query.useResultsCaching()方法的使用及代码示例

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

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

Query.useResultsCaching介绍

暂无

代码示例

代码示例来源:origin: org.datanucleus/datanucleus-rdbms

/**
 * Constructor of the result from a Query.
 * @param query The Query
 * @param rof The factory to retrieve results from
 * @param rs The ResultSet from the Query Statement
 * @param candidates Candidate elements
 */
public ForwardQueryResult(Query query, ResultObjectFactory<E> rof, ResultSet rs, Collection candidates)
{
  super(query, rof, rs);
  if (query.useResultsCaching())
  {
    resultIds = new ArrayList();
  }
  if (candidates != null)
  {
    this.candidates = new ArrayList(candidates);
  }
}

代码示例来源:origin: com.google.appengine.orm/datanucleus-appengine

/**
 * Constructs a StreamingQueryResult.
 * @param query The query which yields the results.
 * @param lazyEntities The result of the query.
 * @param entityToPojoFunc A function that can convert a {@link Entity} into a pojo.
 * @param endCursor Provides a cursor that points to the end of the result set. Can be null.
 */
public StreamingQueryResult(Query query, Iterable<Entity> lazyEntities,
  Function<Entity, Object> entityToPojoFunc, Cursor endCursor) {
 super(query);
 if (lazyEntities instanceof RuntimeExceptionWrappingIterable) {
  this.inputIterable = (RuntimeExceptionWrappingIterable) lazyEntities;
 }
 this.lazyResult = new LazyResult<Object>(lazyEntities, entityToPojoFunc, query.useResultsCaching());
 this.endCursor = endCursor;
}

代码示例来源:origin: com.google.appengine.orm/datanucleus-appengine

/**
 * Method to cache the results (List of the Entity keys) if it has been requested. 
 */
protected void cacheQueryResults() {
 if (query != null && query.useResultsCaching()) {
  lazyResult.resolveAll();
  query.getQueryManager().addDatastoreQueryResult(query, query.getInputParameters(), lazyResult.getEntityKeys());
 }
}

代码示例来源:origin: org.datanucleus/datanucleus-rdbms

if (query.useResultsCaching())

相关文章