T
- the merge configuration typeK
- the merge key typepublic abstract class AbstractMergeHandler<T,K> extends Object implements InstanceHandler<TransformationEngine>
Modifier and Type | Class and Description |
---|---|
class |
AbstractMergeHandler.MergedIterator
Resource iterator over the merged instances
|
Constructor and Description |
---|
AbstractMergeHandler() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createMergeConfiguration(String transformationIdentifier,
com.google.common.collect.ListMultimap<String,ParameterValue> transformationParameters,
Map<String,String> executionParameters,
TransformationLog log)
Create the merge configuration from the transformation configuration.
|
protected InstanceFactory |
getInstanceFactory()
Get the instance factory
|
protected abstract K |
getMergeKey(Instance instance,
T mergeConfig)
Get the merge key for a given instance.
|
protected abstract Instance |
merge(Collection<Instance> instances,
TypeDefinition type,
K mergeKey,
T mergeConfig)
Merge multiple instance into one.
|
ResourceIterator<FamilyInstance> |
partitionInstances(InstanceCollection instances,
String transformationIdentifier,
TransformationEngine engine,
com.google.common.collect.ListMultimap<String,ParameterValue> transformationParameters,
Map<String,String> executionParameters,
TransformationLog log)
Partition the given instances.
|
public ResourceIterator<FamilyInstance> partitionInstances(InstanceCollection instances, String transformationIdentifier, TransformationEngine engine, com.google.common.collect.ListMultimap<String,ParameterValue> transformationParameters, Map<String,String> executionParameters, TransformationLog log) throws TransformationException
InstanceHandler
partitionInstances
in interface InstanceHandler<TransformationEngine>
instances
- the instancestransformationIdentifier
- the transformation function identifierengine
- the transformation engine that may be used for the function
executiontransformationParameters
- the transformation parameters, may be
null
executionParameters
- additional parameters for the execution, may
be null
log
- the transformation log to report any information about the
execution of the transformation toTransformationException
- if an unrecoverable error occurs during
transformationInstanceHandler.partitionInstances(InstanceCollection, String,
TransformationEngine, ListMultimap, Map, TransformationLog)
protected InstanceFactory getInstanceFactory()
protected abstract T createMergeConfiguration(String transformationIdentifier, com.google.common.collect.ListMultimap<String,ParameterValue> transformationParameters, Map<String,String> executionParameters, TransformationLog log) throws TransformationException
getMergeKey(Instance, Object)
and
merge(Collection, TypeDefinition, Object, Object)
transformationIdentifier
- the transformation identifiertransformationParameters
- the transformation parametersexecutionParameters
- the execution parameterslog
- the transformation logTransformationException
- if the merge configuration cannot be
createdprotected abstract K getMergeKey(Instance instance, T mergeConfig)
instance
- the instancemergeConfig
- the merge configurationmerge(Collection, TypeDefinition, Object, Object)
protected abstract Instance merge(Collection<Instance> instances, TypeDefinition type, K mergeKey, T mergeConfig)
instances
- the instances to mergetype
- the type definition of the instances to mergemergeKey
- the merge key associated to the instancesmergeConfig
- the merge configurationBuild 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a