Class EntityMappingTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.mapping.EntityMappingTemplate

public class EntityMappingTemplate extends AbstractReportingTemplate
Template that may be used to define an entity mapping.
Since:
7.1
Author:
J. van Leuven
  • Constructor Details

    • EntityMappingTemplate

      protected EntityMappingTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String targetEntityName, String sourceEntityExpression)
  • Method Details

    • toDataSource

      public com.aquima.interactions.mapping.ds.IEntityMappingDS toDataSource()
      This method returns a data source implementation based on this template.
      Returns:
      data source implementation based on this template.
    • getTargetName

      protected String getTargetName()
    • addAttributeMapping

      public AttributeMappingTemplate addAttributeMapping(String targetAttribute)
      This method can be used to add an attribute mapping to this mapping.
      Parameters:
      targetAttribute - The name of the target attribute.
      Returns:
      The attribute mapping template that is added to this mapping.
    • getNoTargetMatchAction

      protected com.aquima.interactions.mapping.impl.MappingAction getNoTargetMatchAction()
    • setNoTargetMatchAction

      public void setNoTargetMatchAction(com.aquima.interactions.mapping.impl.MappingAction action)
      This method can be used to set the action that is used when no target instance could be found.
      Parameters:
      action - The mapping action.
    • getNoSourceMatchAction

      protected com.aquima.interactions.mapping.impl.MappingAction getNoSourceMatchAction()
    • setNoSourceMatchAction

      public void setNoSourceMatchAction(com.aquima.interactions.mapping.impl.MappingAction action)
      This method can be used to set the action that is used when no source instance could be found.
      Parameters:
      action - The mapping action.
    • getMatchAction

      protected com.aquima.interactions.mapping.impl.MappingAction getMatchAction()
    • setMatchAction

      public void setMatchAction(com.aquima.interactions.mapping.impl.MappingAction action)
      This method can be used to set the action that is used the source and target instance match.
      Parameters:
      action - The mapping action.
    • addInstanceMatchCondition

      public void addInstanceMatchCondition(String sourceExpression, com.aquima.interactions.mapping.ds.MatchConditionOperator matchOperator, String targetExpression)
      This method can be used to add a match condition to this mapping.
      Parameters:
      sourceExpression - The expression evaluated in the source.
      matchOperator - The operator that is used to compare the sourceExpression with the targetExpression.
      targetExpression - The expression evaluated in the target.
    • addSourceContextExpression

      public void addSourceContextExpression(String sourceContextExpression)
      This method can be used to add a context expression.
      Parameters:
      sourceContextExpression - The expression that results in instance(s) to activate instances for easy value mapping evaluation.
    • getCondition

      protected String getCondition()
    • setCondition

      public void setCondition(String condition)
      This method can be used to make this mapping conditional.
      Parameters:
      condition - The condition.
    • getAttributeMappings

      protected List<AttributeMappingTemplate> getAttributeMappings()
    • getMatchConditions

      protected List<MatchConditionTemplate> getMatchConditions()
    • getSourceEntityExpression

      protected String getSourceEntityExpression()
    • getSourceContextExpressions

      protected List<String> getSourceContextExpressions()