Class FieldCacheTableModel

    • Field Detail

      • m_DatabaseURL

        protected String m_DatabaseURL
        the database URL.
      • m_FieldType

        protected FieldType m_FieldType
        the field type to use.
      • m_DataType

        protected DataType m_DataType
        the data type in use (if any).
    • Constructor Detail

      • FieldCacheTableModel

        public FieldCacheTableModel​(AbstractFieldCacheItem cache,
                                    FieldType fieldType,
                                    DataType dataType)
        the constructor.
        Parameters:
        cache - the cache
        fieldType - the fieldtype
        dataType - the data type to display, use null for all
    • Method Detail

      • getDatabaseURL

        public String getDatabaseURL()
        Returns the database URL this table model was created with.
        Returns:
        the database URL
      • getRowCount

        public int getRowCount()
        Returns the actual number of entries in the table.
        Specified by:
        getRowCount in interface TableModel
        Returns:
        the number of entries
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns in the table, i.e., 1.
        Specified by:
        getColumnCount in interface TableModel
        Returns:
        the number of columns, always 1
      • getColumnClass

        public Class getColumnClass​(int columnIndex)
        Returns the class type of the column.
        Specified by:
        getColumnClass in interface TableModel
        Overrides:
        getColumnClass in class AbstractTableModel
        Parameters:
        columnIndex - the column to get the class for
        Returns:
        the class for the column
      • getComparisonColumnClass

        public Class getComparisonColumnClass​(int columnIndex)
        Returns the class type of the column that is used for comparisons.
        Specified by:
        getComparisonColumnClass in interface ComparableTableModel
        Parameters:
        columnIndex - the column to get the class for
        Returns:
        the class for the column
      • getValueAt

        public Object getValueAt​(int row,
                                 int column)
        Returns the field at the given position.
        Specified by:
        getValueAt in interface TableModel
        Parameters:
        row - the row
        column - the column (ignored, since only 1 column)
        Returns:
        the field
      • getComparisonValueAt

        public Object getComparisonValueAt​(int row,
                                           int column)
        Returns the field at the given position.
        Specified by:
        getComparisonValueAt in interface ComparableTableModel
        Parameters:
        row - the row
        column - the column (ignored, since only 1 column)
        Returns:
        the field
      • isSearchMatch

        public boolean isSearchMatch​(SearchParameters params,
                                     int row)
        Tests whether the search matches the specified row.
        Specified by:
        isSearchMatch in interface CustomSearchTableModel
        Parameters:
        params - the search parameters
        row - the row of the underlying, unsorted model
        Returns:
        true if the search matches this row
      • setFieldType

        public void setFieldType​(FieldType value)
        Sets the field type.
        Parameters:
        value - the new field type
      • getFieldType

        public FieldType getFieldType()
        Returns the field type.
        Returns:
        the current field type
      • setDataType

        public void setDataType​(DataType value)
        Sets the data type.
        Parameters:
        value - the new data type
      • getDataType

        public DataType getDataType()
        Returns the data type.
        Returns:
        the current data type