Class MatchRequest
java.lang.Object
com.aquima.interactions.matching.request.MatchInstance
com.aquima.interactions.matching.request.MatchRequest
- All Implemented Interfaces:
IMatchableInstance
,IMatchRequest
Default match request implementation. The match request can be initialized from an entity instance, optionally using
an attribute filter.
- Since:
- 6.2
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsConstructorDescriptionMatchRequest
(IEntityDefinition entity, String name) Constructs the match request using an entity definition.MatchRequest
(IEntityInstance instance) Constructs the match request using the values from the provided instance.MatchRequest
(IEntityInstance instance, IAttributeFilter filter) Constructs the match request using the values from the provided instance. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the attribute that should be used to group matching cases on.int
This method returns the maximum number of results that should be stored for each unique key field value.int
This method returns the maximum number of matching cases that should be returned as a result of the match action.void
setKeyField
(String attribute, int maxResults) This method may be used to override the key field of the match result.void
setMaxResult
(int maxResults) This method may be used to specify the maximum number of results that may be present in the match result.Methods inherited from class com.aquima.interactions.matching.request.MatchInstance
addInstance, getEntityName, getInstanceName, getInstances, getThresholdPercentage, getValue, setThresholdPercentage, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aquima.interactions.matching.IMatchableInstance
getEntityName, getInstanceName, getInstances, getThresholdPercentage, getValue, setThresholdPercentage
-
Constructor Details
-
MatchRequest
Constructs the match request using the values from the provided instance. This constructor will use the default attribute filter which ignores relation attributes.- Parameters:
instance
- The instance whose values should be copied to the match request.- Throws:
AppException
- This exception will be raised when the match request could not be initialized.
-
MatchRequest
Constructs the match request using the values from the provided instance.- Parameters:
instance
- The instance whose values should be copied to the match request.filter
- The attribute filter that should be used to determine the values that should be copied.- Throws:
AppException
- This exception will be raised when the match request could not be initialized.
-
MatchRequest
Constructs the match request using an entity definition.- Parameters:
entity
- The entity definition the match request should be based on.name
- Identifier for the match request instance.
-
-
Method Details
-
getKeyField
Description copied from interface:IMatchRequest
This method returns the attribute that should be used to group matching cases on. Cases with the same value for this attribute will be considered as the same result, where the highest score will be taken as the match score.- Specified by:
getKeyField
in interfaceIMatchRequest
- Returns:
- the attribute that should be used to group matching cases on.
-
getMaxResults
public int getMaxResults()Description copied from interface:IMatchRequest
This method returns the maximum number of matching cases that should be returned as a result of the match action.- Specified by:
getMaxResults
in interfaceIMatchRequest
- Returns:
- the maximum number of matching cases that should be returned as a result of the match action.
-
getMaxKeyResults
public int getMaxKeyResults()Description copied from interface:IMatchRequest
This method returns the maximum number of results that should be stored for each unique key field value.- Specified by:
getMaxKeyResults
in interfaceIMatchRequest
- Returns:
- the maximum number of results that should be stored for each unique key field value.
-
setKeyField
Description copied from interface:IMatchRequest
This method may be used to override the key field of the match result. When this method is invoked with a null value for the key field, the match result will not group result.- Specified by:
setKeyField
in interfaceIMatchRequest
- Parameters:
attribute
- The attribute whose values should be used as key-field.maxResults
- The maximum number of cases that should be grouped.
-
setMaxResult
public void setMaxResult(int maxResults) Description copied from interface:IMatchRequest
This method may be used to specify the maximum number of results that may be present in the match result.- Specified by:
setMaxResult
in interfaceIMatchRequest
- Parameters:
maxResults
- The maximum number of results that may be present in the match result.
-