org.apache.openjpa.lib.rop.WindowResultList.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(76)

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

WindowResultList.<init>介绍

暂无

代码示例

代码示例来源:origin: org.apache.openejb.patch/openjpa

public ResultList<?> newResultList(ResultObjectProvider rop) {
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  if (_state.fetchBatchSize < 0)
    return new EagerResultList(rop);
  if (rop.supportsRandomAccess())
    return new SimpleResultList(rop);
  return new WindowResultList(rop);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

public ResultList<?> newResultList(ResultObjectProvider rop) {
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  if (_state.fetchBatchSize < 0)
    return new EagerResultList(rop);
  if (rop.supportsRandomAccess())
    return new SimpleResultList(rop);
  return new WindowResultList(rop);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-kernel

public ResultList<?> newResultList(ResultObjectProvider rop) {
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  if (_state.fetchBatchSize < 0)
    return new EagerResultList(rop);
  if (rop.supportsRandomAccess())
    return new SimpleResultList(rop);
  return new WindowResultList(rop);
}

代码示例来源:origin: org.apache.openjpa/openjpa-kernel

public ResultList<?> newResultList(ResultObjectProvider rop) {
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  if (_state.fetchBatchSize < 0)
    return new EagerResultList(rop);
  if (rop.supportsRandomAccess())
    return new SimpleResultList(rop);
  return new WindowResultList(rop);
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

public ResultList newResultList(ResultObjectProvider rop) {
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  if (_state.fetchBatchSize < 0)
    return new EagerResultList(rop);
  if (rop.supportsRandomAccess())
    return new SimpleResultList(rop);
  return new WindowResultList(rop);
}

代码示例来源:origin: org.apache.openjpa/openjpa-all

public ResultList<?> newResultList(ResultObjectProvider rop) {
  // if built around a list, just use a simple wrapper
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  // if built around a paging list, use a window provider with the
  // same window size
  if (rop instanceof PagingResultObjectProvider)
    return new WindowResultList(rop, ((PagingResultObjectProvider)
      rop).getPageSize());
  // if fetch size < 0 just read in all results immediately
  if (getFetchBatchSize() < 0)
    return new EagerResultList(rop);
  // if foward only or forward direction use a forward window
  if (_state.type == ResultSet.TYPE_FORWARD_ONLY
    || _state.direction == ResultSet.FETCH_FORWARD
    || !rop.supportsRandomAccess()) {
    if (getFetchBatchSize() > 0 && getFetchBatchSize() <= 50)
      return new WindowResultList(rop, getFetchBatchSize());
    return new WindowResultList(rop, 50);
  }
  // if skipping around use a caching random access list
  if (_state.direction == ResultSet.FETCH_UNKNOWN)
    return new SoftRandomAccessResultList(rop);
  // scrolling reverse... just use non-caching simple result list
  return new SimpleResultList(rop);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

public ResultList<?> newResultList(ResultObjectProvider rop) {
  // if built around a list, just use a simple wrapper
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  // if built around a paging list, use a window provider with the
  // same window size
  if (rop instanceof PagingResultObjectProvider)
    return new WindowResultList(rop, ((PagingResultObjectProvider)
      rop).getPageSize());
  // if fetch size < 0 just read in all results immediately
  if (getFetchBatchSize() < 0)
    return new EagerResultList(rop);
  // if foward only or forward direction use a forward window
  if (_state.type == ResultSet.TYPE_FORWARD_ONLY
    || _state.direction == ResultSet.FETCH_FORWARD
    || !rop.supportsRandomAccess()) {
    if (getFetchBatchSize() > 0 && getFetchBatchSize() <= 50)
      return new WindowResultList(rop, getFetchBatchSize());
    return new WindowResultList(rop, 50);
  }
  // if skipping around use a caching random access list
  if (_state.direction == ResultSet.FETCH_UNKNOWN)
    return new SoftRandomAccessResultList(rop);
  // scrolling reverse... just use non-caching simple result list
  return new SimpleResultList(rop);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa-jdbc

public ResultList<?> newResultList(ResultObjectProvider rop) {
  // if built around a list, just use a simple wrapper
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  // if built around a paging list, use a window provider with the
  // same window size
  if (rop instanceof PagingResultObjectProvider)
    return new WindowResultList(rop, ((PagingResultObjectProvider)
      rop).getPageSize());
  // if fetch size < 0 just read in all results immediately
  if (getFetchBatchSize() < 0)
    return new EagerResultList(rop);
  // if foward only or forward direction use a forward window
  if (_state.type == ResultSet.TYPE_FORWARD_ONLY
    || _state.direction == ResultSet.FETCH_FORWARD
    || !rop.supportsRandomAccess()) {
    if (getFetchBatchSize() > 0 && getFetchBatchSize() <= 50)
      return new WindowResultList(rop, getFetchBatchSize());
    return new WindowResultList(rop, 50);
  }
  // if skipping around use a caching random access list
  if (_state.direction == ResultSet.FETCH_UNKNOWN)
    return new SoftRandomAccessResultList(rop);
  // scrolling reverse... just use non-caching simple result list
  return new SimpleResultList(rop);
}

代码示例来源:origin: org.apache.openjpa/openjpa-jdbc

public ResultList<?> newResultList(ResultObjectProvider rop) {
  // if built around a list, just use a simple wrapper
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  // if built around a paging list, use a window provider with the
  // same window size
  if (rop instanceof PagingResultObjectProvider)
    return new WindowResultList(rop, ((PagingResultObjectProvider)
      rop).getPageSize());
  // if fetch size < 0 just read in all results immediately
  if (getFetchBatchSize() < 0)
    return new EagerResultList(rop);
  // if foward only or forward direction use a forward window
  if (_state.type == ResultSet.TYPE_FORWARD_ONLY
    || _state.direction == ResultSet.FETCH_FORWARD
    || !rop.supportsRandomAccess()) {
    if (getFetchBatchSize() > 0 && getFetchBatchSize() <= 50)
      return new WindowResultList(rop, getFetchBatchSize());
    return new WindowResultList(rop, 50);
  }
  // if skipping around use a caching random access list
  if (_state.direction == ResultSet.FETCH_UNKNOWN)
    return new SoftRandomAccessResultList(rop);
  // scrolling reverse... just use non-caching simple result list
  return new SimpleResultList(rop);
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

public ResultList newResultList(ResultObjectProvider rop) {
  // if built around a list, just use a simple wrapper
  if (rop instanceof ListResultObjectProvider)
    return new SimpleResultList(rop);
  // if built around a paging list, use a window provider with the
  // same window size
  if (rop instanceof PagingResultObjectProvider)
    return new WindowResultList(rop, ((PagingResultObjectProvider)
      rop).getPageSize());
  // if fetch size < 0 just read in all results immediately
  if (getFetchBatchSize() < 0)
    return new EagerResultList(rop);
  // if foward only or forward direction use a forward window
  if (_state.type == ResultSet.TYPE_FORWARD_ONLY
    || _state.direction == ResultSet.FETCH_FORWARD
    || !rop.supportsRandomAccess()) {
    if (getFetchBatchSize() > 0 && getFetchBatchSize() <= 50)
      return new WindowResultList(rop, getFetchBatchSize());
    return new WindowResultList(rop, 50);
  }
  // if skipping around use a caching random access list
  if (_state.direction == ResultSet.FETCH_UNKNOWN)
    return new SoftRandomAccessResultList(rop);
  // scrolling reverse... just use non-caching simple result list
  return new SimpleResultList(rop);
}

相关文章