Skip to content

Commit 7313faf

Browse files
committed
fix(pattern): add some getter/setter for regex in primary pattern
1 parent 5516a9c commit 7313faf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/main/java/com/redhat/podmortem/common/model/pattern/PrimaryPattern.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
package com.redhat.podmortem.common.model.pattern;
22

3+
import com.fasterxml.jackson.annotation.JsonIgnore;
34
import io.quarkus.runtime.annotations.RegisterForReflection;
45

56
@RegisterForReflection
67
public class PrimaryPattern {
78
private String regex;
89
private double confidence;
910

11+
@JsonIgnore private java.util.regex.Pattern compiledRegex;
12+
1013
public String getRegex() {
1114
return regex;
1215
}
@@ -22,4 +25,14 @@ public double getConfidence() {
2225
public void setConfidence(double confidence) {
2326
this.confidence = confidence;
2427
}
28+
29+
@JsonIgnore
30+
public java.util.regex.Pattern getCompiledRegex() {
31+
return compiledRegex;
32+
}
33+
34+
@JsonIgnore
35+
public void setCompiledRegex(java.util.regex.Pattern compiledRegex) {
36+
this.compiledRegex = compiledRegex;
37+
}
2538
}

0 commit comments

Comments
 (0)