|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.itracker.model.AbstractEntity
org.itracker.model.Component
public class Component
Models a project component.
A Component is a project subdivision, like a sub-project or functional area,
...
It is identified by a unique name within the project to which it belongs
(composition).
e.g.: core, web-ui, swing-ui, help, ...
A component cannot have sub-components, unlike categories and sub-categories that exist in some issue tracking systems.
| Nested Class Summary | |
|---|---|
static class |
Component.ProjectNameComparator
|
| Nested classes/interfaces inherited from class org.itracker.model.AbstractEntity |
|---|
AbstractEntity.CreateDateComparator, AbstractEntity.IdComparator, AbstractEntity.LastModifiedDateComparator |
| Field Summary | |
|---|---|
static Comparator<Component> |
NAME_COMPARATOR
|
static Comparator<Component> |
PROJECTNAME_COMPARATOR
|
| Fields inherited from class org.itracker.model.AbstractEntity |
|---|
CREATE_DATE_COMPARATOR, ID_COMPARATOR, LAST_MODIFIED_DATE_COMPARATOR |
| Constructor Summary | |
|---|---|
Component()
Default constructor (required by Hibernate). |
|
Component(Project project,
String name)
Creates a new active Component of the given name for the given Project. |
|
| Method Summary | |
|---|---|
String |
getDescription()
Returns this component's description. |
String |
getName()
Returns this component's name. |
Project |
getProject()
Returns the project owning this component. |
Status |
getStatus()
Returns this component's status. |
void |
setDescription(String description)
Sets this component's description. |
void |
setName(String name)
Sets this component's name. |
void |
setProject(Project project)
Sets the project owning this component. |
void |
setStatus(Status status)
Sets this component's status. |
String |
toString()
Returns contatanation of system ID and object natural key. |
| Methods inherited from class org.itracker.model.AbstractEntity |
|---|
clone, compareTo, equals, getCreateDate, getId, getLastModifiedDate, hashCode, isNew, setCreateDate, setId, setLastModifiedDate |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
public static final Comparator<Component> NAME_COMPARATOR
public static final Comparator<Component> PROJECTNAME_COMPARATOR
| Constructor Detail |
|---|
public Component()
PENDING: should be private so that it can only be used by
Hibernate, to ensure that project and name,
which form an instance's identity, are never null.
public Component(Project project,
String name)
project - owning this componentname - unique component name within the project| Method Detail |
|---|
public Project getProject()
public void setProject(Project project)
PENDING: The project shouldn't be modified because it is part of a component's natural key and is used in the equals method!
project - parent project
IllegalArgumentException - null projectpublic String getName()
public void setName(String name)
PENDING: The name shouldn't be modified because it is part of a component's natural key and is used in the equals method!
name - unique name within the parent project
IllegalArgumentException - null namepublic String getDescription()
public void setDescription(String description)
description - descriptionpublic Status getStatus()
public void setStatus(Status status)
status - enum value
IllegalArgumentException - status is nullpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||