Foundations Apex API Developer Reference

fferpcore.ChildTransformMapping

global inherited sharing class ChildTransformMapping implements TransformMapping, TransformMappingWithTarget

A mapping for use with the fferpcore.TransformService that creates child records on the target object from child data on the source object.

This class implements the following interfaces:

Methods

ChildTransformMapping

global ChildTransformMapping(String sourceKey, String targetKey, fferpcore.ChildCorrelationStrategy correlationStrategy)

Create a ChildTransformMapping.
The possible source and target keys are dictated by the source and target contexts, respectively.
For example, the fferpcore.Context.SObjectContext requires names of SObject child relationships.

Input Parameters

Name Type Description
sourceKey String The key that identifies the relationship that contains the source child records.
targetKey String The key that identifies the destination relationship for which to create child records.
correlationStrategy fferpcore.ChildCorrelationStrategy The strategy that dictates how the child records are synchronized.

Sample Data

String sourceKey: 'SomeSourceRelationship__r'
String targetKey: 'SomeTargetRelationship__r'

ChildTransformMapping

global ChildTransformMapping(String targetKey, fferpcore.ChildCorrelationStrategy correlationStrategy)

Create a ChildTransformMapping.
This uses only the source parent record as the source data.
To create more than one target child record, use target child types.
The possible target keys are dictated by the target context.
For example, the fferpcore.Context.SObjectContext requires names of SObject child relationships.

Input Parameters

Name Type Description
targetKey String The key that identifies the destination relationship for which to create child records.
correlationStrategy fferpcore.ChildCorrelationStrategy The strategy that dictates how the child records are synchronized.

Sample Data

String targetKey: 'SomeTargetRelationship__r'

withMapping

global fferpcore.ChildTransformMapping withMapping(fferpcore.TransformMapping mapping)

Add a nested mapping to be processed on each child record in order to provide data to the created child records.

Input Parameters

Name Type Description
mapping fferpcore.TransformMapping The TransformMapping to be applied to each child record.

Return Value

The ChildTransformMapping instance to allow further method calls.

withMapping

global fferpcore.ChildTransformMapping withMapping(String targetChildType, fferpcore.TransformMapping mapping)

Add a nested mapping to be processed on each child record in order to provide data to the created child records.

Input Parameters

Name Type Description
targetChildType String The target child type for the mapping.
mapping fferpcore.TransformMapping The TransformMapping to be applied to each child record.

Return Value

The ChildTransformMapping instance to allow further method calls.

withFilter

global fferpcore.ChildTransformMapping withFilter(fferpcore.TransformFilter filter)

Provide a fferpcore.TransformFilter to filter the source child records.

Input Parameters

Name Type Description
filter fferpcore.TransformFilter An instance of a TransformFilter that defines the filter logic.

Return Value

The ChildTransformMapping instance to allow further method calls.

getSourceKey

global String getSourceKey()

Return Value

The key that identifies the relationship that contains the source child records.

getTargetKey

global String getTargetKey()

Return Value

The key that identifies the destination relationship for which to create child records.

getCorrelationStrategy

global fferpcore.ChildCorrelationStrategy getCorrelationStrategy()

Return Value

The strategy that dictates how the child records are synchronized.

getMappings

global Map<String, List<fferpcore.TransformMapping>> getMappings()

Return Value

A map containing lists of all the TransformMappings keyed on their target child type.

getFilter

global fferpcore.TransformFilter getFilter()

Return Value

An instance of a TransformFilter that defines the filter logic.

© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.