Package adams.db.autodetect
Class DbBackend
-
- All Implemented Interfaces:
Destroyable
,GlobalInfoSupporter
,LoggingLevelHandler
,LoggingSupporter
,OptionHandler
,SizeOfHandler
,BackendManager
,DbBackend
,Serializable
public class DbBackend extends AbstractDbBackend
Auto-detection database backend. Detects: MySQL, SQLite, PostgreSQL. Otherwise uses the generic SQL/LogT instances.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.db.AbstractDbBackend
BACKEND_AUTODETECT, BACKEND_MYSQL, KEY_BACKEND, m_Initialized, m_Properties, m_Singleton
-
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 DbBackend()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LogIntf
getLog(AbstractDatabaseConnection conn)
Returns the handler for the log table.SQLIntf
getSQL(AbstractDatabaseConnection conn)
Returns the generic SQL handler.String
globalInfo()
Returns a string describing the object.boolean
isSupported(AbstractDatabaseConnection conn)
Returns whether this connection is supported.-
Methods inherited from class adams.db.AbstractDbBackend
getProperties, getSingleton
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, 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.Destroyable
destroy
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel, setLoggingLevel
-
Methods inherited from interface adams.core.logging.LoggingSupporter
getLogger, isLoggingEnabled
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
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
-
isSupported
public boolean isSupported(AbstractDatabaseConnection conn)
Returns whether this connection is supported.- Parameters:
conn
- the database connection- Returns:
- always true
-
getSQL
public SQLIntf getSQL(AbstractDatabaseConnection conn)
Returns the generic SQL handler.- Parameters:
conn
- the database connection- Returns:
- the handler
-
getLog
public LogIntf getLog(AbstractDatabaseConnection conn)
Returns the handler for the log table.- Parameters:
conn
- the database connection- Returns:
- the handler
-
-