votorola.a.register
Class ListNodeC.Table

java.lang.Object
  extended by ListNodeC.Table
Enclosing class:
ListNodeC

@ThreadSafe
public static final class ListNodeC.Table
extends Object

The relational store of voters, that (in part) backs a compiled voter list.

See Also:
TrustEdge.Table

Constructor Summary
ListNodeC.Table(ReadyDirectory readyDirectory, Database database)
          Constructs a Table.
 
Method Summary
(package private)  void create()
          Creates this table in the database.
(package private)  Database database()
          Returns the database in which this table is stored.
(package private)  void drop()
          Drops this table from the database.
(package private)  boolean exists()
          Returns true if this table exists in the database; false otherwise.
 ListNodeC get(String voterEmail)
          Retrieves a node from this table.
 ListNodeC getOrCreate(String voterEmail)
          Retrieves a node from this table; or, if none is stored, a default node.
(package private)  List<ListNode> getUnbarredNeighbours(String neighbourhoodPath)
          Retrieves a list of all unbarred nodes in the same leaf neighbourhood.
(package private)  void put(ListNodeC node, int[] trustEdgeCountArray)
          Stores a node.
(package private)  ReadyDirectory readyDirectory()
          The file-based counterpart to this table.
(package private)  void run(ListNodeC.Runner runner)
          Passes all nodes of this table through the specified runner.
 String schemaName()
          The name of this table's schema.
 String tableName()
          The name of this table.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListNodeC.Table

public ListNodeC.Table(ReadyDirectory readyDirectory,
                       Database database)
                throws IOException
Constructs a Table.

Parameters:
readyDirectory - per readyDirectory()
database - per database()
Throws:
IOException
Method Detail

create

void create()
      throws SQLException
Creates this table in the database.

Throws:
SQLException

database

Database database()
Returns the database in which this table is stored.


drop

void drop()
    throws SQLException
Drops this table from the database.

Throws:
SQLException

exists

boolean exists()
         throws SQLException
Returns true if this table exists in the database; false otherwise.

Throws:
SQLException

get

public ListNodeC get(String voterEmail)
              throws SQLException
Retrieves a node from this table.

Returns:
node as stored in the table; or null, if none is stored
Throws:
SQLException

getOrCreate

public ListNodeC getOrCreate(String voterEmail)
                      throws SQLException
Retrieves a node from this table; or, if none is stored, a default node.

Returns:
ListNodeC as stored in the table; or, if none is stored, a ListNodeIC with default values
Throws:
SQLException

getUnbarredNeighbours

final List<ListNode> getUnbarredNeighbours(String neighbourhoodPath)
                                    throws SQLException
Retrieves a list of all unbarred nodes in the same leaf neighbourhood. The list is pre-sorted by residential and email addresses.

Throws:
SQLException

put

void put(ListNodeC node,
         int[] trustEdgeCountArray)
   throws SQLException
Stores a node.

Throws:
SQLException

readyDirectory

ReadyDirectory readyDirectory()
The file-based counterpart to this table.


run

void run(ListNodeC.Runner runner)
   throws SQLException
Passes all nodes of this table through the specified runner.

Throws:
SQLException

schemaName

public String schemaName()
The name of this table's schema.


tableName

public String tableName()
The name of this table.