Interface IMatchEngine

All Known Implementing Classes:
MatchEngine

public interface IMatchEngine
This interface defines the main methods of the match engine.
Since:
6.2
Author:
O. Kerpershoek
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method must be called to apply any modifications in the case data to the match engine.
    detailMatch(IMatchRequest request, String caseId)
    This method may be used to match the request against a specific case, in order to get a detailed matched result explaining how each value of the request matches against the values of the case.
    getCaseBase(String entityName)
    This method returns the casebase for the specified entity type name.
    getMatchFunction(String matchFunctionName)
    This method returns the match function as defined in studio.
    This method returns the mutable casebase for the specified entity type name.
    This method matches the request against the internal casebase and returns the match result containing the matching cases.
  • Method Details

    • getCaseBase

      ICaseBase getCaseBase(String entityName)
      This method returns the casebase for the specified entity type name.
      Parameters:
      entityName - The name of the entity for which the casebase is requested.
      Returns:
      The casebase of the specified entity type.
      Throws:
      UnknownEntityException - This exception is thrown when the entity name does not refer to a known entity.
    • getMutableCaseBase

      IMutableCaseBase getMutableCaseBase(String entityName)
      This method returns the mutable casebase for the specified entity type name. In a mutable casebase cases can be inserted, updated, and deleted while the application is running. After all changes in the case data are registered, the method applyCaseBaseUpdates() must be called to apply the changes to the casebases. Changes in the case data are applied to the casebases after all running match and detailMatch operations have finished.
      Parameters:
      entityName - The name of the entity for which the casebase is requested.
      Returns:
      The casebase of the specified entity type.
      Throws:
      UnknownEntityException - This exception is thrown when the entity name does not refer to a known entity or the casebase for the entity is not mutable.
    • getMatchFunction

      IMatchFunction getMatchFunction(String matchFunctionName)
      This method returns the match function as defined in studio.
      Parameters:
      matchFunctionName - The name of the match function as defined in studio.
      Returns:
      A match function for the specified name.
      Throws:
      UnknownMatchFunctionException - this exception is thrown when there is no match function defined with the specified name.
    • match

      IMatchResult match(IMatchRequest request)
      This method matches the request against the internal casebase and returns the match result containing the matching cases.
      Parameters:
      request - The request that should be matched.
      Returns:
      Object containing the result of the match (never null).
      Throws:
      UnknownEntityException - This exception is thrown when the match request is defined for an unknown entity.
    • detailMatch

      IDetailMatchResult detailMatch(IMatchRequest request, String caseId)
      This method may be used to match the request against a specific case, in order to get a detailed matched result explaining how each value of the request matches against the values of the case.
      Parameters:
      request - The request containing the values that should be matched against the case.
      caseId - The ID of the case that should be used to match the request against.
      Returns:
      Object containing detailed information about the match scores of the values that were matched from the request.
      Throws:
      UnknownEntityException - This exception is thrown when the match request is defined for an unknown entity.
      UnknownCaseException - This exception is thrown when no case could be found for the specified ID.
    • applyCaseBaseUpdates

      void applyCaseBaseUpdates()
      This method must be called to apply any modifications in the case data to the match engine. Changes in the case data are registered via the IMutableCaseBase interface. After all changes are registered, this method must be called to apply the changes to the casebases. Changes in the case data are applied to the casebases after all running match and detailMatch operations have finished.
      Throws:
      CaseUpdateException - This exception is thrown when a case insert, case update or case delete failed.