-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MODINV-1114 - Extend matching records endpoint to support multiple ma…
…rc-bib match results processing (#670) * Implemented support of multiple criterias for record matching endpoint * Removed no longer needed fallback query logic
- Loading branch information
1 parent
7a525da
commit 59b04d5
Showing
8 changed files
with
278 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
mod-source-record-storage-server/src/main/java/org/folio/dao/util/CompositeMatchField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.folio.dao.util; | ||
|
||
import org.folio.rest.jaxrs.model.RecordMatchingDto; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* The model of the field containing multiple MatchField that need to be matched. | ||
*/ | ||
public class CompositeMatchField { | ||
|
||
private final List<MatchField> matchFields; | ||
private final RecordMatchingDto.LogicalOperator logicalOperator; | ||
|
||
public CompositeMatchField(List<MatchField> matchFields, RecordMatchingDto.LogicalOperator logicalOperator) { | ||
this.matchFields = matchFields; | ||
this.logicalOperator = logicalOperator; | ||
} | ||
|
||
public List<MatchField> getMatchFields() { | ||
return matchFields; | ||
} | ||
|
||
public RecordMatchingDto.LogicalOperator getLogicalOperator() { | ||
return logicalOperator; | ||
} | ||
|
||
public boolean isDefaultField() { | ||
return matchFields.stream().allMatch(MatchField::isDefaultField); | ||
} | ||
|
||
} |
Oops, something went wrong.