no.ntnu.vegare.visualizer.client.db
Class SQLiteDatabase
java.lang.Object
no.ntnu.vegare.visualizer.client.db.AbstractLogDatabase
no.ntnu.vegare.visualizer.client.db.SQLiteDatabase
public class SQLiteDatabase
- extends AbstractLogDatabase
A simplified implementation of a SQLite database interface.
Uses SqliteJDBC (
http://www.zentus.com/sqlitejdbc/) to create an in-memory database, and
provides an interface to insert or load entries.
The database is cleared when the process dies.
- Author:
- vegare
Field Summary |
static java.lang.Object |
dbLock
|
Constructor Summary |
SQLiteDatabase()
Create an in-memory database and a table for log records. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dbLock
public static final java.lang.Object dbLock
SQLiteDatabase
public SQLiteDatabase()
- Create an in-memory database and a table for log records.
addEntries
public void addEntries(java.util.Collection<LogEntry> entries)
- Specified by:
addEntries
in class AbstractLogDatabase
getAll
public java.util.ArrayList<LogEntry> getAll()
- Return a list of all incidents in the database
- Specified by:
getAll
in class AbstractLogDatabase
query
public java.util.ArrayList<LogEntry> query(QueryFilter filter)
- Specified by:
query
in class AbstractLogDatabase