Package PamController

Class PamViewParameters

All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
FixedClause, UIDViewParameters

public class PamViewParameters extends PAMSelectClause implements Serializable, Cloneable
A set of variables for loading a section of data from the viewer mode database.
Author:
Doug Gillespie
See Also:
  • Field Details

    • viewStartTime

      public long viewStartTime
      start and end times for Pamguard viewer These are the times of the data (UTC in most database tables)
    • viewEndTime

      public long viewEndTime
      start and end times for Pamguard viewer These are the times of the data (UTC in most database tables)
    • useAnalysisTime

      public boolean useAnalysisTime
      Analysis offline may have gone through the data multiple times. IF this is the case, you may want to select by analysis time as well as the data time. (LocalTime in most database tables)
    • analStartTime

      public long analStartTime
      Analysis offline may have gone through the data multiple times. IF this is the case, you may want to select by analysis time as well as the data time. (LocalTime in most database tables)
    • analEndTime

      public long analEndTime
      Analysis offline may have gone through the data multiple times. IF this is the case, you may want to select by analysis time as well as the data time. (LocalTime in most database tables)
    • useModules

      public boolean[] useModules
      List of modules to use. This is sent directly into all modules from the view times dialog.
  • Constructor Details

    • PamViewParameters

      public PamViewParameters()
      Make an empty view parameters clause. This will generate an empty string when getSelectClause(...) is called.
    • PamViewParameters

      public PamViewParameters(long viewStartTime, long viewEndTime)
      Parameters:
      viewStartTime -
      viewEndTime -
  • Method Details

    • clone

      public PamViewParameters clone()
    • getSelectClause

      public String getSelectClause(SQLTypes sqlTypes)
      Get a clause to add to a query. The clause includes the word WHERE so that it's possible to return an empty string and still get a valid SQL statement.
      Care will be needed if two clauses are added (with AND) to remove one WHERE.
      Specified by:
      getSelectClause in class PAMSelectClause
      Parameters:
      sqlTypes - SQL types for any bespoke formatting
      Returns:
      results query.
    • equals

      public boolean equals(PamViewParameters otherParameters)
    • getRoundedViewStartTime

      public long getRoundedViewStartTime()
      Returns:
      the viewStartTime
    • setViewStartTime

      public void setViewStartTime(long viewStartTime)
      Parameters:
      viewStartTime - the viewStartTime to set
    • getRoundedViewEndTime

      public long getRoundedViewEndTime()
      Returns:
      the viewEndTime
    • setViewEndTime

      public void setViewEndTime(long viewEndTime)
      Parameters:
      viewEndTime - the viewEndTime to set
    • isUseAnalysisTime

      public boolean isUseAnalysisTime()
      Returns:
      the useAnalysisTime
    • setUseAnalysisTime

      public void setUseAnalysisTime(boolean useAnalysisTime)
      Parameters:
      useAnalysisTime - the useAnalysisTime to set
    • getRoundedAnalStartTime

      public long getRoundedAnalStartTime()
      Returns:
      the analStartTime
    • setAnalStartTime

      public void setAnalStartTime(long analStartTime)
      Parameters:
      analStartTime - the analStartTime to set
    • getRoundedAnalEndTime

      public long getRoundedAnalEndTime()
      Returns:
      the analEndTime
    • setAnalEndTime

      public void setAnalEndTime(long analEndTime)
      Parameters:
      analEndTime - the analEndTime to set
    • roundDown

      public long roundDown(long time)
      Round a time down to nearest second
      Parameters:
      time -
      Returns:
      time rounded down to nearest second
    • roundUp

      public long roundUp(long time)
      Round a time down up nearest second
      Parameters:
      time -
      Returns:
      time rounded down to nearest second
    • getViewStartTime

      public long getViewStartTime()
      Returns:
      the viewStartTime
    • getViewEndTime

      public long getViewEndTime()
      Returns:
      the viewEndTime
    • getAnalStartTime

      public long getAnalStartTime()
      Returns:
      the analStartTime
    • getAnalEndTime

      public long getAnalEndTime()
      Returns:
      the analEndTime
    • getUseModules

      public boolean[] getUseModules()
      Returns:
      the useModules
    • setUseModules

      public void setUseModules(boolean[] useModules)
      Parameters:
      useModules - the useModules to set