Foundations Apex API Developer Reference

fferpcore.ChildMapping

global with sharing class ChildMapping extends SubscriptionDescription.Mapping

Implementation of Mapping that creates and updates child records based on a list node in the message.

This class extends fferpcore.SubscriptionDescription.Mapping

Methods

ChildMapping

global ChildMapping(SObjectType childType, SObjectField parentField, fferpcore.ChildCorrelationStrategy correlationStrategy, List<String> messageKey)

Constructs a ChildMapping.

Input Parameters

Name Type Description
childType SObjectType The type of child records to create and update.
parentField SObjectField The lookup field on the child record that references the parent record.
correlationStrategy fferpcore.ChildCorrelationStrategy The strategy used to determine how existing child records should be dealt with.
messageKey List<String> The location of the list node in the message.

ChildMapping

global ChildMapping(SObjectType childType, SObjectField parentField, fferpcore.ChildCorrelationStrategy correlationStrategy, String messageKey)

Constructs a ChildMapping.

Input Parameters

Name Type Description
childType SObjectType The type of child records to create and update.
parentField SObjectField The lookup field on the child record that references the parent record.
correlationStrategy fferpcore.ChildCorrelationStrategy The strategy used to determine how existing child records should be dealt with.
messageKey String The location of the list node in the message.

getMappings

global List<Mapping> getMappings()

Return Value

The child mappings with the default target child type.

getMappings

global List<Mapping> getMappings(String targetChildType)

Input Parameters

Name Type Description
targetChildType String The name of a type of target child object, which enables you to create multiple target child objects from a single source child object. For example, Default, Debit Line, or Admin Fee.

Return Value

The child mappings with the specified target child type.

withMapping

global fferpcore.ChildMapping withMapping(Mapping mapping)

Add a single child mapping with the default target child type.

Input Parameters

Name Type Description
mapping Mapping The new mapping.

Return Value

The child mapping.

withMappings

global fferpcore.ChildMapping withMappings(List<Mapping> mappings)

Add multiple child mappings with the default target child type.

Input Parameters

Name Type Description
mappings List<Mapping> The new mappings.

Return Value

The child mapping.

withMapping

global fferpcore.ChildMapping withMapping(String targetChildType, Mapping mapping)

Add a single child mapping for a given target child type.

Input Parameters

Name Type Description
targetChildType String The name of a type of target child object, which enables you to create multiple target child objects from a single source child object. For example, Default, Debit Line, or Admin Fee.
mapping Mapping The new mapping.

Return Value

The child mapping.

withMappings

global fferpcore.ChildMapping withMappings(String targetChildType, List<Mapping> mappings)

Add multiple child mappings for a given target child type.

Input Parameters

Name Type Description
targetChildType String The name of a type of target child object, which enables you to create multiple target child objects from a single source child object. For example, Default, Debit Line, or Admin Fee.
mappings List<Mapping> The new mappings.

Return Value

The child mapping.

getAdditionalSelections

global override Set<String> getAdditionalSelections()

Implementation of SubscriptionDescription.Mapping.getAdditionalSelections(). This method is invoked by the fferpcore.SubscriptionDescription and should not be called directly.

Return Value

Any fields that will be updated and therefore need to be queried.

performImmediateActions

global override void performImmediateActions(ApplyMappingRequest request)

Implementation of SubscriptionDescription.Mapping.performImmediateActions(SubscriptionDescription.ApplyMappingRequest request). This method is invoked by the fferpcore.SubscriptionDescription and should not be called directly. Performs mapping functionality only on the request provided.

Input Parameters

Name Type Description
request ApplyMappingRequest The mapping request containing the record and message data.

withFilter

global fferpcore.ChildMapping withFilter(fferpcore.ChildMappingMatcher filter)

Provides a fferpcore.ChildMappingMatcher that is used to filter the child records within a child mapping.

Input Parameters

Name Type Description
filter fferpcore.ChildMappingMatcher An instance of ChildMappingMatcher defining the filter.

Return Value

The child mapping.

performBulkActions

global override void performBulkActions()

Carries out bulk actions on the child mappings.

getTargetFields

global override Set<String> getTargetFields()

Implementation of SubscriptionDescription.Mapping.getTargetFields(). This method is invoked by the SubscriptionDescriptionController and should not be called directly.

Return Value

Any fields that will be updated.

getMessageKeys

global override List<List<String>> getMessageKeys()

Implementation of SubscriptionDescription.Mapping.getMessageKeys(). This method is invoked by the SubscriptionDescriptionController and should not be called directly.

Return Value

Any message keys that will be used.

fferpcore.ChildMapping.ChildCorrelationStrategy

global with sharing abstract class ChildCorrelationStrategy

Strategy for use with a fferpcore.ChildMapping to determine the way in which existing child records are dealt with.

fferpcore.ChildMapping.AppendChildCorrelationStrategy

global inherited sharing class AppendChildCorrelationStrategy extends ChildCorrelationStrategy

Strategy for use with a fferpcore.ChildMapping that ignores all child records already in the database and inserts all child records from the message.

This class extends fferpcore.ChildCorrelationStrategy

Methods

AppendChildCorrelationStrategy

global AppendChildCorrelationStrategy()

Constructs an AppendChildCorrelationStrategy.

fferpcore.ChildMapping.ReplaceChildCorrelationStrategy

global with sharing class ReplaceChildCorrelationStrategy extends ChildCorrelationStrategy

Strategy for use with a fferpcore.ChildMapping that removes all child records already in the database and inserts all child records from the message.

This class extends fferpcore.ChildCorrelationStrategy

Methods

ReplaceChildCorrelationStrategy

global ReplaceChildCorrelationStrategy()

Constructs a ReplaceChildCorrelationStrategy.

fferpcore.ChildMapping.UpdateChildCorrelationStrategy

global with sharing virtual class UpdateChildCorrelationStrategy extends ChildCorrelationStrategy

Strategy for use with a fferpcore.ChildMapping that updates all child records that are both on the database and in the message. This ignores all child records that are only in the database and inserts all child records that are only in the message.

This class extends fferpcore.ChildCorrelationStrategy

Methods

UpdateChildCorrelationStrategy

global UpdateChildCorrelationStrategy(SObjectField correlationField, List<String> correlationKey)

Constructs an UpdateChildCorrelationStrategy.

Input Parameters

Name Type Description
correlationField SObjectField The correlation field used to locate existing records.
correlationKey List<String> The location of the correlation ID in the message.

UpdateChildCorrelationStrategy

global UpdateChildCorrelationStrategy(SObjectField correlationField, String correlationKey)

Constructs an UpdateChildCorrelationStrategy.

Input Parameters

Name Type Description
correlationField SObjectField The correlation field used to locate existing records.
correlationKey String The location of the correlation ID in the message.

fferpcore.ChildMapping.UpdateTotalChildCorrelationStrategy

global with sharing class UpdateTotalChildCorrelationStrategy extends UpdateChildCorrelationStrategy

Strategy for use with a fferpcore.ChildMapping that updates all child records that are both on the database and in the message. This removes all child records that are only in the database and inserts all child records that are only in the message.

This class extends fferpcore.UpdateChildCorrelationStrategy

Methods

UpdateTotalChildCorrelationStrategy

global UpdateTotalChildCorrelationStrategy(SObjectField correlationField, List<String> correlationKey)

Constructs an UpdateTotalChildCorrelationStrategy.

Input Parameters

Name Type Description
correlationField SObjectField The correlation field used to locate existing records.
correlationKey List<String> The location of the correlation ID in the message.

UpdateTotalChildCorrelationStrategy

global UpdateTotalChildCorrelationStrategy(SObjectField correlationField, String correlationKey)

Constructs an UpdateTotalChildCorrelationStrategy.

Input Parameters

Name Type Description
correlationField SObjectField The correlation field used to locate existing records.
correlationKey String The location of the correlation ID in the message.
© Copyright 2009–2022 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.