|
||||||||||
| 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.Version
public class Version
A Project version.
A Version can only belong to 1 Project (composition).
| Nested Class Summary | |
|---|---|
static class |
Version.VersionComparator
Compares 2 Versions by major and minor number. |
| Nested classes/interfaces inherited from class org.itracker.model.AbstractEntity |
|---|
AbstractEntity.CreateDateComparator, AbstractEntity.IdComparator, AbstractEntity.LastModifiedDateComparator |
| Field Summary | |
|---|---|
static Comparator<Version> |
VERSION_COMPARATOR
|
| Fields inherited from class org.itracker.model.AbstractEntity |
|---|
CREATE_DATE_COMPARATOR, ID_COMPARATOR, LAST_MODIFIED_DATE_COMPARATOR |
| Constructor Summary | |
|---|---|
Version()
Default constructor (required by Hibernate). |
|
Version(Project project,
String number)
Creates a new active Version for the given Project. |
|
| Method Summary | |
|---|---|
String |
getDescription()
|
int |
getMajor()
|
int |
getMinor()
|
String |
getNumber()
|
Project |
getProject()
|
Status |
getStatus()
Returns this version's status. |
void |
setDescription(String getDescription)
|
void |
setMajor(int getMajor)
|
void |
setMinor(int getMinor)
|
void |
setNumber(String getNumber)
|
void |
setProject(Project project)
|
void |
setStatus(Status status)
Sets this version's status. |
void |
setVersionInfo(String versionInfo)
Convience method to set the number, major and minor fields with a single call. |
String |
toString()
|
| 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<Version> VERSION_COMPARATOR
| Constructor Detail |
|---|
public Version()
PENDING: should be private so that it can only be used by
Hibernate, to ensure that project and number,
which form an instance's identity, are never null.
public Version(Project project,
String number)
project - project to which this version belongsnumber - unique within the project| Method Detail |
|---|
public int getMajor()
public void setMajor(int getMajor)
public int getMinor()
public void setMinor(int getMinor)
public String getNumber()
public void setNumber(String getNumber)
public String getDescription()
public void setDescription(String getDescription)
public Project getProject()
public void setProject(Project project)
public Status getStatus()
public void setStatus(Status status)
status - enum constant
IllegalArgumentException - status is nullpublic void setVersionInfo(String versionInfo)
versionInfo - the version number string to usepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||