jsdai.lang
Interface MappingPopulationCreator


public interface MappingPopulationCreator

A MappingPopulationCreator is used as callbacks for AIM2ARM conversion algorithm. Classes implementing this interface ensure actual ARM data creation. AIM2ARM conversion algorithm just calls methods of this interface with the collected information.

Since:
3.6.0
See Also:
SdaiSession.convertMapping(jsdai.lang.MappingContext), MappingContext

Method Summary
 void createSourceInstance(jsdai.mapping.EEntity_mapping type, java.util.Collection targetInstances)
          Creates source (ARM) instances.
 java.util.Set preprocessTargetInstances(jsdai.mapping.EEntity_mapping type)
           
 void setSourceAttributeValues(jsdai.mapping.EEntity_mapping type, EEntity targetInstance, java.util.Map sourceValues)
          Assigns attribute values to source (ARM) instance.
 

Method Detail

createSourceInstance

public void createSourceInstance(jsdai.mapping.EEntity_mapping type,
                                 java.util.Collection targetInstances)
                          throws SdaiException
Creates source (ARM) instances. This method is a call back method called as part of AIM2ARM conversion during convertMapping invocation. It is invoked by the algorithm only once per entity mapping. The conversion algorithm guarantees that each entity instance passed to setSourceAttributeValues through sourceValues parameter is previosly passed to createSourceInstance method through targetInstances parameter.

Parameters:
type - the entity mapping to source (ARM) type of the instances
targetInstances - the unique collection of instances in target (AIM) population matching source (ARM) entiy type identified by type parameter
Throws:
SdaiException - if underlying JSDAI exception occurs
See Also:
setSourceAttributeValues(jsdai.mapping.EEntity_mapping, jsdai.lang.EEntity, java.util.Map)

setSourceAttributeValues

public void setSourceAttributeValues(jsdai.mapping.EEntity_mapping type,
                                     EEntity targetInstance,
                                     java.util.Map sourceValues)
                              throws SdaiException
Assigns attribute values to source (ARM) instance. This method is a call back method called as part of AIM2ARM conversion during convertMapping invocation. It is invoked by the algorithm only once per type, targetInstances pair.

Parameters:
type - the entity mapping to source (ARM) type of the instance
targetInstance - the target (AIM) instance which matches source (ARM) entiy type identified by type parameter
sourceValues - the map of attribute values.
The keys of this map are generic_attribute_mappings for all attributes of this source (ARM) instance.
The values are either objects corresponding simple types, entity instance as target (AIM) or Collection of before mentioned objects for aggregates.
Throws:
SdaiException - if underlying JSDAI exception occurs
See Also:
createSourceInstance(jsdai.mapping.EEntity_mapping, java.util.Collection)

preprocessTargetInstances

public java.util.Set preprocessTargetInstances(jsdai.mapping.EEntity_mapping type)
                                        throws SdaiException
Throws:
SdaiException

Copyright © LKSoftWare GmbH, 1999-2008