Package adams.db
Class LogF
-
- All Implemented Interfaces:
LoggingSupporter
,SizeOfHandler
,LogIntf
,TableInterface
,Serializable
public class LogF extends AbstractTableFacade implements LogIntf
Facade for logging backends.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected LogIntf
m_DB
the backend.protected static FacadeManager<LogF>
m_TableManager
the facade manager.-
Fields inherited from class adams.db.AbstractTableFacade
m_DatabaseConnection, m_Debug, m_TableName
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
Fields inherited from interface adams.db.LogIntf
TABLE_NAME
-
-
Constructor Summary
Constructors Constructor Description LogF(AbstractDatabaseConnection dbcon)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(LogEntry log)
Adds a log entry.boolean
exists(LogEntry log)
Looks for a log entry in the DB, looking for the auto_id.static LogF
getSingleton(AbstractDatabaseConnection dbcon)
Returns the singleton of the facade.LogEntry
load(long auto_id)
Loads a log entry from db, using the database ID.List<LogEntry>
load(LogEntryConditions cond)
Loads log entries from the database that match the conditions.boolean
remove(LogEntry log)
Removes a log entry from the DB.boolean
update(LogEntry log)
Updates a log entry.-
Methods inherited from class adams.db.AbstractTableFacade
getDatabaseConnection, getDebug, getTableName, reload, setDebug, updatePrefix
-
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, toString, wait, wait, wait
-
Methods inherited from interface adams.db.TableInterface
getTableName
-
-
-
-
Field Detail
-
m_TableManager
protected static FacadeManager<LogF> m_TableManager
the facade manager.
-
m_DB
protected LogIntf m_DB
the backend.
-
-
Constructor Detail
-
LogF
public LogF(AbstractDatabaseConnection dbcon)
Constructor.- Parameters:
dbcon
- the database context to use
-
-
Method Detail
-
load
public LogEntry load(long auto_id)
Loads a log entry from db, using the database ID.
-
load
public List<LogEntry> load(LogEntryConditions cond)
Loads log entries from the database that match the conditions.
-
exists
public boolean exists(LogEntry log)
Looks for a log entry in the DB, looking for the auto_id.
-
add
public boolean add(LogEntry log)
Adds a log entry.
-
update
public boolean update(LogEntry log)
Updates a log entry.
-
remove
public boolean remove(LogEntry log)
Removes a log entry from the DB.
-
getSingleton
public static LogF getSingleton(AbstractDatabaseConnection dbcon)
Returns the singleton of the facade.- Parameters:
dbcon
- the database connection to get the singleton for- Returns:
- the singleton
-
-