Class ArrayRecord

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

    public class ArrayRecord
    extends DatabaseRecord
    PERF: Optimized record implementation using arrays instead of Vector. Currently only used when fetch rows from the database.
    See Also:
    Serialized Form
    • Field Detail

      • valuesArray

        protected java.lang.Object[] valuesArray
    • Constructor Detail

      • ArrayRecord

        protected ArrayRecord()
      • ArrayRecord

        public ArrayRecord​(java.util.Vector fields,
                           DatabaseField[] fieldsArray,
                           java.lang.Object[] valuesArray)
    • Method Detail

      • checkValues

        protected void checkValues()
        Reset the fields and values from the arrays. This removes the optimization if a non-optimized method is called.
      • add

        public void add​(DatabaseField key,
                        java.lang.Object value)
        INTERNAL: Add the field-value pair to the row. Will not check, will simply add to the end of the row
        Overrides:
        add in class AbstractRecord
      • clear

        public void clear()
        PUBLIC: Clear the contents of the row.
        Specified by:
        clear in interface java.util.Map
        Overrides:
        clear in class AbstractRecord
      • 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 AbstractRecord
      • get

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

        public java.lang.Object getIndicatingNoEntry​(DatabaseField key)
        INTERNAL: Retrieve the value for the field. If missing DatabaseRow.noEntry is returned.
        Overrides:
        getIndicatingNoEntry in class AbstractRecord
      • put

        public java.lang.Object put​(DatabaseField key,
                                    java.lang.Object value)
        INTERNAL: Add the field-value pair to the row.
        Overrides:
        put in class AbstractRecord
      • replaceAt

        public void replaceAt​(java.lang.Object value,
                              int index)
        INTERNAL: replaces the value at index with value
        Overrides:
        replaceAt in class AbstractRecord
      • size

        public int size()
        PUBLIC: Return the number of field/value pairs in the row.
        Specified by:
        size in interface java.util.Map
        Overrides:
        size in class AbstractRecord
      • toStringAditional

        protected java.lang.String toStringAditional()