Serializable, Cloneable, Comparable<Entity>, Entitypublic class Version extends AbstractEntity implements Comparable<Entity>
A Version can only belong to 1 Project (composition).
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Version.VersionComparator |
Compares 2 Versions by major and minor number.
|
AbstractEntity.CreateDateComparator, AbstractEntity.IdComparator, AbstractEntity.LastModifiedDateComparator| Modifier and Type | Field | Description |
|---|---|---|
static Comparator<Version> |
VERSION_COMPARATOR |
CREATE_DATE_COMPARATOR, ID_COMPARATOR, LAST_MODIFIED_DATE_COMPARATOR| Constructor | Description |
|---|---|
Version() |
Default constructor (required by Hibernate).
|
Version(Project project,
String number) |
Creates a new active Version for the given Project.
|
| Modifier and Type | Method | Description |
|---|---|---|
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() |
clone, compareTo, equals, getCreateDate, getId, getLastModifiedDate, hashCode, isNew, setCreateDate, setId, setLastModifiedDatecompareTopublic static final Comparator<Version> VERSION_COMPARATOR
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 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 constantIllegalArgumentException - status is nullpublic void setVersionInfo(String versionInfo)
versionInfo - the version number string to useCopyright © 2002–2022 itracker. All rights reserved.