ERServer
Class DBase
java.lang.Object
|
+--ERServer.DBase
- public class DBase
- extends java.lang.Object
DBase creates databases, tables and interacts with these through JDBC and SQL.
Implementation of the databases is with
Hypersonic SQL which is written
totally in Java.
This implementation was created to support the demoonstration security
authorisation system. To implement a new (e.g. biometric) auth system
then you *WILL* need to change some SQL. It won't hurt.
- Version:
- 0.11 11 November 2000
- Author:
- Jason Kitcat
Constructor Summary |
DBase()
|
Method Summary |
protected static boolean |
checkER(java.lang.String name,
java.lang.String code,
java.lang.String pword)
checks Electoral Roll information against that in the database. |
protected static void |
confirmVoted(java.lang.String akey)
A little processor intensive and might need tuning but this method finds the user
entry in the Electoral Roll that matches the received key and sets it has having
voted. |
protected static void |
doSQL(java.lang.String sqlCommand)
executes the SQL command sent as a parameter and returns the result to DB Console. |
protected static void |
init()
initialises the Hypersonic SQL database. |
protected static void |
makeAllKeys()
Goes through all Electoral Roll data to create keys made with key 1 and writes them
to a file for export. |
protected static int |
usersVoted()
Counts how many people have voted. |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DBase
public DBase()
init
protected static void init()
- initialises the Hypersonic SQL database.
usersVoted
protected static int usersVoted()
throws java.lang.Exception
- Counts how many people have voted.
checkER
protected static boolean checkER(java.lang.String name,
java.lang.String code,
java.lang.String pword)
throws java.lang.Exception
- checks Electoral Roll information against that in the database.
- Parameters:
name
- String representing the voter's namecode
- String representing the voter's vote-specific codepword
- String representing the voter's password
confirmVoted
protected static void confirmVoted(java.lang.String akey)
throws java.lang.Exception
- A little processor intensive and might need tuning but this method finds the user
entry in the Electoral Roll that matches the received key and sets it has having
voted.
- Parameters:
name
- String representing the voter's namecode
- String representing the voter's vote-specific codepword
- String representing the voter's password
makeAllKeys
protected static void makeAllKeys()
throws java.lang.Exception
- Goes through all Electoral Roll data to create keys made with key 1 and writes them
to a file for export.
doSQL
protected static void doSQL(java.lang.String sqlCommand)
- executes the SQL command sent as a parameter and returns the result to DB Console.
- Parameters:
sqlCommand
- A string containing SQL