Serializable
, Cloneable
, Comparable<Entity>
, Entity
public class Component extends AbstractEntity implements Comparable<Entity>
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.
Modifier and Type | Class | Description |
---|---|---|
static class |
Component.ProjectNameComparator |
AbstractEntity.CreateDateComparator, AbstractEntity.IdComparator, AbstractEntity.LastModifiedDateComparator
Modifier and Type | Field | Description |
---|---|---|
static Comparator<Component> |
NAME_COMPARATOR |
|
static Comparator<Component> |
PROJECTNAME_COMPARATOR |
CREATE_DATE_COMPARATOR, ID_COMPARATOR, LAST_MODIFIED_DATE_COMPARATOR
Constructor | Description |
---|---|
Component() |
Default constructor (required by Hibernate).
|
Component(Project project,
String name) |
Creates a new active Component of the given name for the given Project.
|
Modifier and Type | Method | Description |
---|---|---|
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.
|
clone, compareTo, equals, getCreateDate, getId, getLastModifiedDate, hashCode, isNew, setCreateDate, setId, setLastModifiedDate
compareTo
public static final Comparator<Component> NAME_COMPARATOR
public static final Comparator<Component> PROJECTNAME_COMPARATOR
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 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 projectIllegalArgumentException
- 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 projectIllegalArgumentException
- null namepublic String getDescription()
public void setDescription(String description)
description
- descriptionpublic Status getStatus()
public void setStatus(Status status)
status
- enum valueIllegalArgumentException
- status
is nullCopyright © 2002–2019 itracker. All rights reserved.