Class MatchAttribute
java.lang.Object
com.aquima.interactions.matching.request.MatchAttribute
- All Implemented Interfaces:
IMatchableAttribute
This class is used by the match request to store a single attribute value that should be matched.
- Since:
- 6.2
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
MatchAttribute
(IValue attributeValue) protected
MatchAttribute
(IMatchableAttribute other, IPrimitiveValue newValue) -
Method Summary
Modifier and TypeMethodDescriptionint
This method returns the threshold for the attribute score.int
This method returns the score that should be used when one of the required values is unknown.getValue()
This method returns the value that should be matched.int
This method returns the weight of the attribute that should be used when calculating the match score.void
setThresholdPercentage
(int threshold) This method may be used to specify the threshold that should be used for this attribute.void
setUnknownPercentage
(int percentage) This method can be used to set the score that should be used when one of the required values is unknown.void
setWeight
(int weight) This method may be used to override the default weight of the attribute.
-
Constructor Details
-
MatchAttribute
-
MatchAttribute
-
-
Method Details
-
getValue
Description copied from interface:IMatchableAttribute
This method returns the value that should be matched.- Specified by:
getValue
in interfaceIMatchableAttribute
- Returns:
- the value that should be matched.
-
getUnknownPercentage
public int getUnknownPercentage()Description copied from interface:IMatchableAttribute
This method returns the score that should be used when one of the required values is unknown.- Specified by:
getUnknownPercentage
in interfaceIMatchableAttribute
- Returns:
- the score that should be used when one of the required values is unknown.
-
setUnknownPercentage
public void setUnknownPercentage(int percentage) Description copied from interface:IMatchableAttribute
This method can be used to set the score that should be used when one of the required values is unknown.- Specified by:
setUnknownPercentage
in interfaceIMatchableAttribute
- Parameters:
percentage
- the score that should be used when one of the required values is unknown.
-
getThresholdPercentage
public int getThresholdPercentage()Description copied from interface:IMatchableAttribute
This method returns the threshold for the attribute score. When the attribute scores less than the threshold, the case will be removed from consideration. The default threshold returned by this method is -1, indicating that the default as specified in the match engine should be used.- Specified by:
getThresholdPercentage
in interfaceIMatchableAttribute
- Returns:
- The threshold that should be used for this attribute.
-
setThresholdPercentage
public void setThresholdPercentage(int threshold) Description copied from interface:IMatchableAttribute
This method may be used to specify the threshold that should be used for this attribute. A threshold should be an integer ranging from zero to 100, where a value of zero means that the threshold should be disabled (as all attributes will at least score zero).- Specified by:
setThresholdPercentage
in interfaceIMatchableAttribute
- Parameters:
threshold
- The threshold that should be used when matching this attribute.
-
getWeight
public int getWeight()Description copied from interface:IMatchableAttribute
This method returns the weight of the attribute that should be used when calculating the match score. The default weight value if -1, indicating that the default weight value as specified in the match engine should be used.- Specified by:
getWeight
in interfaceIMatchableAttribute
- Returns:
- The weight that should be used when calculating a match score for this attribute.
-
setWeight
public void setWeight(int weight) Description copied from interface:IMatchableAttribute
This method may be used to override the default weight of the attribute. A weight value should be a non negative integer, with a weight of zero having a special meaning. When a weight value of zero is used, the attribute will still be matched, but the resulting score will not be part of the match score for the case. A weight value of zero is only relevant when the attribute has also specified a threshold greater than zero.- Specified by:
setWeight
in interfaceIMatchableAttribute
- Parameters:
weight
- The weight that should be used when calculating the match score.
-