org.gswing.components.common.db
Class DbTable

java.lang.Object
  extended by org.gswing.components.common.db.DbTable

public class DbTable
extends Object

Purpose: Represents a database table.


Field Summary
static String ABBREVIATION
           
static String CANDIDATE_NO
           
static String CANDIDATE_TABLE
           
static String COMPLETE
           
static String CONSTITUENCY
           
static String CONSTITUENCY_NO
           
static String CONSTITUENCY_TABLE
           
static String CONSTITUENCY_TYPE
           
static String DATE
           
static String DOB
           
static String ELECTION_NO
           
static String ELECTION_TABLE
           
static String ELECTORATE
           
static String ELECTORATE_TABLE
           
static String FIRST_NAME
           
static String LEADERSHIP_TABLE
           
static String NAME
           
static String PARENT
           
static String PARTICIPANT
           
static String PARTY
           
static String PARTY_TABLE
           
static String SURNAME
           
static String SYSTEM
           
static String TYPE
           
static String URL
           
static String VOTE_LIST_TABLE
           
static String VOTE_TABLE
           
static String VOTES
           
 
Constructor Summary
DbTable(String name)
          Constructor.
 
Method Summary
 void addField(DbField field)
          Add a field to the table.
 DbField getField(int index)
          Get the field in this element.
 String getName()
          Get the name of this table.
 int getNumberOfFields()
          Get number of fields in the table.
 boolean hasPrimaryKey()
          Does this table have a primary key?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VOTE_TABLE

public static final String VOTE_TABLE
See Also:
Constant Field Values

VOTE_LIST_TABLE

public static final String VOTE_LIST_TABLE
See Also:
Constant Field Values

CONSTITUENCY

public static final String CONSTITUENCY
See Also:
Constant Field Values

ELECTION_NO

public static final String ELECTION_NO
See Also:
Constant Field Values

VOTES

public static final String VOTES
See Also:
Constant Field Values

PARTICIPANT

public static final String PARTICIPANT
See Also:
Constant Field Values

CANDIDATE_TABLE

public static final String CANDIDATE_TABLE
See Also:
Constant Field Values

CANDIDATE_NO

public static final String CANDIDATE_NO
See Also:
Constant Field Values

FIRST_NAME

public static final String FIRST_NAME
See Also:
Constant Field Values

SURNAME

public static final String SURNAME
See Also:
Constant Field Values

DOB

public static final String DOB
See Also:
Constant Field Values

PARTY

public static final String PARTY
See Also:
Constant Field Values

ELECTION_TABLE

public static final String ELECTION_TABLE
See Also:
Constant Field Values

NAME

public static final String NAME
See Also:
Constant Field Values

TYPE

public static final String TYPE
See Also:
Constant Field Values

DATE

public static final String DATE
See Also:
Constant Field Values

SYSTEM

public static final String SYSTEM
See Also:
Constant Field Values

COMPLETE

public static final String COMPLETE
See Also:
Constant Field Values

CONSTITUENCY_TABLE

public static final String CONSTITUENCY_TABLE
See Also:
Constant Field Values

CONSTITUENCY_NO

public static final String CONSTITUENCY_NO
See Also:
Constant Field Values

PARENT

public static final String PARENT
See Also:
Constant Field Values

CONSTITUENCY_TYPE

public static final String CONSTITUENCY_TYPE
See Also:
Constant Field Values

PARTY_TABLE

public static final String PARTY_TABLE
See Also:
Constant Field Values

ABBREVIATION

public static final String ABBREVIATION
See Also:
Constant Field Values

URL

public static final String URL
See Also:
Constant Field Values

ELECTORATE_TABLE

public static final String ELECTORATE_TABLE
See Also:
Constant Field Values

ELECTORATE

public static final String ELECTORATE
See Also:
Constant Field Values

LEADERSHIP_TABLE

public static final String LEADERSHIP_TABLE
See Also:
Constant Field Values
Constructor Detail

DbTable

public DbTable(String name)
Constructor.

Parameters:
name - The table name.
Method Detail

addField

public void addField(DbField field)
Add a field to the table.

Parameters:
field - The new database field to add to the table.

getNumberOfFields

public int getNumberOfFields()
Get number of fields in the table.

Returns:
The number of fields.

getName

public String getName()
Get the name of this table.

Returns:
The table name.

getField

public DbField getField(int index)
Get the field in this element.

Returns:
The field.

hasPrimaryKey

public boolean hasPrimaryKey()
Does this table have a primary key?

Returns:
True if this table has a primary key.


Copyright © 2008. All Rights Reserved.