Package adams.db
Class SQLTableCleanUp
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,DatabaseConnectionHandler
,DatabaseConnectionProvider
,DatabaseConnectionUser
,Serializable
public class SQLTableCleanUp extends AbstractTableCleanUp
Executes an SQL statement to clean up the table.
Valid options are:
-D <int> (property: debugLevel) The greater the number the more additional info the scheme may output to the console (0 = off). default: 0 minimum: 0
-statement <adams.db.SQLStatement> (property: statement) The SQL statement to use for cleaning up the table. default:
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SQLStatement
m_Statement
the SQL command to execute.-
Fields inherited from class adams.db.AbstractTableCleanUp
m_Connection
-
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 SQLTableCleanUp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
check()
Performs checks before cleaning up the table.void
defineOptions()
Adds options to the internal list of options.protected String
doCleanUpTable()
Performs the actual clean up.SQLStatement
getStatement()
Returns the SQL statement.String
globalInfo()
Returns a string describing the object.void
setStatement(SQLStatement value)
Sets the SQL statement.String
statementTipText()
Returns the tip text for this property.-
Methods inherited from class adams.db.AbstractTableCleanUp
cleanUpTable, getDatabaseConnection, setDatabaseConnection
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_Statement
protected SQLStatement m_Statement
the SQL command to execute.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceGlobalInfoSupporter
- Specified by:
globalInfo
in classAbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceOptionHandler
- Overrides:
defineOptions
in classAbstractOptionHandler
-
setStatement
public void setStatement(SQLStatement value)
Sets the SQL statement.- Parameters:
value
- the statement
-
getStatement
public SQLStatement getStatement()
Returns the SQL statement.- Returns:
- the statement
-
statementTipText
public String statementTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
check
protected String check()
Performs checks before cleaning up the table.- Overrides:
check
in classAbstractTableCleanUp
- Returns:
- null if checks successful, otherwise error message
-
doCleanUpTable
protected String doCleanUpTable()
Performs the actual clean up.- Specified by:
doCleanUpTable
in classAbstractTableCleanUp
- Returns:
- null if successfully cleaned up, otherwise error message
-
-