Serializable
, Cloneable
, Comparable<Entity>
, Entity
public class IssueField extends AbstractEntity
An IssueField can only belong to 1 Issue (composition).
CustomField
,
Serialized FormAbstractEntity.CreateDateComparator, AbstractEntity.IdComparator, AbstractEntity.LastModifiedDateComparator
CREATE_DATE_COMPARATOR, ID_COMPARATOR, LAST_MODIFIED_DATE_COMPARATOR
Constructor | Description |
---|---|
IssueField() |
Default constructor (required by Hibernate).
|
IssueField(Issue issue,
CustomField field) |
Modifier and Type | Method | Description |
---|---|---|
CustomField |
getCustomField() |
|
Date |
getDateValue() |
|
Integer |
getIntValue() |
|
Issue |
getIssue() |
|
String |
getStringValue() |
|
String |
getValue(Locale locale) |
Gets the custom field value as a String.
|
String |
getValue(ResourceBundle bundle) |
Deprecated.
this can not be in the entity, replace by Utility or service.
|
String |
getValue(ResourceBundle bundle,
Locale locale) |
Deprecated.
use getValue(ResourceBundle bundle) instead, locale is taken
from bundle
|
void |
setCustomField(CustomField customField) |
|
void |
setDateValue(Date dateValue) |
|
void |
setIntValue(Integer intValue) |
|
void |
setIssue(Issue issue) |
|
void |
setStringValue(String stringValue) |
|
void |
setValue(String value,
Locale locale,
ResourceBundle bundle) |
Deprecated.
locale is redundant set, in bundle and as separate parameter.
use
setValue(String, ResourceBundle)
instead |
void |
setValue(String value,
ResourceBundle bundle) |
Sets the custom field value.
|
String |
toString() |
clone, compareTo, equals, getCreateDate, getId, getLastModifiedDate, hashCode, isNew, setCreateDate, setId, setLastModifiedDate
public IssueField()
PENDING: should be private
so that it can only be used by
Hibernate, to ensure that the fields which form an instance's identity
are always initialized/never null.
public IssueField(Issue issue, CustomField field)
public Issue getIssue()
public void setIssue(Issue issue)
public CustomField getCustomField()
public void setCustomField(CustomField customField)
public String getStringValue()
public void setStringValue(String stringValue)
public Integer getIntValue()
public void setIntValue(Integer intValue)
public Date getDateValue()
public void setDateValue(Date dateValue)
public String getValue(Locale locale)
locale
- the locale used for any string formattingpublic String getValue(ResourceBundle bundle, Locale locale)
bundle
- a resource bundle to use for any string formattinglocale
- a locale to use for any string formattingpublic String getValue(ResourceBundle bundle)
bundle
- a resource bundle to use for any string formattingpublic void setValue(String value, Locale locale, ResourceBundle bundle) throws org.itracker.IssueException
setValue(String, ResourceBundle)
insteadTakes a string and then converts the value to the appropriate type based on the defined field type.
TODO : throw IllegalArgumentException instead of IssueException ?value
- the value to set this field to as a stringlocale
- the locale used for any string formattingbundle
- the ResourceBundle used for any string formattingorg.itracker.IssueException
- represents an error formatting or parsing the valuepublic void setValue(String value, ResourceBundle bundle) throws org.itracker.IssueException
Takes a string and then converts the value to the appropriate type based on the defined field type.
TODO : throw IllegalArgumentException instead of IssueException ?value
- the value to set this field to as a stringbundle
- the ResourceBundle used for any string formattingorg.itracker.IssueException
- represents an error formatting or parsing the valueCopyright © 2002–2019 itracker. All rights reserved.