Class InstanceValueVisitor
java.lang.Object
com.aquima.interactions.metamodel.impl.InstanceValueVisitor
- All Implemented Interfaces:
IValueVisitor
Implementation of the value visitor interface that is used during initialization of the static instances.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InstanceValueVisitor
(MetaModel model, InstanceDefinition definition) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(String attributeName, IInstanceDS childDS) This method can be used to add an anonymous child instance.void
addRelation
(String attributeName, String entityType, String instanceName) This method can be invoked to link the attribute to another static instance.void
When a setValue is invoked for a relation attribute, the value should be either the name or the ID of the (static) instance that should be referenced.
-
Constructor Details
-
InstanceValueVisitor
-
-
Method Details
-
addChild
Description copied from interface:IValueVisitor
This method can be used to add an anonymous child instance. To add a reference to another static instance use the addRelation method instead.- Specified by:
addChild
in interfaceIValueVisitor
- Parameters:
attributeName
- The name of the attribute to which the child instance definition should be added.childDS
- The data source that provides the information for the child instance.
-
addRelation
Description copied from interface:IValueVisitor
This method can be invoked to link the attribute to another static instance. Both the name and the type of the static instance should be provided, as the name of an instance needs only be unique amongst the other instances of that type.- Specified by:
addRelation
in interfaceIValueVisitor
- Parameters:
attributeName
- The name of the attribute to which the child instance definition should be added.entityType
- The type of the instance the relation should refer to.instanceName
- The name of the instance the relation should refer to.
-
setValue
Description copied from interface:IValueVisitor
When a setValue is invoked for a relation attribute, the value should be either the name or the ID of the (static) instance that should be referenced.- Specified by:
setValue
in interfaceIValueVisitor
- Parameters:
attributeName
- The name of the attribute of which the value should be set.objValue
- The value for the attribute.
-