org.radrails.db.internal.ui
Class Table

java.lang.Object
  extended byorg.radrails.db.internal.ui.Table
All Implemented Interfaces:
IDatabaseElement

public class Table
extends java.lang.Object
implements IDatabaseElement

Represents a Table in the DataNavigator.

Version:
0.3.1
Author:
mbaumbach

Constructor Summary
Table(java.lang.String tableName, Database database)
          Creates a new Table.
 
Method Summary
 void addColumn(Column column)
          Adds a column to this table.
 java.lang.Object[] getChildren()
          Gets all of the children of this element.
 java.lang.String getName()
          Gets the name of the element.
 IDatabaseElement getParent()
          Gets the parent of this element.
 boolean hasChildren()
          Checks if this object has any children.
 void removeColumn(Column column)
          Removes a column from this 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,
             Database database)
Creates a new Table.

Parameters:
tableName - The name of the table.
database - The database this table belongs in.
Method Detail

addColumn

public void addColumn(Column column)
Adds a column to this table.

Parameters:
column - The column to add.

removeColumn

public void removeColumn(Column column)
Removes a column from this table.

Parameters:
column - The column to remove.

getParent

public IDatabaseElement getParent()
Description copied from interface: IDatabaseElement
Gets the parent of this element.

Specified by:
getParent in interface IDatabaseElement
Returns:
The IDatabaseElement that contains this element.
See Also:
IDatabaseElement.getParent()

getChildren

public java.lang.Object[] getChildren()
Description copied from interface: IDatabaseElement
Gets all of the children of this element.

Specified by:
getChildren in interface IDatabaseElement
Returns:
An Object[] of the children belonging to this element.
See Also:
IDatabaseElement.getChildren()

hasChildren

public boolean hasChildren()
Description copied from interface: IDatabaseElement
Checks if this object has any children.

Specified by:
hasChildren in interface IDatabaseElement
Returns:
true if this element has children, false otherwise.
See Also:
IDatabaseElement.hasChildren()

getName

public java.lang.String getName()
Description copied from interface: IDatabaseElement
Gets the name of the element.

Specified by:
getName in interface IDatabaseElement
Returns:
The name of the element.
See Also:
IDatabaseElement.getName()