Class AbstractDatabaseFilter

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.ShallowCopySupporter<adams.data.filter.Filter>, adams.core.SizeOfHandler, adams.data.filter.Filter<Spectrum>, adams.db.DatabaseConnectionHandler, adams.db.DatabaseConnectionProvider, adams.db.DatabaseConnectionUser, Serializable, Comparable
    Direct Known Subclasses:
    ChangeFormat

    public abstract class AbstractDatabaseFilter
    extends adams.data.filter.AbstractDatabaseConnectionFilter<Spectrum>
    Abstract superclass for filters that operate on the database.
    Version:
    $Revision: 1286 $
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class adams.data.filter.AbstractFilter

        adams.data.filter.AbstractFilter.FilterJob<T extends adams.data.container.DataContainer>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean m_UseStoreTable
      whether to load the sample data if missing.
      • Fields inherited from class adams.data.filter.AbstractDatabaseConnectionFilter

        m_DatabaseConnection
      • Fields inherited from class adams.data.filter.AbstractFilter

        m_DontUpdateID
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void defineOptions()
      Adds options to the internal list of options.
      protected adams.db.AbstractDatabaseConnection getDefaultDatabaseConnection()
      Returns the default database connection.
      protected SampleDataF getSampleDataTable()
      Returns the correct table object based on the filter's setup.
      protected SpectrumF getSpectrumTable()
      Returns the correct table object based on the filter's setup.
      boolean getUseStoreTable()
      Returns whether to read from the active or store table.
      void setUseStoreTable​(boolean value)
      Sets whether to read from the active or store table.
      abstract String useStoreTableTipText()
      Returns the tip text for this property.
      • Methods inherited from class adams.data.filter.AbstractDatabaseConnectionFilter

        getDatabaseConnection, initialize, setDatabaseConnection, updateDatabaseConnection
      • Methods inherited from class adams.data.filter.AbstractFilter

        checkData, cleanUp, compareTo, destroy, dontUpdateIDTipText, equals, filter, forCommandLine, getDontUpdateID, processData, reset, setDontUpdateID, shallowCopy, shallowCopy
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel, setLoggingLevel
      • Methods inherited from interface adams.core.logging.LoggingSupporter

        getLogger, isLoggingEnabled
      • Methods inherited from interface adams.core.option.OptionHandler

        cleanUpOptions, getOptionManager, toCommandLine
    • Field Detail

      • m_UseStoreTable

        protected boolean m_UseStoreTable
        whether to load the sample data if missing.
    • Constructor Detail

      • AbstractDatabaseFilter

        public AbstractDatabaseFilter()
    • Method Detail

      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.data.filter.AbstractFilter<Spectrum>
      • getDefaultDatabaseConnection

        protected adams.db.AbstractDatabaseConnection getDefaultDatabaseConnection()
        Returns the default database connection.
        Specified by:
        getDefaultDatabaseConnection in class adams.data.filter.AbstractDatabaseConnectionFilter<Spectrum>
        Returns:
        the default database connection
      • setUseStoreTable

        public void setUseStoreTable​(boolean value)
        Sets whether to read from the active or store table.
        Parameters:
        value - if true then the store table will be used
      • getUseStoreTable

        public boolean getUseStoreTable()
        Returns whether to read from the active or store table.
        Returns:
        true if the store table is used
      • useStoreTableTipText

        public abstract String useStoreTableTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getSpectrumTable

        protected SpectrumF getSpectrumTable()
        Returns the correct table object based on the filter's setup.
        Returns:
        the table object
      • getSampleDataTable

        protected SampleDataF getSampleDataTable()
        Returns the correct table object based on the filter's setup.
        Returns:
        the table object