Package adams.tools
Class AbstractAddRemoveTimeWindowDatabaseTool
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.tools.AbstractTool
-
- adams.tools.AbstractDatabaseTool
-
- adams.tools.AbstractTimeWindowDatabaseTool
-
- adams.tools.AbstractAddRemoveTimeWindowDatabaseTool
-
- All Implemented Interfaces:
CleanUpHandler
,Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,Stoppable
,StoppableWithFeedback
,DatabaseConnectionHandler
,DatabaseConnectionProvider
,DatabaseConnectionUser
,Serializable
,Comparable
public abstract class AbstractAddRemoveTimeWindowDatabaseTool extends AbstractTimeWindowDatabaseTool
Ancestor for tools that add or remove stuff in the database.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
m_Add
whether to add flags.protected boolean
m_Remove
whether to remove the flags.protected boolean
m_Store
whether to write a modified report back to the database.-
Fields inherited from class adams.tools.AbstractTimeWindowDatabaseTool
m_EndDate, m_StartDate
-
Fields inherited from class adams.tools.AbstractDatabaseTool
m_dbc
-
Fields inherited from class adams.tools.AbstractTool
m_Stopped
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractAddRemoveTimeWindowDatabaseTool()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
addTipText()
Returns the tip text for this property.void
defineOptions()
Adds options to the internal list of options.protected abstract void
doAddRun()
Peforms the "add" run.protected abstract void
doRemoveRun()
Peforms the "remove" run.protected void
doRun()
Executes the tool.boolean
getAdd()
Returns whether only new standard flags get set and current ones not revoked or not.boolean
getRemove()
Returns whether the true flags are removed based on the regular expressions or not.boolean
getStore()
Returns whether a modified report gets written back to the database.protected void
preRun()
Before the actual run is executed.abstract String
removeTipText()
Returns the tip text for this property.void
setAdd(boolean value)
Sets whether only new standard flags get set and current ones not revoked or not.void
setRemove(boolean value)
Sets whether to remove the true flags using the regular expressions or not.void
setStore(boolean value)
Sets whether a modified report gets written back to the database.String
storeTipText()
Returns the tip text for this property.-
Methods inherited from class adams.tools.AbstractTimeWindowDatabaseTool
endDateTipText, getEndDate, getStartDate, setEndDate, setStartDate, startDateTipText
-
Methods inherited from class adams.tools.AbstractDatabaseTool
cleanUp, getDatabaseConnection, getDefaultDatabaseConnection, initialize, setDatabaseConnection
-
Methods inherited from class adams.tools.AbstractTool
compareTo, destroy, equals, forCommandLine, forName, getTools, isStopped, postRun, run, runTool, stopExecution
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractTimeWindowDatabaseTool
-
setAdd
public void setAdd(boolean value)
Sets whether only new standard flags get set and current ones not revoked or not.- Parameters:
value
- if true then standard flags only get added but never revoked; if false then previously standard flags can be set to false (if they don't match the reg. exp.)
-
getAdd
public boolean getAdd()
Returns whether only new standard flags get set and current ones not revoked or not.- Returns:
- true if only new standards get added and current ones not (potentially) revoked.
-
addTipText
public abstract String addTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setRemove
public void setRemove(boolean value)
Sets whether to remove the true flags using the regular expressions or not.- Parameters:
value
- if true then standard flags only get added but never revoked; if false then previously standard flags can be set to false (if they don't match the reg. exp.)
-
getRemove
public boolean getRemove()
Returns whether the true flags are removed based on the regular expressions or not.- Returns:
- true if only new standards get added and current ones not (potentially) revoked.
-
removeTipText
public abstract String removeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setStore
public void setStore(boolean value)
Sets whether a modified report gets written back to the database.- Parameters:
value
- if true then modified reports get written back to the database
-
getStore
public boolean getStore()
Returns whether a modified report gets written back to the database.- Returns:
- true if a modified report gets written back to the database
-
storeTipText
public String storeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
preRun
protected void preRun()
Before the actual run is executed. Checks the setup and corrects things, if possible.- Overrides:
preRun
in classAbstractTool
-
doRemoveRun
protected abstract void doRemoveRun()
Peforms the "remove" run.
-
doAddRun
protected abstract void doAddRun()
Peforms the "add" run.
-
doRun
protected void doRun()
Executes the tool.- Specified by:
doRun
in classAbstractTool
-
-