Class EntityMappingDefinition
- java.lang.Object
-
- com.aquima.interactions.mapping.impl.EntityMappingDefinition
-
- All Implemented Interfaces:
IEntityMappingDefinition
,Serializable
public class EntityMappingDefinition extends Object implements IEntityMappingDefinition
Contains the definitions of a mapping on the Entity level.- Since:
- 7.1
- Author:
- Jon van Leuven
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EntityMappingDefinition(IEntityMappingDS datasource, IMetaModel sourceMetamodel, IMetaModel targetMetamodel, IExpressionParser sourceExpressionParser, IExpressionParser targetExpressionParser)
Constructs an entity mapping definition from a data source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addAttributeMapping(AttributeMappingDefinition def)
MappingAction
getActionForMatch()
The method returns the mapping action when a matching source and target instances is found.MappingAction
getActionForNoMatchingSource()
The method returns the mapping action when no matching source instance is found.MappingAction
getActionForNoMatchingTarget()
The method returns the mapping action when no matching target instance is found.IAttributeMappingDefinition[]
getAttributeMappings()
This method returns all the attribute mappings for this entity mapping.ICondition
getCondition()
This method returns the optional condition when this mapping should be used.IInstanceMatchCondition[]
getMatchConditions()
This method returns the optional match condition that determines when instances match and should be mapped.IExpression[]
getSourceContextExpressions()
This method returns the optional source expressions that can be used to activate instance(s) during value mapping evaluation.IExpression
getSourceEntityExpression()
This method returns the source expression that results in instances in the source profile.String
getTargetEntityName()
This method returns the entity name of the target.String
toString()
-
-
-
Constructor Detail
-
EntityMappingDefinition
public EntityMappingDefinition(IEntityMappingDS datasource, IMetaModel sourceMetamodel, IMetaModel targetMetamodel, IExpressionParser sourceExpressionParser, IExpressionParser targetExpressionParser)
Constructs an entity mapping definition from a data source. This method requires the (partially) initialized source and target metamodel.- Parameters:
datasource
- The data source providing the information of the attribute mapping.sourceMetamodel
- The source meta model.targetMetamodel
- The target meta model.sourceExpressionParser
- The expression parser that is used to parse source expressions.targetExpressionParser
- The expression parser that is used to parse target expressions.- Throws:
InitializationException
- This error is thrown when structural errors are encountered during initialization.
-
-
Method Detail
-
getTargetEntityName
public String getTargetEntityName()
Description copied from interface:IEntityMappingDefinition
This method returns the entity name of the target.- Specified by:
getTargetEntityName
in interfaceIEntityMappingDefinition
- Returns:
- The entity name of the target, never null.
-
addAttributeMapping
protected void addAttributeMapping(AttributeMappingDefinition def)
-
getActionForMatch
public MappingAction getActionForMatch()
Description copied from interface:IEntityMappingDefinition
The method returns the mapping action when a matching source and target instances is found.- Specified by:
getActionForMatch
in interfaceIEntityMappingDefinition
- Returns:
- The mapping action, never null.
-
getActionForNoMatchingSource
public MappingAction getActionForNoMatchingSource()
Description copied from interface:IEntityMappingDefinition
The method returns the mapping action when no matching source instance is found.- Specified by:
getActionForNoMatchingSource
in interfaceIEntityMappingDefinition
- Returns:
- The mapping action, never null.
-
getActionForNoMatchingTarget
public MappingAction getActionForNoMatchingTarget()
Description copied from interface:IEntityMappingDefinition
The method returns the mapping action when no matching target instance is found.- Specified by:
getActionForNoMatchingTarget
in interfaceIEntityMappingDefinition
- Returns:
- The mapping action, never null.
-
getCondition
public ICondition getCondition()
Description copied from interface:IEntityMappingDefinition
This method returns the optional condition when this mapping should be used.- Specified by:
getCondition
in interfaceIEntityMappingDefinition
- Returns:
- The condition, may be null.
-
getAttributeMappings
public IAttributeMappingDefinition[] getAttributeMappings()
Description copied from interface:IEntityMappingDefinition
This method returns all the attribute mappings for this entity mapping.- Specified by:
getAttributeMappings
in interfaceIEntityMappingDefinition
- Returns:
- The attribute mappings, never null, but can be empty array.
-
getMatchConditions
public IInstanceMatchCondition[] getMatchConditions()
Description copied from interface:IEntityMappingDefinition
This method returns the optional match condition that determines when instances match and should be mapped.
When no match condition is available, an empty array is returned.
- Specified by:
getMatchConditions
in interfaceIEntityMappingDefinition
- Returns:
- The match conditions, never null, but can be an empty array.
-
getSourceEntityExpression
public IExpression getSourceEntityExpression()
Description copied from interface:IEntityMappingDefinition
This method returns the source expression that results in instances in the source profile.- Specified by:
getSourceEntityExpression
in interfaceIEntityMappingDefinition
- Returns:
- The source entity expression, never null
-
getSourceContextExpressions
public IExpression[] getSourceContextExpressions()
Description copied from interface:IEntityMappingDefinition
This method returns the optional source expressions that can be used to activate instance(s) during value mapping evaluation.- Specified by:
getSourceContextExpressions
in interfaceIEntityMappingDefinition
- Returns:
- The source expression, never null, but can be an empty array.
-
-