Skip to content

Commit

Permalink
MAINT-2679 Add refsets filed to QueryConcept so that it can work with…
Browse files Browse the repository at this point in the history
… snowstorm-perf
  • Loading branch information
CoderMChu committed Oct 8, 2024
1 parent 965036a commit 7fd75f2
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public interface Fields {
String ATTR = "attr";
String ATTR_MAP = "attrMap";
String START = "start";
String REFSETS = "refsets";
}

@Field(type = FieldType.Keyword)
Expand All @@ -57,6 +58,9 @@ public interface Fields {
// groupNo:attr=value:attr=value,value|groupNo:attr=value:attr=value,value
private String attrMap;

@Field(type = FieldType.Long)
private Set<Long> refsets;

@Transient
private Map<Integer, Map<String, List<Object>>> groupedAttributesMap;

Expand All @@ -83,6 +87,7 @@ public QueryConcept(QueryConcept queryConcept) {
stated = queryConcept.stated;
attrMap = queryConcept.attrMap;
serializeGroupedAttributesMap();// Populates attr field
refsets = queryConcept.refsets;
}

public void clearAttributes() {
Expand Down Expand Up @@ -237,7 +242,8 @@ public void setStated(boolean stated) {
public boolean fieldsMatch(QueryConcept other) {
if (!this.equals(other)
|| !this.getParents().equals(other.getParents())
|| !this.getAncestors().equals(other.getAncestors())) {
|| !this.getAncestors().equals(other.getAncestors())
|| !Objects.equals(this.getRefsets(), other.getRefsets())) {
return false;
}
final Map<Integer, Map<String, List<Object>>> groupedAttributesMap = orEmpty(this.getGroupedAttributesMap());
Expand All @@ -260,6 +266,14 @@ public boolean isCreating() {
return creating;
}

public Set<Long> getRefsets() {
return refsets;
}

public void setRefsets(Set<Long> refsets) {
this.refsets = refsets;
}

@Override
public String toString() {
return "QueryConcept{" +
Expand Down

0 comments on commit 7fd75f2

Please sign in to comment.