org.apache.openjpa.jdbc.kernel
Class SelectResultObjectProvider

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider
All Implemented Interfaces:
ResultObjectProvider, Closeable
Direct Known Subclasses:
InstanceResultObjectProvider, PagingResultObjectProvider, ProjectionResultObjectProvider

public abstract class SelectResultObjectProvider
extends Object
implements ResultObjectProvider

Abstract provider implementation wrapped around a Select.

Author:
Abe White

Field Summary
protected  Result _res
           
 
Constructor Summary
SelectResultObjectProvider(SelectExecutor sel, JDBCStore store, JDBCFetchConfiguration fetch)
          Constructor.
 
Method Summary
 boolean absolute(int pos)
           
 void close()
           
 JDBCFetchConfiguration getFetchConfiguration()
           
 Result getResult()
           
 SelectExecutor getSelect()
           
 JDBCStore getStore()
           
 void handleCheckedException(Exception e)
           
 boolean next()
           
 void open()
           
 void reset()
           
protected  void setSize(int size)
          Allow subclasses that know the size to set it; otherwise we calculate it internally.
 int size()
           
 boolean supportsRandomAccess()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.openjpa.lib.rop.ResultObjectProvider
getResultObject
 

Field Detail

_res

protected Result _res
Constructor Detail

SelectResultObjectProvider

public SelectResultObjectProvider(SelectExecutor sel,
                                  JDBCStore store,
                                  JDBCFetchConfiguration fetch)
Constructor.

Parameters:
sel - the select to execute
store - the store to delegate loading to
fetch - the fetch configuration, or null for the default
Method Detail

getSelect

public SelectExecutor getSelect()

getStore

public JDBCStore getStore()

getFetchConfiguration

public JDBCFetchConfiguration getFetchConfiguration()

getResult

public Result getResult()

supportsRandomAccess

public boolean supportsRandomAccess()
Specified by:
supportsRandomAccess in interface ResultObjectProvider

open

public void open()
          throws SQLException
Specified by:
open in interface ResultObjectProvider
Throws:
SQLException

next

public boolean next()
             throws SQLException
Specified by:
next in interface ResultObjectProvider
Throws:
SQLException

absolute

public boolean absolute(int pos)
                 throws SQLException
Specified by:
absolute in interface ResultObjectProvider
Throws:
SQLException

size

public int size()
         throws SQLException
Specified by:
size in interface ResultObjectProvider
Throws:
SQLException

setSize

protected void setSize(int size)
Allow subclasses that know the size to set it; otherwise we calculate it internally.


reset

public void reset()
           throws SQLException
Specified by:
reset in interface ResultObjectProvider
Throws:
SQLException

close

public void close()
Specified by:
close in interface ResultObjectProvider
Specified by:
close in interface Closeable

handleCheckedException

public void handleCheckedException(Exception e)
Specified by:
handleCheckedException in interface ResultObjectProvider


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.