Package PamguardMVC.uid
Class DatabaseUIDFunctions
java.lang.Object
PamguardMVC.uid.DatabaseUIDFunctions
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addToTable
(PamCursor c, UIDTrackerData uidData) Add the name/uid pair to the tracker table.boolean
Check whether or not the tracker table exists.boolean
Create the UID tracker table in the databaseCreate the tracker table in the database.long
findMaxUIDforDataBlock
(PamDataBlock dataBlock) Returns the highest UID number for the PamDataBlock passed.Returns an ArrayList of table name / highest UID pairs (contained in uidTrackerData objects) from the UID tracker table.Returns a list of UIDs from the tables in the current databaseboolean
Remove the UID tracker table from the current databaseboolean
saveUIDData
(ArrayList<PamDataBlock> allDataBlocks)
-
Field Details
-
STRING_LENGTH
public static final int STRING_LENGTH- See Also:
-
-
Constructor Details
-
DatabaseUIDFunctions
-
-
Method Details
-
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
Add the name/uid pair to the tracker table.- Returns:
- true if successful
-
getAllUIDsfromTrackerTable
Returns an ArrayList of table name / highest UID pairs (contained in uidTrackerData objects) from the UID tracker table.- Returns:
-
findMaxUIDforDataBlock
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
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
- Parameters:
allDataBlocks
-- Returns:
-