Class DatabaseUIDFunctions

java.lang.Object
PamguardMVC.uid.DatabaseUIDFunctions

public class DatabaseUIDFunctions extends Object
  • Field Details

  • Constructor Details

    • DatabaseUIDFunctions

      public DatabaseUIDFunctions(PamController pamController)
  • Method Details

    • createUIDTrackerTable

      public PamCursor createUIDTrackerTable()
      Create the tracker table in the database. Return a PamCursor for the table
      Returns:
      a PamCursor pointing to the table. Null if the method was unsuccessful
    • checkTableExists

      public boolean checkTableExists()
      Check whether or not the tracker table exists.
      Returns:
      true if the table exists
    • createTable

      public boolean createTable()
      Create the UID tracker table in the database
      Returns:
      true if successful
    • addToTable

      public boolean addToTable(PamCursor c, UIDTrackerData uidData)
      Add the name/uid pair to the tracker table.
      Returns:
      true if successful
    • getAllUIDsfromTrackerTable

      public ArrayList<UIDTrackerData> getAllUIDsfromTrackerTable()
      Returns an ArrayList of table name / highest UID pairs (contained in uidTrackerData objects) from the UID tracker table.
      Returns:
    • findMaxUIDforDataBlock

      public long findMaxUIDforDataBlock(PamDataBlock dataBlock)
      Returns the highest UID number for the PamDataBlock passed. This method first looks through the Tracker Table, and if it can't find a suitable UID it then looks through the database table directly associated with the PamDataBlock. Returns -1 if there was a problem retrieving the information
      Parameters:
      dataBlock -
      Returns:
    • getUIDsFromAllTables

      public ArrayList<UIDTrackerData> getUIDsFromAllTables()
      Returns a list of UIDs from the tables in the current database
      Returns:
    • removeUIDTrackerTable

      public boolean removeUIDTrackerTable()
      Remove the UID tracker table from the current database
      Returns:
      true if successful
    • saveUIDData

      public boolean saveUIDData(ArrayList<PamDataBlock> allDataBlocks)
      Parameters:
      allDataBlocks -
      Returns: