Class CaseBaseTemplate
java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.matching.CaseBaseTemplate
This template class may be used to initialize a casebase.
- Since:
- 6.2
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsConstructorDescriptionCaseBaseTemplate
(com.aquima.interactions.foundation.report.IInitializationReport report, String entityName) Constructs the template with the required parameters. -
Method Summary
Modifier and TypeMethodDescriptionThis method may be used to add a case to the casebase.addMatchDefinition
(String attribute, String functionName) This method adds a match definition for the specified attribute.This method returns the case template for the specified name.protected Collection
<CaseTemplate> getCases()
protected int
protected String
protected String
getMatchDefinition
(String attributeName) This method returns the match definition for the required attribute.protected Collection
<MatchDefinitionTemplate> protected int
void
setCaseThreshold
(int threshold) This method may be used to set the default threshold for the cases.void
setKeyField
(String keyField) This method may be used to specify the attribute that should be used as key-field.void
setMaxResults
(int maxResults) this method may be used to set the default number of results of a match action.com.aquima.interactions.matching.ds.ICaseBaseDS
This method converts the template to a data source that can be used to initialize the casebase.Methods inherited from class com.aquima.interactions.test.templates.AbstractReportingTemplate
getInitializationReport
-
Constructor Details
-
CaseBaseTemplate
public CaseBaseTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String entityName) Constructs the template with the required parameters.- Parameters:
report
- The initialization report that should be used to add error snd warnings to.entityName
- The name of the entity for which the casebase is defined.
-
-
Method Details
-
getMatchDefinition
This method returns the match definition for the required attribute. When no match definition was found for the attribute, an exception is thrown.- Parameters:
attributeName
- The name of the attribute for which the match definition is requested.- Returns:
- The match definition for the specified attribute.
-
addMatchDefinition
This method adds a match definition for the specified attribute.- Parameters:
attribute
- The attribute for which the match definition is created.functionName
- The name of the match function that should be used when matching the attribute.- Returns:
- Match definition template that may be used to adjust the match settings.
-
getMatchDefinitions
-
addCase
This method may be used to add a case to the casebase.- Parameters:
name
- The name of the case that should be added.- Returns:
- Case template that may be used to adjust the values of the case.
-
getCases
-
getCase
This method returns the case template for the specified name. If no case is found matching the name, a null value is returned.- Parameters:
name
- The name of the requested case (template).- Returns:
- Template representing the case with the specified name.
-
getEntityName
-
getKeyField
-
setKeyField
This method may be used to specify the attribute that should be used as key-field.- Parameters:
keyField
- The attribute that should be used as key-field.
-
getMaxResults
protected int getMaxResults() -
setMaxResults
public void setMaxResults(int maxResults) this method may be used to set the default number of results of a match action.- Parameters:
maxResults
- the default number of results of a match action.
-
getCaseThreshold
protected int getCaseThreshold() -
setCaseThreshold
public void setCaseThreshold(int threshold) This method may be used to set the default threshold for the cases.- Parameters:
threshold
- the default threshold for the cases.
-
toDataSource
public com.aquima.interactions.matching.ds.ICaseBaseDS toDataSource()This method converts the template to a data source that can be used to initialize the casebase.- Returns:
- a data source that can be used to initialize the casebase.
-