Package adams.db.wrapper
Class AbstractWrapper<W extends TableInterface>
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.db.wrapper.AbstractWrapper<W>
-
- All Implemented Interfaces:
LoggingSupporter,SizeOfHandler,DatabaseConnectionProvider,DatabaseConnectionUser,TableInterface,Serializable
public abstract class AbstractWrapper<W extends TableInterface> extends LoggingObject implements TableInterface, DatabaseConnectionProvider
Ancestor for wrapper table classes.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDatabaseConnectionm_Connectionthe database connection.protected Stringm_TableNamethe table name.protected Wm_Wrappedthe wrapped backend.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractWrapper(AbstractDatabaseConnection dbcon, W wrapped)Initializes the wrapper.protectedAbstractWrapper(AbstractDatabaseConnection dbcon, W wrapped, String tableName)Initializes the wrapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractDatabaseConnectiongetDatabaseConnection()Returns the currently used database connection object, can be null.StringgetTableName()Get name of table.WgetWrapped()Returns the wrapped backend.-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Connection
protected AbstractDatabaseConnection m_Connection
the database connection.
-
m_Wrapped
protected W extends TableInterface m_Wrapped
the wrapped backend.
-
m_TableName
protected String m_TableName
the table name.
-
-
Constructor Detail
-
AbstractWrapper
protected AbstractWrapper(AbstractDatabaseConnection dbcon, W wrapped)
Initializes the wrapper.- Parameters:
dbcon- the database connectionwrapped- the wrapped backend
-
AbstractWrapper
protected AbstractWrapper(AbstractDatabaseConnection dbcon, W wrapped, String tableName)
Initializes the wrapper.- Parameters:
dbcon- the database connectionwrapped- the wrapped backend
-
-
Method Detail
-
getDatabaseConnection
public AbstractDatabaseConnection getDatabaseConnection()
Returns the currently used database connection object, can be null.- Specified by:
getDatabaseConnectionin interfaceDatabaseConnectionProvider- Returns:
- the current object
-
getTableName
public String getTableName()
Get name of table.- Specified by:
getTableNamein interfaceTableInterface- Returns:
- table name
-
getWrapped
public W getWrapped()
Returns the wrapped backend.- Returns:
- the backend
-
-