com.atlassian.jira.issue.changehistory
Class ChangeHistoryItem

java.lang.Object
  extended by com.atlassian.jira.issue.changehistory.ChangeHistoryItem
All Implemented Interfaces:
Comparable<ChangeHistoryItem>

@Immutable
@PublicApi
public class ChangeHistoryItem
extends Object
implements Comparable<ChangeHistoryItem>

A simple holder for change items In 4.4 the behaviour of this domain object was changed to add support for changes that can can have multi value states for instance an affectedVersion could change from the state "4.4 4.4.1" -> "4.4 4.4.1 4.4.2" To this end end extra methods are added getFroms(), getTos() that return a map of all the changes in a single change item getFrom and getTo will return the first change in this list, this will not break behaviour for any of the supported single value fields. For Versions and other multi value fields the behaviour of getFrom(), getTo(), getFromValue() and get ToValue() will return only the first change in the map. It is preferred to use getFroms and getTos in this case. getFrom(), getTo(), getFromValue() and getToValue() are therefore all amrked as deprectaed and may be removed in future versions.

Since:
v4.3

Nested Class Summary
static class ChangeHistoryItem.Builder
           
 
Constructor Summary
ChangeHistoryItem(Long id, Long changeGroupId, Long projectId, Long issueId, String issueKey, String field, Timestamp created, String from, String to, String fromValue, String toValue, String user)
           
ChangeHistoryItem(Long id, Long changeGroupId, Long projectId, Long issueId, String issueKey, String field, Timestamp created, Timestamp nextChange, String from, String to, String fromValue, String toValue, String user)
           
 
Method Summary
 int compareTo(ChangeHistoryItem other)
           
 boolean containsFromValue(String fromValue)
           
 boolean containsToValue(String toValue)
           
 boolean equals(Object o)
           
 Long getChangeGroupId()
           
 Timestamp getCreated()
           
 Long getDuration()
           
 String getField()
           
 String getFrom()
          Deprecated. As of 4.4.2, prefer to use getFroms()
 Map<String,String> getFroms()
           
 String getFromValue()
          Deprecated. As of 4.4.2, prefer to use getFroms()
 Long getId()
           
 Long getIssueId()
           
 String getIssueKey()
           
 Timestamp getNextChangeCreated()
           
 Long getProjectId()
           
 String getTo()
          Deprecated. As of 4.4.2, prefer to use getTos()}
 Map<String,String> getTos()
           
 String getToValue()
          Deprecated. As of 4.4.2, prefer to use getTos()
 String getUser()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeHistoryItem

public ChangeHistoryItem(Long id,
                         Long changeGroupId,
                         Long projectId,
                         Long issueId,
                         String issueKey,
                         String field,
                         Timestamp created,
                         String from,
                         String to,
                         String fromValue,
                         String toValue,
                         String user)

ChangeHistoryItem

public ChangeHistoryItem(Long id,
                         Long changeGroupId,
                         Long projectId,
                         Long issueId,
                         String issueKey,
                         String field,
                         Timestamp created,
                         Timestamp nextChange,
                         String from,
                         String to,
                         String fromValue,
                         String toValue,
                         String user)
Method Detail

getId

public Long getId()

getChangeGroupId

public Long getChangeGroupId()

getUser

public String getUser()

getProjectId

public Long getProjectId()

getIssueId

public Long getIssueId()

getIssueKey

public String getIssueKey()

getCreated

public Timestamp getCreated()

getFrom

@Deprecated
public String getFrom()
Deprecated. As of 4.4.2, prefer to use getFroms()


getTo

@Deprecated
public String getTo()
Deprecated. As of 4.4.2, prefer to use getTos()}


getFromValue

@Deprecated
public String getFromValue()
Deprecated. As of 4.4.2, prefer to use getFroms()


getToValue

@Deprecated
public String getToValue()
Deprecated. As of 4.4.2, prefer to use getTos()


getFroms

public Map<String,String> getFroms()

getTos

public Map<String,String> getTos()

getField

public String getField()

getNextChangeCreated

public Timestamp getNextChangeCreated()

getDuration

public Long getDuration()

containsFromValue

public boolean containsFromValue(String fromValue)

containsToValue

public boolean containsToValue(String toValue)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(ChangeHistoryItem other)
Specified by:
compareTo in interface Comparable<ChangeHistoryItem>


Copyright © 2002-2012 Atlassian. All Rights Reserved.