org.apache.openjpa.jdbc.kernel
Class SelectResultObjectProvider

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

public abstract class SelectResultObjectProvider
extends Object
implements org.apache.openjpa.lib.rop.ResultObjectProvider

Abstract provider implementation wrapped around a Select.

Author:
Abe White

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
 

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 org.apache.openjpa.lib.rop.ResultObjectProvider

open

public void open()
          throws SQLException
Specified by:
open in interface org.apache.openjpa.lib.rop.ResultObjectProvider
Throws:
SQLException

next

public boolean next()
             throws SQLException
Specified by:
next in interface org.apache.openjpa.lib.rop.ResultObjectProvider
Throws:
SQLException

absolute

public boolean absolute(int pos)
                 throws SQLException
Specified by:
absolute in interface org.apache.openjpa.lib.rop.ResultObjectProvider
Throws:
SQLException

size

public int size()
         throws SQLException
Specified by:
size in interface org.apache.openjpa.lib.rop.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 org.apache.openjpa.lib.rop.ResultObjectProvider
Throws:
SQLException

close

public void close()
Specified by:
close in interface org.apache.openjpa.lib.rop.ResultObjectProvider
Specified by:
close in interface org.apache.openjpa.lib.util.Closeable

handleCheckedException

public void handleCheckedException(Exception e)
Specified by:
handleCheckedException in interface org.apache.openjpa.lib.rop.ResultObjectProvider


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