jsdai.lang
Class MappingContext

java.lang.Object
  extended byjsdai.lang.MappingContext

public final class MappingContext
extends java.lang.Object

This class is mapping context for AIM2ARM conversion method convertMapping.

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

Constructor Summary
MappingContext(SdaiContext context)
          Creates a new mapping context with empty mapping population creator.
MappingContext(SdaiContext context, MappingPopulationCreator creator)
          Creates a new mapping context with provided mapping population creator.
 
Method Summary
 SdaiContext getContext()
          Returns SdaiContext associated with this MappingContext.
 boolean getInterleavedCreation()
          Returns interleaved creation flag for this MappingContext.
 EEntity getMappedInstance(EEntity targetInstance)
          Returns sourceInstance associated with this targetInstance.
 EEntity putMappedInstace(EEntity targetInstance, EEntity sourceInstance)
          Creates an association between targetInstances and sourceInstance.
 void setInterleavedCreation(boolean interleavedCreation)
          Sets interleaved creation flag for this MappingContext.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingContext

public MappingContext(SdaiContext context,
                      MappingPopulationCreator creator)
               throws SdaiException
Creates a new mapping context with provided mapping population creator.

Parameters:
context - context of the operations as SdaiContext. The following fields of the context have to be set: domain, mappingDomain.
creator - the mapping population creator to be used during AIM2ARM conversion
Throws:
SdaiException - if underlying JSDAI exception occurs (since JSDAI 4.1.2)
See Also:
MappingPopulationCreator

MappingContext

public MappingContext(SdaiContext context)
               throws SdaiException
Creates a new mapping context with empty mapping population creator.

Parameters:
context - context of the operations as SdaiContext. The following fields of the context have to be set: domain, mappingDomain.
Throws:
SdaiException - if underlying JSDAI exception occurs (since JSDAI 4.1.2)
Method Detail

getContext

public final SdaiContext getContext()
Returns SdaiContext associated with this MappingContext.

Returns:
the SdaiContext
Since:
4.0.0

setInterleavedCreation

public void setInterleavedCreation(boolean interleavedCreation)
Sets interleaved creation flag for this MappingContext. Interleaved creation defines the order in which MappingPopulationCreator methods are called. If interleved creation is true (which is the default setting) then call to MappingPopulationCreator.createSourceInstance is immediately followed by calls to MappingPopulationCreator.setSourceAttributeValues for all instances in targetInstances collection. Otherwise if interleved creation is false then calls to for all instances to MappingPopulationCreator.createSourceInstance are followed by calls to MappingPopulationCreator.setSourceAttributeValues for all instances.

Parameters:
interleavedCreation - the interleaved creation flag value
Since:
4.0.0
See Also:
getInterleavedCreation(), MappingPopulationCreator.createSourceInstance(jsdai.mapping.EEntity_mapping, java.util.Collection), MappingPopulationCreator.setSourceAttributeValues(jsdai.mapping.EEntity_mapping, jsdai.lang.EEntity, java.util.Map), SdaiSession.convertMapping(jsdai.lang.MappingContext)

getInterleavedCreation

public boolean getInterleavedCreation()
Returns interleaved creation flag for this MappingContext. Read setInterleavedCreation(boolean) for description of interleaved creation flag.

Returns:
the interleaved creation flag value
Since:
4.0.0
See Also:
setInterleavedCreation(boolean)

putMappedInstace

public EEntity putMappedInstace(EEntity targetInstance,
                                EEntity sourceInstance)
Creates an association between targetInstances and sourceInstance. Later sourceInstance can be retrieved by providing targetInstances using getMappedInstance method. Notice that associations are kept only during convertMapping call and they are cleaned up afterward.

Parameters:
targetInstance - the target instance value
sourceInstance - the source instance value
Returns:
previous value of source instance association if such existed on null otherwise
Since:
4.0.0
See Also:
getMappedInstance(jsdai.lang.EEntity)

getMappedInstance

public EEntity getMappedInstance(EEntity targetInstance)
Returns sourceInstance associated with this targetInstance. Read putMappedInstace(jsdai.lang.EEntity, jsdai.lang.EEntity) for more detailed description.

Parameters:
targetInstance - the target instance value
Returns:
the associated source instance if such exists of null otherwise
Since:
4.0.0

Copyright © LKSoftWare GmbH, 1999-2008