PageRenderTime 37ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/src/main/java/com/atlassian/jconnect/rest/entities/IssueWithCommentsEntity.java

https://bitbucket.org/atlassian/jiraconnect-jiraplugin/
Java | 124 lines | 95 code | 27 blank | 2 comment | 0 complexity | e9974c1bbffa60c76dfd015fda1799b5 MD5 | raw file
  1. package com.atlassian.jconnect.rest.entities;
  2. import javax.xml.bind.annotation.*;
  3. import java.util.Date;
  4. import java.util.List;
  5. @XmlRootElement(name = "issuesWithComment")
  6. @XmlAccessorType(XmlAccessType.FIELD)
  7. public class IssueWithCommentsEntity
  8. {
  9. @XmlAttribute
  10. private String key;
  11. @XmlAttribute
  12. private String status;
  13. @XmlElement(name = "summary")
  14. private String summary;
  15. @XmlElement(name = "description")
  16. private String description;
  17. @XmlElement(name = "dateUpdated")
  18. private Date dateUpdated;
  19. // to prevent the need
  20. @XmlElement(name = "hasUpdates")
  21. private boolean hasUpdates;
  22. @XmlElement(name = "dateCreated")
  23. private Date dateCreated;
  24. @XmlElement(name = "comments")
  25. private List<CommentEntity> comments;
  26. private IssueWithCommentsEntity()
  27. {
  28. // for jersey
  29. }
  30. public IssueWithCommentsEntity(String key, String status, String summary, String description, Date created, Date lastUpdated, List<CommentEntity> comments, boolean hasUpdates)
  31. {
  32. this.key = key;
  33. this.status = status;
  34. this.summary = summary;
  35. this.description = description;
  36. this.dateCreated = created;
  37. this.dateUpdated = lastUpdated;
  38. this.comments = comments;
  39. this.hasUpdates = hasUpdates;
  40. }
  41. public String getKey()
  42. {
  43. return key;
  44. }
  45. public String getStatus()
  46. {
  47. return status;
  48. }
  49. public String getSummary()
  50. {
  51. return summary;
  52. }
  53. public String getDescription()
  54. {
  55. return description;
  56. }
  57. public List<CommentEntity> getComments()
  58. {
  59. return comments;
  60. }
  61. public Date getDateCreated()
  62. {
  63. return dateCreated;
  64. }
  65. public Date getDateUpdated()
  66. {
  67. return dateUpdated;
  68. }
  69. public boolean isHasUpdates()
  70. {
  71. return hasUpdates;
  72. }
  73. public void setKey(String key) {
  74. this.key = key;
  75. }
  76. public void setStatus(String status) {
  77. this.status = status;
  78. }
  79. public void setSummary(String summary) {
  80. this.summary = summary;
  81. }
  82. public void setDescription(String description) {
  83. this.description = description;
  84. }
  85. public void setDateUpdated(Date dateUpdated) {
  86. this.dateUpdated = dateUpdated;
  87. }
  88. public void setHasUpdates(boolean hasUpdates) {
  89. this.hasUpdates = hasUpdates;
  90. }
  91. public void setDateCreated(Date dateCreated) {
  92. this.dateCreated = dateCreated;
  93. }
  94. public void setComments(List<CommentEntity> comments) {
  95. this.comments = comments;
  96. }
  97. }