public class GenericResultObjectProvider extends Object implements ResultObjectProvider
Result
.Constructor and Description |
---|
GenericResultObjectProvider(Class<?> pcClass,
JDBCStore store,
JDBCFetchConfiguration fetch,
Result res)
Constructor.
|
GenericResultObjectProvider(ClassMapping mapping,
JDBCStore store,
JDBCFetchConfiguration fetch,
Result res)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
absolute(int pos)
Move to the given 0-based position.
|
void |
close()
Free the resources associated with this provider.
|
Object |
getResultObject()
Instantiate the current result object.
|
void |
handleCheckedException(Exception e)
Any checked exceptions that are thrown will be passed to this method.
|
boolean |
next()
Advance the input to the next position.
|
void |
open()
Open the result.
|
void |
reset()
Reset this provider.
|
int |
size()
Return the number of items in the input, or
Integer.MAX_VALUE
if the size in unknown. |
boolean |
supportsRandomAccess()
Return true if this provider supports random access.
|
public GenericResultObjectProvider(Class<?> pcClass, JDBCStore store, JDBCFetchConfiguration fetch, Result res)
pcClass
- the base class of the result objectsstore
- the store manager to delegate loading tofetch
- the fetch configuration, or null for defaultres
- the result containing the datapublic GenericResultObjectProvider(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Result res)
mapping
- the mapping for the base class of the result objectsstore
- the store manager to delegate loading tofetch
- the fetch configuration, or null for defaultres
- the result containing the datapublic boolean supportsRandomAccess()
ResultObjectProvider
supportsRandomAccess
in interface ResultObjectProvider
public void open()
ResultObjectProvider
ResultObjectProvider.next()
, ResultObjectProvider.absolute(int)
, or ResultObjectProvider.size()
.open
in interface ResultObjectProvider
public Object getResultObject() throws SQLException
ResultObjectProvider
ResultObjectProvider.next()
or ResultObjectProvider.absolute(int)
.getResultObject
in interface ResultObjectProvider
SQLException
public boolean next() throws SQLException
ResultObjectProvider
true
if
there is more data; otherwise false
.next
in interface ResultObjectProvider
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
SQLException
public int size() throws SQLException
ResultObjectProvider
Integer.MAX_VALUE
if the size in unknown.size
in interface ResultObjectProvider
SQLException
public void reset()
ResultObjectProvider
reset
in interface ResultObjectProvider
public void close()
ResultObjectProvider
close
in interface ResultObjectProvider
close
in interface Closeable
public void handleCheckedException(Exception e)
ResultObjectProvider
handleCheckedException
in interface ResultObjectProvider
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.