ERP Core

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.

withMapping

global fferpcore.ChildMapping withMapping(Mapping mapping)

Adds a child mapping.

Input Parameters

Name Type Description
mapping Mapping The child mapping to be added and processed for each item in the list node.

Return Value

The instance of the ChildMapping to enable fluent invocations.

withMappings

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

Add a list of child mappings.

Input Parameters

Name Type Description
mappings List<Mapping> The child mapping to be added and processed for each item in the list node.

Return Value

The instance of the ChildMapping to enable fluent invocations.

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.

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 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–2018 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.