|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDbReadAccess
Database read access object.
| Method Summary | |
|---|---|
int |
getCandidateNo(Candidate candidate)
Get the unique candidate number of a candidate. |
Vector<Candidate> |
getCandidates()
Get all candidates in the database. |
List<SimpleConstituency> |
getConstituencies(Election election)
Fetch all constituencies taking part in particular election. |
Constituency |
getConstituency(String constituencyName,
char type)
Get the constituency for this constituency name and type. |
Constituency |
getConstituency(String constituencyName,
String parent)
Get the unique constituency number for this constituency. |
Election |
getElection(int electionNo)
Get the election details for a particular election. |
Vector |
getElectionDates(Constituency constituency)
Get election dates that have taken place in this constituency. |
Vector<Election> |
getElections()
Get all elections in the database. |
Vector |
getElections(boolean includeByElections,
char type)
Get all elections in the database. |
int |
getElectorate(int electionNo)
Get the total size of the electorate for this election. |
Election |
getLatestDate(Constituency constituency)
Get the election of the latest result for this constituency. |
Vector |
getLeaders(Election election)
Get list of leaders (as candidates) for this election. |
Vector |
getLeaders(Election election,
int constituencyNo)
Get list of leaders (as candidates) for a local election. |
Result |
getNextResult(Result oldResult)
Gets the next result. |
int |
getNoOfCandidates()
Get number of candidates in the database. |
int |
getNoOfParties()
Get the number of parties in the database. |
Vector<Party> |
getParties()
Get all party objects in the database. |
Party |
getParty(String abbreviation)
Get the party name from an abbreviation. |
String |
getPartyAbbreviation(String party)
Get the abbreviated party name from the full name. |
Result |
getPreviousResult(Result oldResult,
ResultKey key)
Gets the previous result. |
Result |
getResult(ResultKey key)
Get a result for this constituency on this date. |
int |
getVotesCast(Constituency constituency,
Election election)
Fetch the number of votes cast in a constituency for a particular election. |
boolean |
partyExists(String party,
boolean isAbbreviation)
Does this party exist in the database? |
boolean |
resultExists(Election election,
int candidateNo,
String constituency)
Check whether this result exists in the database. |
boolean |
resultExists(Election election,
String participant,
String constituency)
Check whether this result exists in the database. |
boolean |
tableExists(String tableName)
Check whether a particular table exists in this database. |
| Methods inherited from interface org.gswing.components.common.gui.IConstituencyBrowsing |
|---|
getConstituencyList, getRegionList, getState |
| Method Detail |
|---|
Vector<Candidate> getCandidates()
Constituency getConstituency(String constituencyName,
char type)
constituencyName - The constituency name.type - The constituency type.
Constituency getConstituency(String constituencyName,
String parent)
constituencyName - The constituency name.parent - The constituency's parent name.
List<SimpleConstituency> getConstituencies(Election election)
election - The election object.
int getCandidateNo(Candidate candidate)
candidate - The object containing candidate details.
Election getElection(int electionNo)
electionNo - The unique election number.
Vector getElectionDates(Constituency constituency)
constituency - The constituency reference.
Vector getElections(boolean includeByElections,
char type)
includeByElections - Should by-elections be included in list.type - The election type - Result.NATIONAL, Result.REGIONAL,
Result.COUNCIL, Result.CONSTITUENCY or Result.LOCAL
Vector<Election> getElections()
int getElectorate(int electionNo)
electionNo - The unique election number.
Election getLatestDate(Constituency constituency)
constituency - The constituency reference
Vector getLeaders(Election election)
election - The election object.
Vector getLeaders(Election election,
int constituencyNo)
election - The election object.constituencyNo - The constituency no of council.
Result getNextResult(Result oldResult)
oldResult - The current result.
int getNoOfCandidates()
int getNoOfParties()
Vector<Party> getParties()
String getPartyAbbreviation(String party)
party - The party's full name.
Party getParty(String abbreviation)
abbreviation - The party's abbreviation.
Result getPreviousResult(Result oldResult,
ResultKey key)
oldResult - The current result.key - The data that makes an election result unique.
Result getResult(ResultKey key)
key - The data that makes an election result unique.
int getVotesCast(Constituency constituency,
Election election)
constituency - The constituency object.election - The election object.
boolean partyExists(String party,
boolean isAbbreviation)
party - The party name.isAbbreviation - Whether the party name is abbreviated or full.
boolean resultExists(Election election,
int candidateNo,
String constituency)
election - The election referencecandidateNo - The unique candidate number.constituency - The constituency name.
boolean resultExists(Election election,
String participant,
String constituency)
election - The election reference.participant - The election participant.constituency - The constituency name.
boolean tableExists(String tableName)
tableName - The name of the table to check.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||