Package com.axemble.vdoc.sdk.components
Class MappingObject<T,S>
java.lang.Object
com.axemble.vdoc.sdk.components.MappingObject<T,S>
- Type Parameters:
T
-S
-
MappingObject assign values from a source object to a targt object
-
Constructor Summary
ConstructorDescriptionMappingObject
(IMappingProvider<T> sourceMappingProvider, IMappingProvider<S> targetMappingProvider) Constructor without initArgument for providersMappingObject
(String sourceMappingProviderClassName, Object sourceMappingProviderInitarg, String targetMappingProviderClassName, Object targetMappingProviderInitarg) Constructor with initArgument for providers -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyMapping
(IContext context, T sourceObject, S targetObject, Object mappingDefinition) Used to assign the values of the source object to the target objectgetTargetValue
(IContext context, T sourceObject, Object mappingDefinition, String targetMappingStructureName) Gets the value of the target mappingStructure name
-
Constructor Details
-
MappingObject
public MappingObject(IMappingProvider<T> sourceMappingProvider, IMappingProvider<S> targetMappingProvider) Constructor without initArgument for providers- Parameters:
sourceMappingProvider
-targetMappingProvider
-
-
MappingObject
public MappingObject(String sourceMappingProviderClassName, Object sourceMappingProviderInitarg, String targetMappingProviderClassName, Object targetMappingProviderInitarg) Constructor with initArgument for providers- Parameters:
sourceMappingProviderClassName
-sourceMappingProviderInitarg
-targetMappingProviderClassName
-targetMappingProviderInitarg
-
-
-
Method Details
-
applyMapping
public void applyMapping(IContext context, T sourceObject, S targetObject, Object mappingDefinition) throws Exception Used to assign the values of the source object to the target object- Parameters:
context
- The execution context.sourceObject
- source object.targetObject
- target object.mappingDefinition
- the value of the mappingComponent.- Throws:
ModuleException
WorkflowModuleException
Exception
-
getTargetValue
public Object getTargetValue(IContext context, T sourceObject, Object mappingDefinition, String targetMappingStructureName) Gets the value of the target mappingStructure name- Parameters:
context
- The execution context.sourceObject
- source object.mappingDefinition
- the value of the mappingComponent.targetMappingStructureName
- the name of the targetMappingStructure name- Returns:
-