org.radrails.db.internal.ui
Class Project

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

public class Project
extends java.lang.Object
implements IDatabaseElement

Represents a Project in the DataNavigator.

Version:
0.3.1
Author:
mbaumbach

Constructor Summary
Project(ProjectDatabaseManager pdm)
          Creates a new project.
 
Method Summary
 void addDatabase(Database database)
          Adds the specified database to this project.
 void clearDatabases()
          Clears all database belonging to this project.
 java.lang.Object[] getChildren()
          Gets all of the children of this element.
 java.util.Collection getDatabases()
          Gets all database belonging to this project.
 java.lang.String getName()
          Gets the name of the element.
 IDatabaseElement getParent()
          Gets the parent of this element.
 org.eclipse.core.resources.IProject getProject()
          Gets the IProject this Project represents.
 ProjectDatabaseManager getProjectDatabaseManager()
          Gets the ProjectDatabaseManager this project uses.
 boolean hasChildren()
          Checks if this object has any children.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Project

public Project(ProjectDatabaseManager pdm)
Creates a new project.

Parameters:
pdm - The ProjectDatabaseManager this project uses.
Method Detail

addDatabase

public void addDatabase(Database database)
Adds the specified database to this project.

Parameters:
database - The database to add.

getDatabases

public java.util.Collection getDatabases()
Gets all database belonging to this project.

Returns:
A Collection of the Databases.

clearDatabases

public void clearDatabases()
Clears all database belonging to this project.


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

getProject

public org.eclipse.core.resources.IProject getProject()
Gets the IProject this Project represents.

Returns:
The IProject this project represents.

getProjectDatabaseManager

public ProjectDatabaseManager getProjectDatabaseManager()
Gets the ProjectDatabaseManager this project uses.

Returns:
The ProjectDatabaseManager this project uses.

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