001package com.thed.zblast.parser.model; 002 003import com.thed.model.ExecutionRequest; 004import com.thed.model.TestStep; 005 006import java.util.Date; 007import java.util.HashSet; 008import java.util.Set; 009 010public class TCRTestcase implements java.io.Serializable { 011 012 private static final long serialVersionUID = 8732164910146608715L; 013 private Long id; 014 private String name; 015 private String description; 016 private String priority; 017 private String tag; 018 private Date lastModifiedOn; 019 private Date creationDate; 020 private String comments; 021 private Long estimatedTime; 022 private Long userId; 023 private String externalId; 024 private Boolean automated; 025 private String scriptId; 026 private String scriptName; 027 private String scriptPath; 028 private Long releaseId; 029 private Set<Long> requirements = new HashSet<Long>(); 030 private Integer attachmentCount = null; 031 private Long oldId; 032 private Long projectId; 033 private TestStep testSteps; 034 035 private String metadataTCName; 036 private String metadataTCClassName; 037 private Long testcaseId; 038 039 private ExecutionRequest executionRequest; 040 041 public TCRTestcase() { 042 } 043 044 public Long getId() { 045 return this.id; 046 } 047 048 public void setId(Long id) { 049 this.id = id; 050 } 051 052 public String getName() { 053 return this.name; 054 } 055 056 public void setName(String name) { 057 this.name = name; 058 } 059 060 public String getDescription() { 061 return this.description; 062 } 063 064 public void setDescription(String description) { 065 this.description = description; 066 } 067 068 public Date getLastModifiedOn() { 069 return this.lastModifiedOn; 070 } 071 072 public void setLastModifiedOn(Date lastModifiedOn) { 073 this.lastModifiedOn = lastModifiedOn; 074 } 075 076 @Override 077 public boolean equals(Object other) { 078 if ((this == other)) 079 return true; 080 if ((other == null)) 081 return false; 082 if (!(other instanceof TCRTestcase)) 083 return false; 084 TCRTestcase castOther = (TCRTestcase) other; 085 return (this.getId().equals(castOther.getId())); 086 } 087 088 @Override 089 public int hashCode() { 090 int result = 17; 091 if (this.getId() != null) { 092 result = 37 * result + this.getId().intValue(); 093 } 094 return result; 095 } 096 097 public String getPriority() { 098 return priority; 099 } 100 101 public void setPriority(String priority) { 102 this.priority = priority; 103 } 104 105 public String getTag() { 106 return tag; 107 } 108 109 public void setTag(String tag) { 110 this.tag = tag; 111 } 112 113 public Date getCreationDate() { 114 return this.creationDate; 115 } 116 117 public void setCreationDate(Date creationDate) { 118 this.creationDate = creationDate; 119 } 120 121 public String getComments() { 122 return this.comments; 123 } 124 125 public void setComments(String comments) { 126 this.comments = comments; 127 } 128 129 public Long getEstimatedTime() { 130 return this.estimatedTime; 131 } 132 133 public void setEstimatedTime(Long estimatedTime) { 134 this.estimatedTime = estimatedTime; 135 } 136 137 /** 138 * @param tcrCatalogTreeTestcases 139 * the tcrCatalogTreeTestcases to set 140 */ 141 public Long getOldId() { 142 return oldId; 143 } 144 145 public void setOldId(Long oldId) { 146 this.oldId = oldId; 147 } 148 149 /** 150 * @return the automated 151 */ 152 public Boolean getAutomated() { 153 return automated; 154 } 155 156 /** 157 * If automated value is null returns false. 158 * 159 * @return 160 */ 161 public Boolean getAutomatedDefault() { 162 if (automated == null) { 163 return Boolean.FALSE; 164 } 165 return automated; 166 } 167 168 /** 169 * @param automated 170 * the automated to set 171 */ 172 public void setAutomated(Boolean automated) { 173 this.automated = automated; 174 } 175 176 /** 177 * @return the automated 178 */ 179 180 /** 181 * @return the scriptId 182 */ 183 public String getScriptId() { 184 return scriptId; 185 } 186 187 /** 188 * @param scriptId 189 * the scriptId to set 190 */ 191 public void setScriptId(String scriptId) { 192 this.scriptId = scriptId; 193 } 194 195 /** 196 * @return the scriptName 197 */ 198 public String getScriptName() { 199 return scriptName; 200 } 201 202 /** 203 * @param scriptName 204 * the scriptName to set 205 */ 206 public void setScriptName(String scriptName) { 207 this.scriptName = scriptName; 208 } 209 210 /** 211 * @return the scriptPath 212 */ 213 public String getScriptPath() { 214 return scriptPath; 215 } 216 217 /** 218 * @param scriptPath 219 * the scriptPath to set 220 */ 221 public void setScriptPath(String scriptPath) { 222 this.scriptPath = scriptPath; 223 } 224 225 public String getExternalId() { 226 return externalId; 227 } 228 229 public void setExternalId(String externalId) { 230 this.externalId = externalId; 231 } 232 233 234 /** 235 * <b>Description</b>: getter method for attribute <i>requirementIds</i> 236 * 237 * @return requirementIds 238 */ 239 public Set<Long> getRequirementIds() { 240 return this.requirements; 241 } 242 243 /** 244 * <b>Description</b>: setter method for attribute <i>requirementIds</i> 245 * 246 * @param requirements 247 */ 248 public void setRequirementIds(Set<Long> requirements) { 249 this.requirements = requirements; 250 } 251 252 /** 253 * @return the attachmentCount 254 */ 255 public Integer getAttachmentCount() { 256 return attachmentCount; 257 } 258 259 /** 260 * @param attachmentCount 261 * the attachmentCount to set 262 */ 263 public void setAttachmentCount(Integer attachmentCount) { 264 this.attachmentCount = attachmentCount; 265 } 266 267 /** 268 * @return the releaseId 269 */ 270 public Long getReleaseId() { 271 return releaseId; 272 } 273 274 /** 275 * @param releaseId 276 * the releaseId to set 277 */ 278 public void setReleaseId(Long releaseId) { 279 this.releaseId = releaseId; 280 } 281 282 283 public void setTcCreationDate(String tcCreationDate) { 284 } 285 286 287 public Long getProjectId() { 288 return projectId; 289 } 290 291 292 public void setProjectId(Long projectId) { 293 this.projectId = projectId; 294 } 295 296 public void setProjectAndReleaseForCopy(Long projectId,Long releaseId) { 297 this.projectId = projectId; 298 this.releaseId = releaseId; 299 } 300 301 public Long getUserId() { 302 return userId; 303 } 304 305 public void setUserId(Long userId) { 306 this.userId = userId; 307 } 308 309 public TestStep getTestSteps() { 310 return testSteps; 311 } 312 313 public void setTestSteps(TestStep testSteps) { 314 this.testSteps = testSteps; 315 } 316 317 public String getMetadataTCName() { 318 return metadataTCName; 319 } 320 321 public void setMetadataTCName(String metadataTCName) { 322 this.metadataTCName = metadataTCName; 323 } 324 325 public String getMetadataTCClassName() { 326 return metadataTCClassName; 327 } 328 329 public void setMetadataTCClassName(String metadataTCClassName) { 330 this.metadataTCClassName = metadataTCClassName; 331 } 332 333 public ExecutionRequest getExecutionRequest() { 334 return executionRequest; 335 } 336 337 public void setExecutionRequest(ExecutionRequest executionRequest) { 338 this.executionRequest = executionRequest; 339 } 340 341 public Long getTestcaseId() { 342 return testcaseId; 343 } 344 345 public void setTestcaseId(Long testcaseId) { 346 this.testcaseId = testcaseId; 347 } 348 349 @Override 350 public String toString() { 351 return "TCRTestcase [id=%s, name=%s, description=%s, priority=%s, tag=%s, lastModifiedOn=%s, creationDate=%s, comments=%s, estimatedTime=%s, userId=%s, externalId=%s, automated=%s, scriptId=%s, scriptName=%s, scriptPath=%s, releaseId=%s, requirements=%s, attachmentCount=%s, oldId=%s, projectId=%s, testSteps=%s, executionRequest=%s, metadataTCName=%s, metadataTCClassName=%s]".formatted(id, name, description, priority, tag, lastModifiedOn, creationDate, comments, estimatedTime, userId, externalId, automated, scriptId, scriptName, scriptPath, releaseId, requirements, attachmentCount, oldId, projectId, testSteps, executionRequest, metadataTCName, metadataTCClassName); 352 } 353 354}