jimm.evote.db
Class VSDbEnv

java.lang.Object
  extended byjimm.evote.db.VSDbEnv

public class VSDbEnv
extends java.lang.Object

Handles setup and teardown of the database environment and databases. This includes creating the databases and secondary databases.


Field Summary
protected static java.lang.String BOOTH_DATABASE
          Name of Booth primary database.
protected static java.lang.String BOOTH_STATE_INDEX
          Name of Booth secondary database; the key is the state.
protected  SecondaryDatabase boothByStateDb
           
protected  Database boothDb
           
protected  Environment dbEnvironment
           
protected static java.lang.String VOTE_DATABASE
          Name of Vote primary database.
protected static java.lang.String VOTE_RACE_AND_PARTY_INDEX
          Name of Vote secondary database; the key is the race id plus the party id.
protected static java.lang.String VOTE_RACE_INDEX
          Name of Vote secondary database; the key is the race id.
protected  SecondaryDatabase voteByRaceAndPartyDb
           
protected  SecondaryDatabase voteByRaceDb
           
protected  Database voteDb
           
 
Constructor Summary
VSDbEnv(java.lang.String databaseDirectory, boolean readOnly)
           
 
Method Summary
 SecondaryDatabase getBoothByStateDb()
           
 Database getBoothDb()
           
 Environment getEnv()
           
 SecondaryDatabase getVoteByRaceAndPartyDb()
           
 SecondaryDatabase getVoteByRaceDb()
           
 Database getVoteDb()
           
 void shutDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOTH_DATABASE

protected static final java.lang.String BOOTH_DATABASE
Name of Booth primary database.

See Also:
Constant Field Values

VOTE_DATABASE

protected static final java.lang.String VOTE_DATABASE
Name of Vote primary database.

See Also:
Constant Field Values

BOOTH_STATE_INDEX

protected static final java.lang.String BOOTH_STATE_INDEX
Name of Booth secondary database; the key is the state.

See Also:
Constant Field Values

VOTE_RACE_INDEX

protected static final java.lang.String VOTE_RACE_INDEX
Name of Vote secondary database; the key is the race id.

See Also:
Constant Field Values

VOTE_RACE_AND_PARTY_INDEX

protected static final java.lang.String VOTE_RACE_AND_PARTY_INDEX
Name of Vote secondary database; the key is the race id plus the party id.

See Also:
Constant Field Values

dbEnvironment

protected Environment dbEnvironment

boothDb

protected Database boothDb

voteDb

protected Database voteDb

boothByStateDb

protected SecondaryDatabase boothByStateDb

voteByRaceDb

protected SecondaryDatabase voteByRaceDb

voteByRaceAndPartyDb

protected SecondaryDatabase voteByRaceAndPartyDb
Constructor Detail

VSDbEnv

public VSDbEnv(java.lang.String databaseDirectory,
               boolean readOnly)
Method Detail

getEnv

public Environment getEnv()

getBoothDb

public Database getBoothDb()

getBoothByStateDb

public SecondaryDatabase getBoothByStateDb()

getVoteDb

public Database getVoteDb()

getVoteByRaceDb

public SecondaryDatabase getVoteByRaceDb()

getVoteByRaceAndPartyDb

public SecondaryDatabase getVoteByRaceAndPartyDb()

shutDown

public void shutDown()


Copyright (c) 2004 by Jim Menard jimm@io.com