Class ResultSetRecord

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map, Record
    Direct Known Subclasses:
    SimpleResultSetRecord

    public class ResultSetRecord
    extends ArrayRecord
    PERF: Record used by ObjectLevelReadQuery ResultSet optimization. The record corresponds to a single position (resultSet.next() is never called). In case the cached object used instead of creating a new one from the record, the not needed fields' values are never obtained from resultSet (that's especially important for expensive LOBs). If alternatively the record is used to populate an object then all the values obtained from resultSet and resultSet is nullified. In this case the fields' values not required after object population (those not involved in indirection) are nullified to save space in the record.
    See Also:
    Serialized Form
    • Field Detail

      • resultSet

        protected transient java.sql.ResultSet resultSet
      • metaData

        protected transient java.sql.ResultSetMetaData metaData
      • optimizeData

        protected transient boolean optimizeData
    • Constructor Detail

      • ResultSetRecord

        protected ResultSetRecord()
    • Method Detail

      • loadAllValuesFromResultSet

        public void loadAllValuesFromResultSet()
        Obtains all the value from resultSet and removes it. resultSet must be non null.
      • removeNonIndirectionValues

        public void removeNonIndirectionValues()
        Remove values corresponding to all fields not related to indirection.
      • removAllValue

        public void removAllValue()
      • hasResultSet

        public boolean hasResultSet()
        Indicates whether resultSet is still here.
        Returns:
      • removeResultSet

        public void removeResultSet()
      • clear

        public void clear()
        PUBLIC: Clear the contents of the row.
        Specified by:
        clear in interface java.util.Map
        Overrides:
        clear in class ArrayRecord
      • checkValues

        protected void checkValues()
        Reset the fields and values from the arrays. This removes the optimization if a non-optimized method is called.
        Overrides:
        checkValues in class ArrayRecord
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        PUBLIC: Check if the value is contained in the row.
        Specified by:
        containsValue in interface java.util.Map
        Overrides:
        containsValue in class ArrayRecord
      • get

        public java.lang.Object get​(DatabaseField key)
        INTERNAL: Retrieve the value for the field. If missing null is returned.
        Overrides:
        get in class ArrayRecord
      • getIndicatingNoEntry

        public java.lang.Object getIndicatingNoEntry​(DatabaseField key)
        INTERNAL: Retrieve the value for the field. If missing DatabaseRow.noEntry is returned. PERF: This method is a clone of get() for performance.
        Overrides:
        getIndicatingNoEntry in class ArrayRecord