inescID.revs.database
Class DB_ElectionConfiguration
java.lang.Object
inescID.revs.database.CommonDatabase
inescID.revs.database.DB_ElectionConfiguration
- Direct Known Subclasses:
- DB_Anonymizer, DB_Counter, DB_EC_Voters
- public class DB_ElectionConfiguration
- extends CommonDatabase
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
preInsertElection
java.sql.PreparedStatement preInsertElection
preInsertConfiguration
java.sql.PreparedStatement preInsertConfiguration
preUpdateElection
java.sql.PreparedStatement preUpdateElection
preUpdateElectionKey
java.sql.PreparedStatement preUpdateElectionKey
preUpdateConfiguration
java.sql.PreparedStatement preUpdateConfiguration
preGetElectionsIdDescription
java.sql.PreparedStatement preGetElectionsIdDescription
preGetElection
java.sql.PreparedStatement preGetElection
preGetElectionIdByDescription
java.sql.PreparedStatement preGetElectionIdByDescription
preGetElections
java.sql.PreparedStatement preGetElections
preGetElectionsByConfiguration
java.sql.PreparedStatement preGetElectionsByConfiguration
preGetElectionsIdDescriptionByConfiguration
java.sql.PreparedStatement preGetElectionsIdDescriptionByConfiguration
preGetConfigurationsIdDescription
java.sql.PreparedStatement preGetConfigurationsIdDescription
preGetConfiguration
java.sql.PreparedStatement preGetConfiguration
preGetConfigurationIdByDescription
java.sql.PreparedStatement preGetConfigurationIdByDescription
preGetConfigurations
java.sql.PreparedStatement preGetConfigurations
preDeleteElection
java.sql.PreparedStatement preDeleteElection
preDeleteConfiguration
java.sql.PreparedStatement preDeleteConfiguration
preGetLastId
java.sql.PreparedStatement preGetLastId
preCountElectionsByConfiguration
java.sql.PreparedStatement preCountElectionsByConfiguration
DB_ElectionConfiguration
public DB_ElectionConfiguration()
throws java.sql.SQLException
DB_ElectionConfiguration
public DB_ElectionConfiguration(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 CommonDatabase
removeTables
public void removeTables(java.lang.String error)
- Overrides:
removeTables
in class CommonDatabase
tableElection
protected void tableElection()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
tableConfiguration
protected void tableConfiguration()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareInsert
protected void prepareInsert()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareUpdate
protected void prepareUpdate()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
alterTableElection
public void alterTableElection(boolean update,
Election election)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
updateElectionKey
public void updateElectionKey(int election,
java.security.Key key)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
alterTableConfiguration
public void alterTableConfiguration(boolean update,
Configuration configuration)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareGet
protected void prepareGet()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getLastID
public int getLastID()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getElectionIdByDescription
public int getElectionIdByDescription(java.lang.String description)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getAvailableElectionId
public int getAvailableElectionId()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getAvailableConfigurationId
public int getAvailableConfigurationId()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getConfigurationIdByDescription
public int getConfigurationIdByDescription(java.lang.String description)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getElectionsIdDescription
public java.util.Vector getElectionsIdDescription()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getElectionsIdDescriptionByConfiguration
public java.util.Vector getElectionsIdDescriptionByConfiguration(int configuration)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getElection
public Election getElection(int id)
throws java.security.spec.InvalidKeySpecException,
java.sql.SQLException
- Throws:
java.security.spec.InvalidKeySpecException
java.sql.SQLException
getElectionsByConfiguration
public java.util.Vector getElectionsByConfiguration(int configuration)
throws java.security.spec.InvalidKeySpecException,
java.sql.SQLException
- Throws:
java.security.spec.InvalidKeySpecException
java.sql.SQLException
getElections
public java.util.Vector getElections()
throws java.security.spec.InvalidKeySpecException,
java.sql.SQLException
- Throws:
java.security.spec.InvalidKeySpecException
java.sql.SQLException
getConfigurationsIdDescription
public java.util.Vector getConfigurationsIdDescription()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getConfigurations
public java.util.Vector getConfigurations()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
getConfiguration
public Configuration getConfiguration(int id)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
prepareDelete
protected void prepareDelete()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
deleteElection
public void deleteElection(int id)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
deleteConfiguration
public int deleteConfiguration(int id)
throws java.lang.Exception
- Throws:
java.lang.Exception
prepareCount
void prepareCount()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
countElectionsByConfiguration
public int countElectionsByConfiguration(int id)
throws java.lang.Exception
- Throws:
java.lang.Exception
verifyElectionPeriod
public boolean verifyElectionPeriod(int election)
throws java.sql.SQLException,
java.security.spec.InvalidKeySpecException
- Throws:
java.sql.SQLException
java.security.spec.InvalidKeySpecException
init
public void init()
throws java.security.NoSuchAlgorithmException,
java.sql.SQLException
- Throws:
java.security.NoSuchAlgorithmException
java.sql.SQLException