Class PersistentClassROF<T>
- java.lang.Object
-
- org.datanucleus.store.rdbms.query.AbstractROF<T>
-
- org.datanucleus.store.rdbms.query.PersistentClassROF<T>
-
- Type Parameters:
T
- Type of the persistent object that this creates
- All Implemented Interfaces:
ResultObjectFactory<T>
public final class PersistentClassROF<T> extends AbstractROF<T>
Result-object factory that takes a JDBC ResultSet, a results mapping, and creates a persistable object instance for each row in the ResultSet. We use information in the result set to determine the object type; this can be a discriminator column, or can be a special "NucleusType" column defined just for result processing.
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
mappedFieldNumbers
protected StatementClassMapping
mappingDefinition
protected Class<T>
persistentClass
Persistent class that this factory will generate (may be the root class).protected StatementClassMapping
resultMapping
Mapping of the results to members of this class (and sub-objects).protected ResultSetGetter
resultSetGetter
protected org.datanucleus.metadata.AbstractClassMetaData
rootCmd
Metadata for the (root) persistable candidate class.-
Fields inherited from class org.datanucleus.store.rdbms.query.AbstractROF
ec, fp, ignoreCache, rs, updateAllFields
-
-
Constructor Summary
Constructors Constructor Description PersistentClassROF(org.datanucleus.ExecutionContext ec, ResultSet rs, org.datanucleus.FetchPlan fp, StatementClassMapping resultMapping, org.datanucleus.metadata.AbstractClassMetaData acmd, Class<T> persistentClass)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getObject()
Method to convert the current ResultSet row into a persistable Object.ResultSet
getResultSet()
Accessor for the JDBC ResultSet being processed.-
Methods inherited from class org.datanucleus.store.rdbms.query.AbstractROF
setIgnoreCache, setUpdateAllFields
-
-
-
-
Field Detail
-
rootCmd
protected final org.datanucleus.metadata.AbstractClassMetaData rootCmd
Metadata for the (root) persistable candidate class.
-
persistentClass
protected Class<T> persistentClass
Persistent class that this factory will generate (may be the root class).
-
resultMapping
protected StatementClassMapping resultMapping
Mapping of the results to members of this class (and sub-objects).
-
resultSetGetter
protected ResultSetGetter resultSetGetter
-
mappingDefinition
protected StatementClassMapping mappingDefinition
-
mappedFieldNumbers
protected int[] mappedFieldNumbers
-
-
Constructor Detail
-
PersistentClassROF
public PersistentClassROF(org.datanucleus.ExecutionContext ec, ResultSet rs, org.datanucleus.FetchPlan fp, StatementClassMapping resultMapping, org.datanucleus.metadata.AbstractClassMetaData acmd, Class<T> persistentClass)
Constructor.- Parameters:
ec
- ExecutionContextrs
- ResultSet being processedfp
- FetchPlanresultMapping
- Mapping information for the result set and how it maps to the classacmd
- MetaData for the (root) candidate classpersistentClass
- Class that this factory will create instances of (or subclasses)
-
-
Method Detail
-
getResultSet
public ResultSet getResultSet()
Description copied from interface:ResultObjectFactory
Accessor for the JDBC ResultSet being processed.- Specified by:
getResultSet
in interfaceResultObjectFactory<T>
- Overrides:
getResultSet
in classAbstractROF<T>
- Returns:
- The ResultSet
-
getObject
public T getObject()
Method to convert the current ResultSet row into a persistable Object.- Returns:
- The persistable object.
-
-