|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openjpa.jdbc.kernel.SelectResultObjectProvider
org.apache.openjpa.jdbc.kernel.PagingResultObjectProvider
public class PagingResultObjectProvider
Object provider implementation that fetches one page of results at a
a time as it scrolls. If the getPagedFields(org.apache.openjpa.jdbc.sql.Select, org.apache.openjpa.jdbc.meta.ClassMapping, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration, int, long)
method returns a
non-null bit set, this this provider is a good fit for your configuration.
The method tests the following conditions:
parallel
.join
. This provider will take care of performing
parallel
mode batch selects for each page it reads.
Constructor Summary | |
---|---|
PagingResultObjectProvider(SelectExecutor sel,
ClassMapping[] mappings,
JDBCStore store,
JDBCFetchConfiguration fetch,
BitSet[] paged,
long size)
Constructor. |
|
PagingResultObjectProvider(SelectExecutor sel,
ClassMapping mapping,
JDBCStore store,
JDBCFetchConfiguration fetch,
BitSet paged,
long size)
Constructor. |
Method Summary | |
---|---|
boolean |
absolute(int pos)
Move to the given 0-based position. |
static BitSet |
getPagedFields(Select sel,
ClassMapping mapping,
JDBCStore store,
JDBCFetchConfiguration fetch,
int eagerMode,
long size)
Return a bit set representing batch select fields that will be paged, or null if no fields need paging, which indicates that this provider should not be used. |
int |
getPageSize()
Return the page size in use. |
Object |
getResultObject()
Instantiate the current result object. |
boolean |
next()
Advance the input to the next position. |
void |
open()
Open the result. |
Methods inherited from class org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider |
---|
close, getFetchConfiguration, getResult, getSelect, getStore, handleCheckedException, reset, setSize, size, supportsRandomAccess |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PagingResultObjectProvider(SelectExecutor sel, ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, BitSet paged, long size)
sel
- the select to executemapping
- the mapping of the result objectsstore
- the store manager to delegate loading tofetch
- the fetch configuration, or null for defaultpaged
- the bit set returned from getPagedFields(org.apache.openjpa.jdbc.sql.Select, org.apache.openjpa.jdbc.meta.ClassMapping, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration, int, long)
size
- the known maximum size of the result, or
Long.MAX_VALUE
for no known limitpublic PagingResultObjectProvider(SelectExecutor sel, ClassMapping[] mappings, JDBCStore store, JDBCFetchConfiguration fetch, BitSet[] paged, long size)
sel
- the select to executemappings
- the mappings for the independent classes of the
result objectsstore
- the store manager to delegate loading tofetch
- the fetch configuration, or null for defaultpaged
- the bit sets returned from getPagedFields(org.apache.openjpa.jdbc.sql.Select, org.apache.openjpa.jdbc.meta.ClassMapping, org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration, int, long)
for each select in the possible unionsize
- the known maximum size of the result, or
Long.MAX_VALUE
for no known limitMethod Detail |
---|
public static BitSet getPagedFields(Select sel, ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, int eagerMode, long size)
PagingResultObjectProvider(org.apache.openjpa.jdbc.sql.SelectExecutor, org.apache.openjpa.jdbc.meta.ClassMapping[], org.apache.openjpa.jdbc.kernel.JDBCStore, org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration, java.util.BitSet[], long)
public int getPageSize()
public void open() throws SQLException
ResultObjectProvider
ResultObjectProvider.next()
, ResultObjectProvider.absolute(int)
, or ResultObjectProvider.size()
.
open
in interface ResultObjectProvider
open
in class SelectResultObjectProvider
SQLException
public boolean next() throws SQLException
ResultObjectProvider
true
if
there is more data; otherwise false
.
next
in interface ResultObjectProvider
next
in class SelectResultObjectProvider
SQLException
public boolean absolute(int pos) throws SQLException
ResultObjectProvider
true
if there is data at this position;
otherwise false
. This may be invoked in place of
ResultObjectProvider.next()
.
absolute
in interface ResultObjectProvider
absolute
in class SelectResultObjectProvider
SQLException
public Object getResultObject() throws SQLException
ResultObjectProvider
ResultObjectProvider.next()
or ResultObjectProvider.absolute(int)
.
SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This documentation is deprecated and will be removed in the next release of WebLogic Server.