org.datanucleus.store.query
Interface ResultObjectFactory


public interface ResultObjectFactory

An object that reads result set rows and returns corresponding object(s) from them. Different queries accomplish this in different ways so a query supplies a suitable ResultObjectFactory to each QueryResult when it is executed. The QueryResult only uses it to turn ResultSet rows into objects and otherwise manages the ResultSet itself.

For example an implementation of this interface could return a single Persistent object per row (PersistentIDROF). Another implementation could return all columns of the result set as separate objects.

See Also:
QueryResult

Method Summary
 java.lang.Object getObject(ObjectManager om, java.lang.Object rs)
          Instantiates object(s) from the current row of the given result set.
 

Method Detail

getObject

java.lang.Object getObject(ObjectManager om,
                           java.lang.Object rs)
Instantiates object(s) from the current row of the given result set.

Parameters:
om - The ObjectManager.
rs - The result set which will be used to convert the current row into the returned object(s).
Returns:
The object(s) for this row of the ResultSet.


Copyright © 2009. All Rights Reserved.