Fri, 22 May 2020 16:21:59 +0200
some reformatting
universe@62 | 1 | /* |
universe@62 | 2 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
universe@62 | 3 | * |
universe@62 | 4 | * Copyright 2018 Mike Becker. All rights reserved. |
universe@62 | 5 | * |
universe@62 | 6 | * Redistribution and use in source and binary forms, with or without |
universe@62 | 7 | * modification, are permitted provided that the following conditions are met: |
universe@62 | 8 | * |
universe@62 | 9 | * 1. Redistributions of source code must retain the above copyright |
universe@62 | 10 | * notice, this list of conditions and the following disclaimer. |
universe@62 | 11 | * |
universe@62 | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
universe@62 | 13 | * notice, this list of conditions and the following disclaimer in the |
universe@62 | 14 | * documentation and/or other materials provided with the distribution. |
universe@62 | 15 | * |
universe@62 | 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
universe@62 | 17 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
universe@62 | 18 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
universe@62 | 19 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
universe@62 | 20 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
universe@62 | 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
universe@62 | 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
universe@62 | 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
universe@62 | 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
universe@62 | 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
universe@62 | 26 | * POSSIBILITY OF SUCH DAMAGE. |
universe@62 | 27 | * |
universe@62 | 28 | */ |
universe@62 | 29 | package de.uapcore.lightpit.entities; |
universe@62 | 30 | |
universe@62 | 31 | import java.sql.Date; |
universe@62 | 32 | import java.sql.Timestamp; |
universe@62 | 33 | import java.util.List; |
universe@62 | 34 | import java.util.Objects; |
universe@62 | 35 | |
universe@62 | 36 | public final class Issue { |
universe@62 | 37 | |
universe@62 | 38 | private final int id; |
universe@62 | 39 | private final Project project; |
universe@62 | 40 | |
universe@62 | 41 | private IssueStatus status; |
universe@62 | 42 | private IssueCategory category; |
universe@62 | 43 | |
universe@62 | 44 | private String subject; |
universe@62 | 45 | private String description; |
universe@62 | 46 | |
universe@62 | 47 | private List<Version> affectedVersions; |
universe@62 | 48 | private Version scheduledVersion; |
universe@62 | 49 | private Version resolvedVersion; |
universe@62 | 50 | |
universe@62 | 51 | private Timestamp created; |
universe@62 | 52 | private Timestamp updated; |
universe@62 | 53 | private Date eta; |
universe@62 | 54 | |
universe@62 | 55 | public Issue(int id, Project project) { |
universe@62 | 56 | this.id = id; |
universe@62 | 57 | this.project = project; |
universe@62 | 58 | } |
universe@62 | 59 | |
universe@62 | 60 | public int getId() { |
universe@62 | 61 | return id; |
universe@62 | 62 | } |
universe@62 | 63 | |
universe@62 | 64 | public Project getProject() { |
universe@62 | 65 | return project; |
universe@62 | 66 | } |
universe@62 | 67 | |
universe@62 | 68 | public IssueStatus getStatus() { |
universe@62 | 69 | return status; |
universe@62 | 70 | } |
universe@62 | 71 | |
universe@62 | 72 | public void setStatus(IssueStatus status) { |
universe@62 | 73 | this.status = status; |
universe@62 | 74 | } |
universe@62 | 75 | |
universe@62 | 76 | public IssueCategory getCategory() { |
universe@62 | 77 | return category; |
universe@62 | 78 | } |
universe@62 | 79 | |
universe@62 | 80 | public void setCategory(IssueCategory category) { |
universe@62 | 81 | this.category = category; |
universe@62 | 82 | } |
universe@62 | 83 | |
universe@62 | 84 | public String getSubject() { |
universe@62 | 85 | return subject; |
universe@62 | 86 | } |
universe@62 | 87 | |
universe@62 | 88 | public void setSubject(String subject) { |
universe@62 | 89 | this.subject = subject; |
universe@62 | 90 | } |
universe@62 | 91 | |
universe@62 | 92 | public String getDescription() { |
universe@62 | 93 | return description; |
universe@62 | 94 | } |
universe@62 | 95 | |
universe@62 | 96 | public void setDescription(String description) { |
universe@62 | 97 | this.description = description; |
universe@62 | 98 | } |
universe@62 | 99 | |
universe@62 | 100 | public List<Version> getAffectedVersions() { |
universe@62 | 101 | return affectedVersions; |
universe@62 | 102 | } |
universe@62 | 103 | |
universe@62 | 104 | public void setAffectedVersions(List<Version> affectedVersions) { |
universe@62 | 105 | this.affectedVersions = affectedVersions; |
universe@62 | 106 | } |
universe@62 | 107 | |
universe@62 | 108 | public Version getScheduledVersion() { |
universe@62 | 109 | return scheduledVersion; |
universe@62 | 110 | } |
universe@62 | 111 | |
universe@62 | 112 | public void setScheduledVersion(Version scheduledVersion) { |
universe@62 | 113 | this.scheduledVersion = scheduledVersion; |
universe@62 | 114 | } |
universe@62 | 115 | |
universe@62 | 116 | public Version getResolvedVersion() { |
universe@62 | 117 | return resolvedVersion; |
universe@62 | 118 | } |
universe@62 | 119 | |
universe@62 | 120 | public void setResolvedVersion(Version resolvedVersion) { |
universe@62 | 121 | this.resolvedVersion = resolvedVersion; |
universe@62 | 122 | } |
universe@62 | 123 | |
universe@62 | 124 | public Timestamp getCreated() { |
universe@62 | 125 | return created; |
universe@62 | 126 | } |
universe@62 | 127 | |
universe@62 | 128 | public void setCreated(Timestamp created) { |
universe@62 | 129 | this.created = created; |
universe@62 | 130 | } |
universe@62 | 131 | |
universe@62 | 132 | public Timestamp getUpdated() { |
universe@62 | 133 | return updated; |
universe@62 | 134 | } |
universe@62 | 135 | |
universe@62 | 136 | public void setUpdated(Timestamp updated) { |
universe@62 | 137 | this.updated = updated; |
universe@62 | 138 | } |
universe@62 | 139 | |
universe@62 | 140 | public Date getEta() { |
universe@62 | 141 | return eta; |
universe@62 | 142 | } |
universe@62 | 143 | |
universe@62 | 144 | public void setEta(Date eta) { |
universe@62 | 145 | this.eta = eta; |
universe@62 | 146 | } |
universe@62 | 147 | |
universe@62 | 148 | @Override |
universe@62 | 149 | public boolean equals(Object o) { |
universe@62 | 150 | if (this == o) return true; |
universe@62 | 151 | if (o == null || getClass() != o.getClass()) return false; |
universe@62 | 152 | Issue issue = (Issue) o; |
universe@62 | 153 | return id == issue.id; |
universe@62 | 154 | } |
universe@62 | 155 | |
universe@62 | 156 | @Override |
universe@62 | 157 | public int hashCode() { |
universe@62 | 158 | return Objects.hash(id); |
universe@62 | 159 | } |
universe@62 | 160 | } |