Interface ResultObjectFactory<T>

  • Type Parameters:
    T - Type of the returned object
    All Known Implementing Classes:
    AbstractROF, PersistentClassROF, ResultClassROF, ResultMetaDataROF

    public interface ResultObjectFactory<T>
    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 (PersistentClassROF). Another implementation could return all columns of the result set as separate objects.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T getObject()
      Instantiates object(s) from the current row of the given result set.
      ResultSet getResultSet()
      Accessor for the JDBC ResultSet being processed.
      void setIgnoreCache​(boolean ignore)
      Specify whether when processing the results we should ignore the L1 cache.
      void setUpdateAllFields​(boolean update)
      Specify whether when processing the results we should just update fields that are not currently loaded.
    • Method Detail

      • getResultSet

        ResultSet getResultSet()
        Accessor for the JDBC ResultSet being processed.
        Returns:
        The ResultSet
      • getObject

        T getObject()
        Instantiates object(s) from the current row of the given result set.
        Returns:
        The object(s) for this row of the ResultSet.
      • setIgnoreCache

        void setIgnoreCache​(boolean ignore)
        Specify whether when processing the results we should ignore the L1 cache.
        Parameters:
        ignore - Whether to ignore the L1 cache
      • setUpdateAllFields

        void setUpdateAllFields​(boolean update)
        Specify whether when processing the results we should just update fields that are not currently loaded.
        Parameters:
        update - Whether to update all fields rather than just the non-loaded fields