ERP Core

fferpcore.SObjectTargetMap

global with sharing class SObjectTargetMap implements TargetObjectMap, SObjectTarget.DestroyListener, VDOAdapters.SelfAdaptingTargetObjectMapAndRecordList

Implementation of fferpcore.TargetObjectMap for a collection of SObjectTarget.

This class implements the following interfaces:

Methods

SObjectTargetMap

global SObjectTargetMap(SObjectType objectType, String correlationField, List<fferpcore.DataSourceBase.Row> rows)

Construct an SObjectTargetMap.

Input Parameters

Name Type Description
objectType SObjectType The SObjectType of the targets.
correlationField String The API name to identify each SObject by.
rows List<fferpcore.DataSourceBase.Row> A list of DataSourceBase.Row obtained from an SObjectByIdDataSource query.

SObjectTargetMap

global SObjectTargetMap(SObjectType objectType, String correlationField, List<SObject> records)

Construct an SObjectTargetMap.

Input Parameters

Name Type Description
objectType SObjectType The SObjectType of the targets.
correlationField String The API name to identify each SObject by.
records List<SObject> A list of SObject for the given SObjectType.

get

global TargetObject get(Object key)

Handle duplicate entry into the target map.

Input Parameters

Name Type Description
correlation null The erroneous correlation ID
prior null The old entry from the map, now orphaned.

create

global fferpcore.TargetObject create(Object key)

keySet

global Set<Object> keySet()

values

global List<fferpcore.TargetObject> values()

Return Value

The items in the list. SObjectTargetMap maintains insertion order.

size

global Integer size()

getAsRecordList

global fferpcore.VirtualDataObject.RecordList getAsRecordList()

Record an error against the Map as a whole. Any VDO Error Listeners are informed. The error will be added to all DataTargetResults when they commit. All Targets will be marked "prevent save"

Input Parameters

Name Type Description
error null Error to aff.

getAsTargetObjectMap

global fferpcore.TargetObjectMap getAsTargetObjectMap()

© Copyright 2009–2018 FinancialForce.com, inc. Confidential – all rights reserved. Various trademarks held by their respective owners.