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