Class 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 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).
      • 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 - ExecutionContext
        rs - ResultSet being processed
        fp - FetchPlan
        resultMapping - Mapping information for the result set and how it maps to the class
        acmd - MetaData for the (root) candidate class
        persistentClass - Class that this factory will create instances of (or subclasses)
    • Method Detail

      • getObject

        public T getObject()
        Method to convert the current ResultSet row into a persistable Object.
        Returns:
        The persistable object.