Class CopyTableSourceDefinition

All Implemented Interfaces:
Cloneable

public class CopyTableSourceDefinition extends CopyTableDefinition
  • Constructor Details

    • CopyTableSourceDefinition

      public CopyTableSourceDefinition(String tableName)
  • Method Details

    • getTableName

      public String getTableName()
      Overrides:
      getTableName in class EmptyTableDefinition
      Returns:
      Deblanked database table name
    • setTableName

      public void setTableName(String tableName)
      Overrides:
      setTableName in class EmptyTableDefinition
    • addTableItem

      public int addTableItem(PamTableItem pamTableItem)
      Description copied from class: EmptyTableDefinition
      Adds a new table item
      Overrides:
      addTableItem in class EmptyTableDefinition
      Parameters:
      pamTableItem - new table item object.
      Returns:
      The index of the new table item. Some columns are automatically added to every table, so the first column you create yourself may not be column 0. Since the number of columns added automatically may change in future versions of Pamguard, you should use this index when adding data to the table using the SQLLogging.setColumnData function.

      If an item already exists with the same name (after deblanking) the new table item will replace the old one. This is required for the annotation framework which is a bit fast and loose with recreating table items - without care, the item in the table definition will end up with a different reference to the item stored in the annotation code, so data will be written to the wrong tableitem when data are being prepared for storage.