inescID.revs.database
Class DB_Counter
java.lang.Object
inescID.revs.database.CommonDatabase
inescID.revs.database.DB_ElectionConfiguration
inescID.revs.database.DB_Counter
- public class DB_Counter
- extends DB_ElectionConfiguration
Fields inherited from class inescID.revs.database.DB_ElectionConfiguration |
preCountElectionsByConfiguration, preDeleteConfiguration, preDeleteElection, preGetConfiguration, preGetConfigurationIdByDescription, preGetConfigurations, preGetConfigurationsIdDescription, preGetElection, preGetElectionIdByDescription, preGetElections, preGetElectionsByConfiguration, preGetElectionsIdDescription, preGetElectionsIdDescriptionByConfiguration, preGetLastId, preInsertConfiguration, preInsertElection, preUpdateConfiguration, preUpdateElection, preUpdateElectionKey |
Constructor Summary |
DB_Counter()
|
DB_Counter(java.lang.String db,
java.lang.String user,
java.lang.String password)
|
Methods inherited from class inescID.revs.database.DB_ElectionConfiguration |
alterTableConfiguration, alterTableElection, countElectionsByConfiguration, deleteConfiguration, deleteElection, getAvailableConfigurationId, getAvailableElectionId, getConfiguration, getConfigurationIdByDescription, getConfigurations, getConfigurationsIdDescription, getElection, getElectionIdByDescription, getElections, getElectionsByConfiguration, getElectionsIdDescription, getElectionsIdDescriptionByConfiguration, getLastID, init, prepareCount, prepareDelete, tableConfiguration, tableElection, updateElectionKey, verifyElectionPeriod |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
preInsertEncryptedVote
java.sql.PreparedStatement preInsertEncryptedVote
preUpdateVote
java.sql.PreparedStatement preUpdateVote
preGetVotes
java.sql.PreparedStatement preGetVotes
preGetEncryptedVotes
java.sql.PreparedStatement preGetEncryptedVotes
preGetEncryptedVotesByElection
java.sql.PreparedStatement preGetEncryptedVotesByElection
preGetVotesByElection
java.sql.PreparedStatement preGetVotesByElection
DB_Counter
public DB_Counter()
throws java.sql.SQLException
DB_Counter
public DB_Counter(java.lang.String db,
java.lang.String user,
java.lang.String password)
throws java.lang.ClassNotFoundException,
java.sql.SQLException,
java.security.NoSuchAlgorithmException
createTables
public void createTables(java.lang.String error)
- Overrides:
createTables
in class DB_ElectionConfiguration
removeTables
public void removeTables(java.lang.String error)
- Overrides:
removeTables
in class DB_ElectionConfiguration
tableVote
private void tableVote()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareInsert
protected void prepareInsert()
throws java.sql.SQLException
- Overrides:
prepareInsert
in class DB_ElectionConfiguration
- Throws:
java.sql.SQLException
insertVote
public void insertVote(int election,
byte[] encrypted_vote)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareUpdate
protected void prepareUpdate()
throws java.sql.SQLException
- Overrides:
prepareUpdate
in class DB_ElectionConfiguration
- Throws:
java.sql.SQLException
updateVote
public void updateVote(int id,
java.lang.String vote,
byte[] random_value,
AdministratorSignature[] signatures,
boolean valid)
throws java.sql.SQLException,
java.lang.Exception
- Throws:
java.sql.SQLException
java.lang.Exception
prepareGet
protected void prepareGet()
throws java.sql.SQLException
- Overrides:
prepareGet
in class DB_ElectionConfiguration
- Throws:
java.sql.SQLException
getVotes
public java.util.Vector getVotes()
throws java.sql.SQLException,
java.lang.Exception
- Throws:
java.sql.SQLException
java.lang.Exception
getVotesByElection
public java.util.Vector getVotesByElection(int election,
boolean valid)
throws java.sql.SQLException,
java.lang.Exception
- Throws:
java.sql.SQLException
java.lang.Exception
getEncryptedVotes
public java.util.Vector getEncryptedVotes()
throws java.sql.SQLException,
java.lang.Exception
- Throws:
java.sql.SQLException
java.lang.Exception
getEncryptedVotesByElection
public java.util.Vector getEncryptedVotesByElection(int election)
throws java.sql.SQLException,
java.lang.Exception
- Throws:
java.sql.SQLException
java.lang.Exception