Class PamTableDefinition

java.lang.Object
generalDatabase.EmptyTableDefinition
generalDatabase.PamTableDefinition
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ImportHydrophoneTableDef, MarkGroupTableDefinition, PamSettingsTableDefinition, PamSubtableDefinition, TargetMotionTableInformation, XMLSettingsTableDefinition

public class PamTableDefinition extends EmptyTableDefinition implements Cloneable
Defines a database table for use with the Pamguard database The Pamguard database can query this table definition to see what columns should be present and to create appropriate tables. Also used to prepare Sql statements for writing and reading back data. I did a bit of redefining what columns are used for on 4 Oct, 2012. PCLocalTime was a UTC time from the PC of the time analysis took place. When running in real time, this would be the same as the data in the UTC column (give or take the odd second for data to get through the system). I've now defined this to be the UTC time + the timezone offset. I've added another column PCTime which is the system clock from the PC at the time data were stored - which will be different to UTC if the sound card is sampling too slow or too fast or if you're reprocessing archived data from file.
Author:
Doug Gillespie
See Also:
  • Field Details

  • Constructor Details

    • PamTableDefinition

      public PamTableDefinition(String tableName)
    • PamTableDefinition

      public PamTableDefinition(String tableName, int updatePolicy)
      Parameters:
      tableName - Name of the database table. Spaces in the database name will automatically be replaced by the _ character.
  • Method Details

    • getSQLSelectString

      public String getSQLSelectString(SQLTypes sqlTypes)
      Description copied from class: EmptyTableDefinition
      Get a very basic select string which queries for all items in the table, no ordering or selection
      Overrides:
      getSQLSelectString in class EmptyTableDefinition
      Returns:
      an SQL string.
    • getSQLSelectString

      public String getSQLSelectString(SQLTypes sqlTypes, PamViewParameters pamViewParameters)
      gets an sql select string for the table that selects all fields. Note that some databases don't support the " around a column name, so this has been omitted, making it impossible to use fields with spaces.
      Returns:
      SQL Select string
    • getTimeStampItem

      public PamTableItem getTimeStampItem()
    • getTimeStampMillis

      public PamTableItem getTimeStampMillis()
    • getPCTimeItem

      public PamTableItem getPCTimeItem()
    • getLocalTimeItem

      public PamTableItem getLocalTimeItem()
    • getUidItem

      public PamTableItem getUidItem()
      Returns:
      the uid table item
    • getUpdateReference

      public PamTableItem getUpdateReference()
    • setUpdateReference

      public void setUpdateReference(PamTableItem updateReference)
    • getChannelBitmap

      public PamTableItem getChannelBitmap()
    • setChannelBitmap

      public void setChannelBitmap(PamTableItem channelBitmap)
    • getSequenceBitmap

      public PamTableItem getSequenceBitmap()
    • setSequenceBitmap

      public void setSequenceBitmap(PamTableItem sequenceBitmap)