-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathTest.java
79 lines (62 loc) · 1.58 KB
/
Test.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright 2021 iteratec GmbH
// SPDX-FileCopyrightText: 2023 iteratec GmbH
//
// SPDX-License-Identifier: Apache-2.0
package io.securecodebox.persistence.defectdojo.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Test extends DefectDojoModel {
@JsonProperty
Long id;
@JsonProperty
String title;
@JsonProperty
String description;
@JsonProperty("target_start")
String targetStart;
@JsonProperty("target_end")
String targetEnd;
@JsonProperty
@Builder.Default
List<String> tags = new LinkedList<>();
@JsonProperty("test_type")
Long testType;
@JsonProperty
Long lead;
@JsonProperty("percent_complete")
Long percentComplete;
@JsonProperty
Long engagement;
@JsonProperty
String version;
/**
* 1 Development
* 3 Production
*/
@JsonProperty
@Builder.Default
Long environment = 1L;
@Override
public boolean equalsQueryString(Map<String, Object> queryParams) {
if (queryParams.containsKey("id") && queryParams.get("id").equals(this.id)) {
return true;
}
if (queryParams.containsKey("title") && queryParams.get("title").equals(this.title)) {
return true;
}
if (queryParams.containsKey("engagement") && queryParams.get("engagement").equals(this.engagement)) {
return true;
}
return false;
}
}