uk.ac.ed.inf.utils.database
Class Table

java.lang.Object
  extended by uk.ac.ed.inf.utils.database.Table

public class Table
extends java.lang.Object

An SQL database table definition (table name + columns)

Version:
10 Jun 2010
Author:
Luna De Ferrari luna.deferrari-at-ed.ac.uk

Constructor Summary
Table(java.lang.String tableName, java.util.Vector<TableColumn> columns)
          List of primary key fields (starting from 0)
 
Method Summary
 java.util.Vector<java.lang.String> getColumnNames()
          Gets column names for the table
 java.util.Vector<TableColumn> getColumns()
          Get the TableColumn list
 java.lang.String getTableName()
          Get the table name
 boolean hasKey()
          Gets the "has primary key" status for the table
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Table

public Table(java.lang.String tableName,
             java.util.Vector<TableColumn> columns)
List of primary key fields (starting from 0)

Method Detail

getColumnNames

public java.util.Vector<java.lang.String> getColumnNames()
Gets column names for the table

Returns:
the column names

getColumns

public java.util.Vector<TableColumn> getColumns()
Get the TableColumn list

Returns:
the TableColumn list

getTableName

public java.lang.String getTableName()
Get the table name

Returns:
a string with the table name

hasKey

public boolean hasKey()
Gets the "has primary key" status for the table