Skip to content

Commit

Permalink
- fix reindex event deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
psmagin committed Sep 4, 2024
1 parent 40cf203 commit 7471bdd
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.folio.search.model.event;

import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.List;
import lombok.Data;
import lombok.Getter;
Expand Down Expand Up @@ -27,5 +28,15 @@ public enum ReindexRecordType {
this.value = value;
this.entityType = entityType;
}

@JsonCreator
public static ReindexRecordType fromValue(String value) {
for (ReindexRecordType b : ReindexRecordType.values()) {
if (b.value.equalsIgnoreCase(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
}

0 comments on commit 7471bdd

Please sign in to comment.