com.atlassian.jira.issue
Class IssueImpl

java.lang.Object
  extended by com.atlassian.jira.issue.AbstractIssue
      extended by com.atlassian.jira.issue.IssueImpl
All Implemented Interfaces:
IssueContext, Issue, MutableIssue, OfBizValueWrapper

public class IssueImpl
extends AbstractIssue
implements MutableIssue

Issue implementation which caches read data, and can persist its data to the database (via an Ofbiz GenericValue.

Since:
3.2

Field Summary
(package private)  boolean hasNoParentId
           
 
Fields inherited from class com.atlassian.jira.issue.AbstractIssue
attachmentManager, constantsManager, issueManager
 
Constructor Summary
IssueImpl(org.ofbiz.core.entity.GenericValue genericValue, IssueManager issueManager, ProjectManager projectManager, VersionManager versionManager, IssueSecurityLevelManager issueSecurityLevelManager, ConstantsManager constantsManager, SubTaskManager subTaskManager, AttachmentManager attachmentManager)
          Load an issue backed by the database.
IssueImpl(Issue issue, IssueManager issueManager, ProjectManager projectManager, VersionManager versionManager, IssueSecurityLevelManager issueSecurityLevelManager, ConstantsManager constantsManager, SubTaskManager subTaskManager, AttachmentManager attachmentManager)
          Create an issue, cloning another issue's data.
 
Method Summary
 boolean equals(Object o)
           
 Collection getAffectedVersions()
           
 User getAssignee()
           
 String getAssigneeId()
           
 Collection getComponents()
           
 Timestamp getCreated()
           
 Object getCustomFieldValue(CustomField customField)
           
 String getDescription()
           
 Timestamp getDueDate()
           
 String getEnvironment()
           
 Long getEstimate()
           
 Object getExternalFieldValue(String fieldId)
           
 Collection getFixVersions()
           
 org.ofbiz.core.entity.GenericValue getGenericValue()
          Get the backing GenericValue object.
 Long getId()
           
static MutableIssue getIssueObject(org.ofbiz.core.entity.GenericValue genericValue)
          Deprecated. You should construct this yourself if at all possible, or use IssueFactory.getIssue(org.ofbiz.core.entity.GenericValue) instead
 IssueRenderContext getIssueRenderContext()
           
 org.ofbiz.core.entity.GenericValue getIssueType()
           
 String getKey()
           
 Long getLong(String name)
          Retrieve a numeric field.
 Map getModifiedFields()
          Retrieve a map of issue fields whose values have been set (since object creation or last MutableIssue.resetModifiedFields() call.
 Long getOriginalEstimate()
           
 Long getParentId()
           
 org.ofbiz.core.entity.GenericValue getPriority()
           
 org.ofbiz.core.entity.GenericValue getProject()
           
 Project getProjectObject()
           
 User getReporter()
           
 String getReporterId()
           
 org.ofbiz.core.entity.GenericValue getResolution()
           
 org.ofbiz.core.entity.GenericValue getSecurityLevel()
           
 Long getSecurityLevelId()
           
 org.ofbiz.core.entity.GenericValue getStatus()
           
 String getString(String name)
          Retrieve a String field.
 Collection getSubTaskObjects()
          Gets all the issue's subtasks.
 Collection getSubTasks()
           
 String getSummary()
           
 Long getTimeSpent()
           
 Timestamp getTimestamp(String name)
          Retrieve a timestamp field.
 Timestamp getUpdated()
           
 Long getVotes()
           
 Long getWorkflowId()
           
 int hashCode()
           
 boolean isCreated()
           
 boolean isSubTask()
           
 void resetModifiedFields()
          Reset the internal list of modified fields.
 void setAffectedVersions(Collection affectedVersions)
           
 void setAssignee(User assignee)
           
 void setAssigneeId(String assigneeName)
           
 void setComponents(Collection components)
           
 void setCreated(Timestamp created)
           
 void setCustomFieldValue(CustomField customField, Object value)
          Sets a custom field value on this Issue Object, but does not write it to the database.
 void setDescription(String description)
           
 void setDueDate(Timestamp dueDate)
           
 void setEnvironment(String environment)
           
 void setEstimate(Long estimate)
           
 void setExternalFieldValue(String fieldId, Object value)
           
 void setFixVersions(Collection fixVersions)
           
 void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
           
 void setIssueTypeId(String issueTypeId)
          Set the issue type, by type id.
 void setKey(String key)
           
 void setOriginalEstimate(Long originalEstimate)
           
 void setParentId(Long parentId)
           
 void setPriority(org.ofbiz.core.entity.GenericValue priority)
           
 void setPriorityId(String priorityId)
           
 void setProject(org.ofbiz.core.entity.GenericValue project)
           
 void setReporter(User reporter)
           
 void setReporterId(String reporterId)
           
 void setResolution(org.ofbiz.core.entity.GenericValue resolution)
           
 void setResolutionId(String resolutionId)
           
 void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
           
 void setStatus(org.ofbiz.core.entity.GenericValue status)
           
 void setStatusId(String statusId)
          Set issue's status by status id ("1", "2" etc).
 void setSummary(String summary)
           
 void setTimeSpent(Long timespent)
           
 void setUpdated(Timestamp updated)
           
 void setVotes(Long votes)
           
 void setWorkflowId(Long workflowId)
           
 void store()
          Persist this object's immediate fields.
 String toString()
           
 
Methods inherited from class com.atlassian.jira.issue.AbstractIssue
getAttachments, getIssueTypeObject, getParent, getParentObject, getPriorityObject, getResolutionObject, getStatusObject, isEditable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.Issue
getAttachments, getIssueTypeObject, getParent, getParentObject, getPriorityObject, getResolutionObject, getStatusObject, isEditable
 

Field Detail

hasNoParentId

boolean hasNoParentId
Constructor Detail

IssueImpl

public IssueImpl(org.ofbiz.core.entity.GenericValue genericValue,
                 IssueManager issueManager,
                 ProjectManager projectManager,
                 VersionManager versionManager,
                 IssueSecurityLevelManager issueSecurityLevelManager,
                 ConstantsManager constantsManager,
                 SubTaskManager subTaskManager,
                 AttachmentManager attachmentManager)
Load an issue backed by the database.


IssueImpl

public IssueImpl(Issue issue,
                 IssueManager issueManager,
                 ProjectManager projectManager,
                 VersionManager versionManager,
                 IssueSecurityLevelManager issueSecurityLevelManager,
                 ConstantsManager constantsManager,
                 SubTaskManager subTaskManager,
                 AttachmentManager attachmentManager)
Create an issue, cloning another issue's data.

Method Detail

getIssueObject

public static MutableIssue getIssueObject(org.ofbiz.core.entity.GenericValue genericValue)
Deprecated. You should construct this yourself if at all possible, or use IssueFactory.getIssue(org.ofbiz.core.entity.GenericValue) instead

This is a static way of instantiating an Issue Object.

Parameters:
genericValue -

getId

public Long getId()
Specified by:
getId in interface Issue

getProject

public org.ofbiz.core.entity.GenericValue getProject()
Specified by:
getProject in interface IssueContext
Specified by:
getProject in interface Issue

getProjectObject

public Project getProjectObject()
Specified by:
getProjectObject in interface Issue

setProject

public void setProject(org.ofbiz.core.entity.GenericValue project)
Specified by:
setProject in interface MutableIssue

getIssueType

public org.ofbiz.core.entity.GenericValue getIssueType()
Specified by:
getIssueType in interface IssueContext
Specified by:
getIssueType in interface Issue

setIssueType

public void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
Specified by:
setIssueType in interface MutableIssue

setIssueTypeId

public void setIssueTypeId(String issueTypeId)
Set the issue type, by type id.

Specified by:
setIssueTypeId in interface MutableIssue

getSummary

public String getSummary()
Specified by:
getSummary in interface Issue

setSummary

public void setSummary(String summary)
Specified by:
setSummary in interface MutableIssue

getReporter

public User getReporter()
Specified by:
getReporter in interface Issue

getReporterId

public String getReporterId()
Specified by:
getReporterId in interface Issue

setReporter

public void setReporter(User reporter)
Specified by:
setReporter in interface MutableIssue

setReporterId

public void setReporterId(String reporterId)
Specified by:
setReporterId in interface MutableIssue

getDescription

public String getDescription()
Specified by:
getDescription in interface Issue

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface MutableIssue

getEnvironment

public String getEnvironment()
Specified by:
getEnvironment in interface Issue

setEnvironment

public void setEnvironment(String environment)
Specified by:
setEnvironment in interface MutableIssue

getAssignee

public User getAssignee()
Specified by:
getAssignee in interface Issue

getAssigneeId

public String getAssigneeId()
Specified by:
getAssigneeId in interface Issue

setAssignee

public void setAssignee(User assignee)
Specified by:
setAssignee in interface MutableIssue

setAssigneeId

public void setAssigneeId(String assigneeName)
Specified by:
setAssigneeId in interface MutableIssue

getComponents

public Collection getComponents()
Specified by:
getComponents in interface Issue
Returns:
A collection of component GenericValues.

setComponents

public void setComponents(Collection components)
Specified by:
setComponents in interface MutableIssue

getFixVersions

public Collection getFixVersions()
Specified by:
getFixVersions in interface Issue
Returns:
a collection of fix-for Version objects.

setFixVersions

public void setFixVersions(Collection fixVersions)
Specified by:
setFixVersions in interface MutableIssue
Parameters:
fixVersions - A collection of fix-for Version objects.

getDueDate

public Timestamp getDueDate()
Specified by:
getDueDate in interface Issue

setDueDate

public void setDueDate(Timestamp dueDate)
Specified by:
setDueDate in interface MutableIssue

getSecurityLevel

public org.ofbiz.core.entity.GenericValue getSecurityLevel()
Specified by:
getSecurityLevel in interface Issue

getSecurityLevelId

public Long getSecurityLevelId()
Specified by:
getSecurityLevelId in interface Issue

setSecurityLevel

public void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
Specified by:
setSecurityLevel in interface MutableIssue

getPriority

public org.ofbiz.core.entity.GenericValue getPriority()
Specified by:
getPriority in interface Issue

setPriority

public void setPriority(org.ofbiz.core.entity.GenericValue priority)
Specified by:
setPriority in interface MutableIssue

setPriorityId

public void setPriorityId(String priorityId)
Specified by:
setPriorityId in interface MutableIssue

getResolution

public org.ofbiz.core.entity.GenericValue getResolution()
Specified by:
getResolution in interface Issue

setResolutionId

public void setResolutionId(String resolutionId)
Specified by:
setResolutionId in interface MutableIssue

setResolution

public void setResolution(org.ofbiz.core.entity.GenericValue resolution)
Specified by:
setResolution in interface MutableIssue

getKey

public String getKey()
Specified by:
getKey in interface Issue

setKey

public void setKey(String key)
Specified by:
setKey in interface MutableIssue

getVotes

public Long getVotes()
Specified by:
getVotes in interface Issue

setVotes

public void setVotes(Long votes)
Specified by:
setVotes in interface MutableIssue

getAffectedVersions

public Collection getAffectedVersions()
Specified by:
getAffectedVersions in interface Issue
Returns:
a collection of 'affects' Version objects.

setAffectedVersions

public void setAffectedVersions(Collection affectedVersions)
Specified by:
setAffectedVersions in interface MutableIssue
Parameters:
affectedVersions - A collection of 'affects' Version objects.

getString

public String getString(String name)
Description copied from interface: OfBizValueWrapper
Retrieve a String field.

Specified by:
getString in interface OfBizValueWrapper

getTimestamp

public Timestamp getTimestamp(String name)
Description copied from interface: OfBizValueWrapper
Retrieve a timestamp field.

Specified by:
getTimestamp in interface OfBizValueWrapper

getLong

public Long getLong(String name)
Description copied from interface: OfBizValueWrapper
Retrieve a numeric field.

Specified by:
getLong in interface OfBizValueWrapper

getGenericValue

public org.ofbiz.core.entity.GenericValue getGenericValue()
Description copied from interface: OfBizValueWrapper
Get the backing GenericValue object.

Specified by:
getGenericValue in interface OfBizValueWrapper

getCreated

public Timestamp getCreated()
Specified by:
getCreated in interface Issue

setCreated

public void setCreated(Timestamp created)
Specified by:
setCreated in interface MutableIssue

getUpdated

public Timestamp getUpdated()
Specified by:
getUpdated in interface Issue

setUpdated

public void setUpdated(Timestamp updated)
Specified by:
setUpdated in interface MutableIssue

getWorkflowId

public Long getWorkflowId()
Specified by:
getWorkflowId in interface Issue

setWorkflowId

public void setWorkflowId(Long workflowId)
Specified by:
setWorkflowId in interface MutableIssue

getCustomFieldValue

public Object getCustomFieldValue(CustomField customField)
Specified by:
getCustomFieldValue in interface Issue
Returns:
A custom field's value. Will be a List, User, Timestamp etc, depending on custom field type.

setCustomFieldValue

public void setCustomFieldValue(CustomField customField,
                                Object value)
Description copied from interface: MutableIssue
Sets a custom field value on this Issue Object, but does not write it to the database. This is highly misleading.
To actually set a custom field value, use OrderableField.updateIssue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, MutableIssue, java.util.Map)

Specified by:
setCustomFieldValue in interface MutableIssue

getExternalFieldValue

public Object getExternalFieldValue(String fieldId)
Specified by:
getExternalFieldValue in interface Issue

setExternalFieldValue

public void setExternalFieldValue(String fieldId,
                                  Object value)
Specified by:
setExternalFieldValue in interface MutableIssue

isSubTask

public boolean isSubTask()
Specified by:
isSubTask in interface Issue

getParentId

public Long getParentId()
Specified by:
getParentId in interface Issue

setParentId

public void setParentId(Long parentId)
Specified by:
setParentId in interface MutableIssue

getSubTasks

public Collection getSubTasks()
Specified by:
getSubTasks in interface Issue

getSubTaskObjects

public Collection getSubTaskObjects()
Description copied from interface: Issue
Gets all the issue's subtasks.

Specified by:
getSubTaskObjects in interface Issue
Returns:
A collection of MutableIssues

isCreated

public boolean isCreated()
Specified by:
isCreated in interface Issue

getStatus

public org.ofbiz.core.entity.GenericValue getStatus()
Specified by:
getStatus in interface Issue

setStatusId

public void setStatusId(String statusId)
Description copied from interface: MutableIssue
Set issue's status by status id ("1", "2" etc).

Specified by:
setStatusId in interface MutableIssue

setStatus

public void setStatus(org.ofbiz.core.entity.GenericValue status)
Specified by:
setStatus in interface MutableIssue

getOriginalEstimate

public Long getOriginalEstimate()
Specified by:
getOriginalEstimate in interface Issue

setOriginalEstimate

public void setOriginalEstimate(Long originalEstimate)
Specified by:
setOriginalEstimate in interface MutableIssue

getEstimate

public Long getEstimate()
Specified by:
getEstimate in interface Issue

getTimeSpent

public Long getTimeSpent()
Specified by:
getTimeSpent in interface Issue

setTimeSpent

public void setTimeSpent(Long timespent)
Specified by:
setTimeSpent in interface MutableIssue

setEstimate

public void setEstimate(Long estimate)
Specified by:
setEstimate in interface MutableIssue

getIssueRenderContext

public IssueRenderContext getIssueRenderContext()
Specified by:
getIssueRenderContext in interface Issue

store

public void store()
Description copied from interface: OfBizValueWrapper
Persist this object's immediate fields.

Specified by:
store in interface OfBizValueWrapper

getModifiedFields

public Map getModifiedFields()
Description copied from interface: MutableIssue
Retrieve a map of issue fields whose values have been set (since object creation or last MutableIssue.resetModifiedFields() call.

Specified by:
getModifiedFields in interface MutableIssue
Returns:
A Map of key -> Object pairs, where keys are defined in IssueFieldConstants and objects are field-specific.

resetModifiedFields

public void resetModifiedFields()
Description copied from interface: MutableIssue
Reset the internal list of modified fields.

Specified by:
resetModifiedFields in interface MutableIssue
See Also:
MutableIssue.getModifiedFields()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2007 Atlassian. All Rights Reserved.