@ThreadSafe public final class DiffMessageTable extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_RESULTS
Maximum rows in the result.
|
static String |
SCHEMA_NAME
This is only exposed as a quick hint for somebody trying to understand
the database structure.
|
static String |
TABLE_NAME
This is only exposed as a quick hint for somebody trying to understand
the database structure.
|
| Constructor and Description |
|---|
DiffMessageTable(Database database)
Constructs a Table.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
create()
Creates this table in the database.
|
(package private) void |
drop()
Drops this table from the database.
|
boolean |
exists()
Returns true if this table exists in the database; false otherwise.
|
ResultSet |
get(String poll,
String[] users,
int id)
Query the table for the parameters.
|
(package private) Database |
getDatabase()
Returns the database in which this table is stored.
|
(package private) void |
put(AuthDiffMessage authMsg)
Stores a message.
|
int |
removeArchive(String archiveUrl)
Remove all stored messages for an archive selected by its archive url.
|
@Warning(value="non-Api") public static final String SCHEMA_NAME
@Warning(value="non-Api") public static final String TABLE_NAME
@Warning(value="non-Api") public static final int MAX_RESULTS
DiffMessageTable(Database database) throws SQLException
database - Database to connect to.SQLExceptionNoSuchAlgorithmExceptionvoid create() throws SQLException
SQLExceptionDatabase getDatabase()
void drop() throws SQLException
SQLExceptionpublic boolean exists() throws SQLException
SQLException@ThreadRestricted(value="rs holds lock on database") public ResultSet get(String poll, String[] users, int id) throws SQLException, AddressException
poll - poll-nameusers - mailish-username of one or two usersid - only fetch posts newer than idSQLExceptionAddressExceptionvoid put(AuthDiffMessage authMsg) throws SQLException
SQLExceptionpublic int removeArchive(String archiveUrl) throws SQLException
archiveUrl - SQLException