Class MatchRequest

java.lang.Object
com.aquima.interactions.matching.request.MatchInstance
com.aquima.interactions.matching.request.MatchRequest
All Implemented Interfaces:
IMatchableInstance, IMatchRequest

public class MatchRequest extends MatchInstance implements 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 Details

    • MatchRequest

      public MatchRequest(IEntityInstance instance)
      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

      public MatchRequest(IEntityInstance instance, IAttributeFilter filter)
      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

      public MatchRequest(IEntityDefinition entity, String name)
      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

      public String 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 interface IMatchRequest
      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 interface IMatchRequest
      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 interface IMatchRequest
      Returns:
      the maximum number of results that should be stored for each unique key field value.
    • setKeyField

      public void setKeyField(String attribute, int maxResults)
      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 interface IMatchRequest
      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 interface IMatchRequest
      Parameters:
      maxResults - The maximum number of results that may be present in the match result.