org.apache.openjpa.jdbc.kernel
Class GenericResultObjectProvider

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.GenericResultObjectProvider
All Implemented Interfaces:
org.apache.openjpa.lib.rop.ResultObjectProvider, org.apache.openjpa.lib.util.Closeable

public class GenericResultObjectProvider
extends java.lang.Object
implements org.apache.openjpa.lib.rop.ResultObjectProvider

Object provider implementation wrapped around a generic Result.

Author:
Abe White

Constructor Summary
GenericResultObjectProvider(java.lang.Class pcClass, JDBCStore store, JDBCFetchConfiguration fetch, Result res)
          Constructor.
GenericResultObjectProvider(ClassMapping mapping, JDBCStore store, JDBCFetchConfiguration fetch, Result res)
          Constructor.
 
Method Summary
 boolean absolute(int pos)
           
 void close()
           
 java.lang.Object getResultObject()
           
 void handleCheckedException(java.lang.Exception e)
           
 boolean next()
           
 void open()
           
 void reset()
           
 int size()
           
 boolean supportsRandomAccess()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericResultObjectProvider

public GenericResultObjectProvider(java.lang.Class pcClass,
                                   JDBCStore store,
                                   JDBCFetchConfiguration fetch,
                                   Result res)
Constructor.

Parameters:
pcClass - the base class of the result objects
store - the store manager to delegate loading to
fetch - the fetch configuration, or null for default
res - the result containing the data

GenericResultObjectProvider

public GenericResultObjectProvider(ClassMapping mapping,
                                   JDBCStore store,
                                   JDBCFetchConfiguration fetch,
                                   Result res)
Constructor.

Parameters:
mapping - the mapping for the base class of the result objects
store - the store manager to delegate loading to
fetch - the fetch configuration, or null for default
res - the result containing the data
Method Detail

supportsRandomAccess

public boolean supportsRandomAccess()
Specified by:
supportsRandomAccess in interface org.apache.openjpa.lib.rop.ResultObjectProvider

open

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

getResultObject

public java.lang.Object getResultObject()
                                 throws java.sql.SQLException
Specified by:
getResultObject in interface org.apache.openjpa.lib.rop.ResultObjectProvider
Throws:
java.sql.SQLException

next

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

absolute

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

size

public int size()
         throws java.sql.SQLException
Specified by:
size in interface org.apache.openjpa.lib.rop.ResultObjectProvider
Throws:
java.sql.SQLException

reset

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

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(java.lang.Exception e)
Specified by:
handleCheckedException in interface org.apache.openjpa.lib.rop.ResultObjectProvider


Copyright © 2006 Apache Software Foundation. All Rights Reserved.