org.radrails.db.internal.ui
Class Database

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

public class Database
extends java.lang.Object
implements IDatabaseElement

Represents a Database in the DataNavigator.

Version:
0.3.1
Author:
mbaumbach

Constructor Summary
Database(java.lang.String databaseName, Project parent)
          Creates a new Database.
 
Method Summary
 void addTable(Table table)
          Adds a table to this database.
 void clear()
          Clears this database of all tables.
 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 removeTable(Table table)
          Removes a table from this database.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Database

public Database(java.lang.String databaseName,
                Project parent)
Creates a new Database.

Parameters:
databaseName - The name of the database.
parent - The parent of the database.
Method Detail

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()

addTable

public void addTable(Table table)
Adds a table to this database.

Parameters:
table - The table to add.

removeTable

public void removeTable(Table table)
Removes a table from this database.

Parameters:
table - The table to remove.

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()

clear

public void clear()
Clears this database of all tables.