public class CountTable.PollView extends Object
Modifier and Type | Field and Description |
---|---|
(package private) String |
serviceName |
Constructor and Description |
---|
CountTable.PollView(String _serviceName)
Creates a PollView.
|
Modifier and Type | Method and Description |
---|---|
long |
countBaseCandidates()
Returns the number of nodes that are base candidates.
|
CountNodeW |
get(String email)
Retrieves a node from this view.
|
ResultSet |
getByIndeces()
Retrieves the primary indeces (email) of all nodes in this view.
|
CountNodeW |
getOrCreate(String email)
Retrieves a node from this view, or, if none is stored, a CountNodeIC with default values.
|
List<CountNodeW> |
listByRankIndeces(long first,
long lastBound)
Retrieves a list of nodes by rank indeces.
|
void |
run(String sqlTail,
CountNodeW.Runner runner)
Pass all nodes of this view through the specified runner.
|
void |
runCasters(String candidateEmail,
String sqlTail,
CountNodeW.Runner runner)
Pass through the specified runner all nodes that are voting directly for the
specified candidate.
|
void |
runGroup(String groupCandidateEmail,
String sqlTail,
CountNodeW.Runner runner)
Pass through the specified runner all nodes of a group centered on a
candidate.
|
CountTable |
table()
The larger table of this view.
|
final String serviceName
CountTable.PollView(String _serviceName)
_serviceName
- the identifier of the pollpublic final long countBaseCandidates() throws SQLException
SQLException
public CountNodeW get(String email) throws SQLException, XMLStreamException
SQLException
XMLStreamException
@ThreadRestricted(value="holds CountTable.this.database") public ResultSet getByIndeces() throws SQLException
SQLException
public CountNodeW getOrCreate(String email) throws SQLException, XMLStreamException
SQLException
XMLStreamException
public final List<CountNodeW> listByRankIndeces(long first, long lastBound) throws SQLException, XMLStreamException
SQLException
XMLStreamException
public final void run(String sqlTail, CountNodeW.Runner runner) throws SQLException, XMLStreamException
sqlTail
- the tail of the SQL command for appending after the WHERE
clause. This is currently mandatory only because all clients require it
anyway.SQLException
XMLStreamException
public final void runCasters(String candidateEmail, String sqlTail, CountNodeW.Runner runner) throws SQLException, XMLStreamException
sqlTail
- the tail of the SQL command for appending after the WHERE
clause. This is formally mandatory only because all clients happen to
require it.SQLException
XMLStreamException
public final void runGroup(String groupCandidateEmail, String sqlTail, CountNodeW.Runner runner) throws SQLException, XMLStreamException
sqlTail
- the tail of the SQL command for appending after the WHERE
clause. This is formally mandatory only because all clients happen to
require it. The tail must end with a right bracket ')'.SQLException
XMLStreamException
public final CountTable table()