Class MatchResult
java.lang.Object
com.aquima.interactions.matching.result.MatchResult
- All Implemented Interfaces:
IMatchResult
This class is used to return the result of match action.
- Since:
- 6.2
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsConstructorDescriptionMatchResult
(int maxResults, int threshold, boolean useKeyField, int maxKeyResults) Constructs the match result with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addMatchScore
(String id, int percentage) This method will be invoked to add a single match result without a key field.void
addMatchScore
(String id, int percentage, ISingleValue keyField) This method will be invoked to add a single match result with a key field.This method returns all the matches from this match result.int
This method returns the maximum number of results that may be present in this result class.int
This method returns the number of match results.This method returns the matches for the specified key field value.int
This method returns the minimum score a case should have in order to be included in the result.This method returns the key field values that are used to group the results on.boolean
This method returns a boolean indicating if key-field grouping should be used.
-
Constructor Details
-
MatchResult
public MatchResult(int maxResults, int threshold, boolean useKeyField, int maxKeyResults) Constructs the match result with the required arguments.- Parameters:
maxResults
- The maximum number of results that may be present.threshold
- The minimum score that is required for cases in order to be allowed in the result.useKeyField
- Boolean indicating if a key-field should be used to group results on.maxKeyResults
- The maximum number of cases that may be grouped together under the same key.
-
-
Method Details
-
addMatchScore
This method will be invoked to add a single match result without a key field.- Parameters:
id
- The id of the case for which the score is added.percentage
- The score of the case.
-
addMatchScore
This method will be invoked to add a single match result with a key field.- Parameters:
id
- The id of the case for which the score is added.percentage
- The score of the case.keyField
- The key field value of the case.
-
getMaxResults
public int getMaxResults()This method returns the maximum number of results that may be present in this result class.- Returns:
- the maximum number of results that may be present in this result class.
-
getThreshold
public int getThreshold()This method returns the minimum score a case should have in order to be included in the result.- Returns:
- the minimum score a case should have in order to be included in the result.
-
getUseKeyField
public boolean getUseKeyField()This method returns a boolean indicating if key-field grouping should be used.- Returns:
- a boolean indicating if key-field grouping should be used.
-
getMatches
Description copied from interface:IMatchResult
This method returns all the matches from this match result.- Specified by:
getMatches
in interfaceIMatchResult
- Returns:
- Array containing all the matches of this match result.
-
getScoreCount
public int getScoreCount()Description copied from interface:IMatchResult
This method returns the number of match results.- Specified by:
getScoreCount
in interfaceIMatchResult
- Returns:
- the number of match results.
-
getScoresForKey
Description copied from interface:IMatchResult
This method returns the matches for the specified key field value. This method is only relevant when a key field has been used when matching.- Specified by:
getScoresForKey
in interfaceIMatchResult
- Parameters:
key
- The key field value for which the match scores are requested.- Returns:
- Array containing the matches for the specified key field value.
-
getUniqueKeys
Description copied from interface:IMatchResult
This method returns the key field values that are used to group the results on. This method is only relevant when a key field is used during the match.- Specified by:
getUniqueKeys
in interfaceIMatchResult
- Returns:
- Array containing the key field values the results are grouped on.
-