Class DatabaseUIDFunctions

java.lang.Object
PamguardMVC.uid.DatabaseUIDFunctions

public class DatabaseUIDFunctions extends Object
  • Field Details Link icon

  • Constructor Details Link icon

    • DatabaseUIDFunctions Link icon

      public DatabaseUIDFunctions(PamController pamController)
  • Method Details Link icon

    • createUIDTrackerTable Link icon

      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 Link icon

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

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

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

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

      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 Link icon

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

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

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