ERP Apex API Developer Reference

fferpcore.SObjectDataTarget

global with sharing class SObjectDataTarget implements DataTargetRoot, DataTargetRoot2

Implementation of fferpcore.DataTargetRoot for a given SObjectType in the database.

This class implements the following interfaces:

Methods

SObjectDataTarget

global SObjectDataTarget(SObjectType objectType, String correlationField)

Construct an SObjectDataTarget.

Input Parameters

Name Type Description
objectType SObjectType The SObjectType to update and create records on.
correlationField String The field API name used to identifiy SObjects.

withSharingModel

global fferpcore.SObjectDataTarget withSharingModel(SharingModel sharingModelValue)

Specify the sharing model to use when querying the database for existing records.

Input Parameters

Name Type Description
sharingModelValue SharingModel With or without sharing.

Return Value

The same SObjectConsumer instance to allow further method calls.

withDryRun

global fferpcore.SObjectDataTarget withDryRun(Boolean dryRun)

Prevent the created SObjects being committed to the database. Existing SObjects may be read from the database. Results are available using the getSObjects method. No trigger validation will be run because no database writes are performed Therefore trigger and database level errors will not be detected.

Input Parameters

Name Type Description
dryRun Boolean True to prevent committing to the database.

Return Value

The same SObjectConsumer instance to allow further method calls.

requireField

global void requireField(String name, Intent intent)

Missing keys will be reported as errors in commit results and virtual data object events. This is used when data is required for reading, for example as a virtual data object. Use cases that create missing records will leave this unset.

Return Value

This SObjectDataTarget for chaining.

requireLookup

global fferpcore.DataTarget requireLookup(String name, Intent intent)

requireChildren

global fferpcore.DataTarget requireChildren(String name, Intent intent)

createWorkScope

global fferpcore.DataTargetWork createWorkScope()

queryByKeySet

global fferpcore.TargetObjectMap queryByKeySet(Set<Object> keySet)

queryByKeySetWithExternalCorrelation

global fferpcore.TargetObjectMap queryByKeySetWithExternalCorrelation(Map<Object, Object> correlationKeysBySearchValue)

hasAccess

global fferpcore.HasAccessResult hasAccess(List<String> targetPath)

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