mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-10-29 23:30:44 +00:00
SQLLogging revert
Revert main table definition class used by SQLLogging to PamTableDefinition, back from EmptyTableDefinition, to maintain compatibility with existing plugin modules.
This commit is contained in:
parent
9939e8aa85
commit
bafe93e7f5
@ -127,7 +127,7 @@ public abstract class OneStopAnnotationHandler extends AnnotationChoiceHandler i
|
||||
return;
|
||||
}
|
||||
// get, modify and set the modified tabelDef
|
||||
EmptyTableDefinition tableDef = logging.getBaseTableDefinition();
|
||||
PamTableDefinition tableDef = logging.getBaseTableDefinition();
|
||||
logging.setTableDefinition(tableDef);
|
||||
addAnnotationSqlAddons(logging); // this will add the additional columns.
|
||||
DBControlUnit dbc = DBControlUnit.findDatabaseControl();
|
||||
|
@ -13,7 +13,7 @@ import PamController.settings.output.xml.PamguardXMLWriter;
|
||||
import PamUtils.PamCalendar;
|
||||
import PamguardMVC.PamDataUnit;
|
||||
/**
|
||||
* 2022 Additional say of saving settings for each module into the database in more human readable
|
||||
* 2022 Additional way of saving settings for each module into the database in more human readable
|
||||
* XML format. <p>
|
||||
* In other ways, similar to LogSettings which saves serialised Java. This will write a line
|
||||
* per module. A main difference is that on pamStop it will update the end time for each line, so
|
||||
|
@ -92,7 +92,7 @@ public abstract class SQLLogging {
|
||||
* Reference to the table definition object.
|
||||
* This MUST be set from within the concrete logging class.
|
||||
*/
|
||||
private EmptyTableDefinition pamTableDefinition;
|
||||
private PamTableDefinition pamTableDefinition;
|
||||
|
||||
/**
|
||||
* More and more data blocks are starting to use annotations, which require
|
||||
@ -102,7 +102,7 @@ public abstract class SQLLogging {
|
||||
* table definition is set, so that it can be got and modified by the
|
||||
* annotation handler shortly after the main table is created.
|
||||
*/
|
||||
private EmptyTableDefinition baseTableDefinition;
|
||||
private PamTableDefinition baseTableDefinition;
|
||||
|
||||
// private long selectT1, selectT2;
|
||||
private PamViewParameters currentViewParameters;
|
||||
@ -234,7 +234,7 @@ public abstract class SQLLogging {
|
||||
* @return a Pamguard database table definition object
|
||||
* @see PamTableDefinition
|
||||
*/
|
||||
public final EmptyTableDefinition getTableDefinition() {
|
||||
public final PamTableDefinition getTableDefinition() {
|
||||
return pamTableDefinition;
|
||||
}
|
||||
|
||||
@ -243,7 +243,7 @@ public abstract class SQLLogging {
|
||||
*
|
||||
* @param pamTableDefinition PamTableDefinition to set
|
||||
*/
|
||||
public void setTableDefinition(EmptyTableDefinition pamTableDefinition) {
|
||||
public void setTableDefinition(PamTableDefinition pamTableDefinition) {
|
||||
this.pamTableDefinition = pamTableDefinition;
|
||||
if (baseTableDefinition == null && pamTableDefinition != null) {
|
||||
baseTableDefinition = pamTableDefinition.clone();
|
||||
@ -1827,7 +1827,7 @@ public abstract class SQLLogging {
|
||||
* annotation handler shortly after the main table is created.
|
||||
* @return the baseTableDefinition
|
||||
*/
|
||||
public EmptyTableDefinition getBaseTableDefinition() {
|
||||
public PamTableDefinition getBaseTableDefinition() {
|
||||
return baseTableDefinition;
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ import java.sql.Types;
|
||||
|
||||
import PamguardMVC.PamConstants;
|
||||
|
||||
public class XMLSettingsTableDefinition extends EmptyTableDefinition {
|
||||
public class XMLSettingsTableDefinition extends PamTableDefinition {
|
||||
|
||||
private PamTableItem dataStart, dataEnd, processStart, processEnd, type, name, pamGuardVersion, settingsVersion, xmlSettings;
|
||||
|
||||
|
@ -34,14 +34,14 @@ public class TowedArray3DSQLLogging extends PamDetectionLogging {
|
||||
this.towedArray3DController = towedArray3DController;
|
||||
|
||||
// create the table definition.
|
||||
EmptyTableDefinition tableDefinition = createTableDefinition();
|
||||
PamTableDefinition tableDefinition = createTableDefinition();
|
||||
}
|
||||
|
||||
public EmptyTableDefinition createTableDefinition() {
|
||||
public PamTableDefinition createTableDefinition() {
|
||||
|
||||
|
||||
// PamTableDefinition tableDef = new PamTableDefinition(towedArray3DController.getUnitName(), getUpdatePolicy());
|
||||
EmptyTableDefinition tableDef = super.getTableDefinition();
|
||||
PamTableDefinition tableDef = super.getTableDefinition();
|
||||
tableDef.setUpdatePolicy(SQLLogging.UPDATE_POLICY_WRITENEW);
|
||||
|
||||
// PamTableItem tableItem;
|
||||
|
Loading…
Reference in New Issue
Block a user