Foundations Object Model

SObjectDataTarget

global with sharing class SObjectDataTarget implements DataTargetRoot, DataTargetRoot2

Implementation of 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 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 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 DataTarget requireLookup(String name, Intent intent)

requireChildren

global DataTarget requireChildren(String name, Intent intent)

createWorkScope

global DataTargetWork createWorkScope()

queryByKeySet

global TargetObjectMap queryByKeySet(Set<Object> keySet)

queryByKeySetWithExternalCorrelation

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

hasAccess

global HasAccessResult hasAccess(List<String> targetPath)

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