@ThreadSafe public final class CountTable extends Object
Modifier and Type | Class and Description |
---|---|
class |
CountTable.PollView
A programmatic view of a count table restricted to a particular poll.
|
Modifier and Type | Field and Description |
---|---|
static String |
BASE_CANDIDATE_TAIL
A snippet of SQL "AND directVoterCount > 0 AND (isCycler OR NOT isCast)" that specifies a base candidate.
|
static String |
DART_SECTORED_TAIL
A snippet of SQL "AND dartSector != 0" that specifies a dart sectored node, suitable for
appending to a WHERE clause.
|
static String |
SCHEMA_NAME
The name of the table's schema.
|
Constructor and Description |
---|
CountTable(ReadyDirectory _readyDirectory,
Database _database)
Constructs a CountTable.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
create()
Creates this table in the database.
|
(package private) void |
createIndices()
Creates additional indices for this table.
|
(package private) Database |
database()
The database in which this table is stored.
|
(package private) boolean |
drop()
Drops this table from the database if it exists.
|
void |
put(CountNodeW node)
Stores a node.
|
ReadyDirectory |
readyDirectory()
The file-based counterpart to this table.
|
public static final String BASE_CANDIDATE_TAIL
public static final String DART_SECTORED_TAIL
public static final String SCHEMA_NAME
CountTable(ReadyDirectory _readyDirectory, Database _database) throws IOException, SQLException
IOException
SQLException
readyDirectory()
,
database()
final void create() throws SQLException
SQLException
final void createIndices() throws SQLException
SQLException
@Warning(value="thread restricted object") final Database database()
final boolean drop() throws SQLException
SQLException
public final void put(CountNodeW node) throws SQLException
SQLException
public final ReadyDirectory readyDirectory()