Package adams.db
Interface LogIntf
-
- All Superinterfaces:
TableInterface
public interface LogIntf extends TableInterface
Interface for tables for storing log messages.- Author:
- Fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static String
TABLE_NAME
the table name.
-
Method Summary
All Methods Instance Methods Abstract 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.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 interface adams.db.TableInterface
getTableName
-
-
-
-
Field Detail
-
TABLE_NAME
static final String TABLE_NAME
the table name.- See Also:
- Constant Field Values
-
-
Method Detail
-
load
LogEntry load(long auto_id)
Loads a log entry from db, using the database ID.- Parameters:
auto_id
- the auto_id to retrieve and field from- Returns:
- the log entry, null if not found
-
load
List<LogEntry> load(LogEntryConditions cond)
Loads log entries from the database that match the conditions.- Parameters:
cond
- the conditions for the entries to match- Returns:
- the log entries
-
exists
boolean exists(LogEntry log)
Looks for a log entry in the DB, looking for the auto_id.- Parameters:
log
- the log entry- Returns:
- true if a log entry already exists
-
add
boolean add(LogEntry log)
Adds a log entry.- Parameters:
log
- the log entry to add- Returns:
- true if insert successful or already present
-
update
boolean update(LogEntry log)
Updates a log entry.- Parameters:
log
- the log entry to update- Returns:
- true if update successful or false if not present
-
remove
boolean remove(LogEntry log)
Removes a log entry from the DB.- Parameters:
log
- the log entry- Returns:
- true if successful
-
-