Foundations Apex API Developer Reference

fferpcore.AnalysisMappingService

global with sharing class AnalysisMappingService

Query Foundations analysis mapping configuration.

Methods

getEntriesOnSObjects

global static fferpcore.AnalysisMappingService.EntriesOnSObjectResult getEntriesOnSObjects(List<SObjectType> targetSObjects)

Input Parameters

Name Type Description
targetSObjects List<SObjectType> The objects for which you want to return analysis mapping information.

Return Value

The analysis mappings for a given list of objects.

fferpcore.AnalysisMappingService.EntriesOnSObjectResult

global interface EntriesOnSObjectResult

Information about analysis mapping entries on several objects.

Methods

getAnalysisMappings

Set<String> getAnalysisMappings()

Return Value

The set of analysis mapping names associated with the specified objects. Names are returned in lower case.

getSObjectTypes

Set<SObjectType> getSObjectTypes()

Return Value

The set of objects associated with this result.

getEntry

Entry getEntry(String analysisMapping, SObjectType targetType)

Input Parameters

Name Type Description
analysisMapping String The name of the analysis mapping that contains the relevant analysis mapping entry.
targetType SObjectType The object for which you want to get the associated analysis mapping entry.

Return Value

The analysis mapping entry for the given analysis mapping and object.

getEntries

List<Entry> getEntries(SObjectType targetType)

Input Parameters

Name Type Description
targetType SObjectType The object for which you want to get the associated analysis mapping entries.

Return Value

The analysis mapping entries for the given object.

getFieldPathStrings

Set<String> getFieldPathStrings(SObjectType targetType)

Input Parameters

Name Type Description
targetType SObjectType The object for which you want to get the associated field paths.

Return Value

A set of SOQL field strings that you can use to read all analysis values for the given object.

getCopyableMappings

List<DataFlow> getCopyableMappings(SObjectType sourceSObjectType, SObjectType targetSObjectType)

Input Parameters

Name Type Description
sourceSObjectType SObjectType The object to read analysis values from.
targetSObjectType SObjectType The object to write analysis values to.

Return Value

The list of analysis mappings that you can use to copy analysis values from a given source object to a target object. You can copy the analysis values if the analysis mapping exists on both objects and the target field is not referenced through a relationship on the target object.

fferpcore.AnalysisMappingService.Entry

global interface Entry

Describes how an analysis mapping is used on an object.

Methods

getAnalysisMappingName

String getAnalysisMappingName()

Return Value

The name of the analysis mapping.

getAnalysisMappingLabel

String getAnalysisMappingLabel()

Return Value

The label of the analysis mapping.

getSObjectType

SObjectType getSObjectType()

Return Value

The object associated with the analysis mapping entry.

isIndirect

Boolean isIndirect()

Return Value

True if the field does not exist on the specified object.

getField

SObjectField getField()

Return Value

The field containing the analysis value. If isIndirect() is false, the field exists on the object. If isIndirect() is true, the field exists on a different record.

getFieldPath

SObjectFieldPath getFieldPath()

Return Value

The field path to the analysis value. Each field apart from the last one is a lookup.

getFieldPathString

String getFieldPathString()

Return Value

The path expressed as a SOQL string that you can use in a query.

readValue

Object readValue(SObject sourceRecord)

Read an analysis value from the source record.

Input Parameters

Name Type Description
sourceRecord SObject The record from which to read the analysis value.

Return Value

The analysis value from the source record. Null if no value is present or an intermediate lookup is null.

writeValue

void writeValue(SObject targetRecord, Object value)

Write an analysis value to the target record.

Input Parameters

Name Type Description
targetRecord SObject The target record to which you want to write the analysis value.
value Object The analysis value to write.

fferpcore.AnalysisMappingService.DataFlow

global interface DataFlow

Describes how analysis values can be copied from one record to another.

Methods

getAnalysisMappings

Set<String> getAnalysisMappings()

Return Value

The names of all associated analysis mappings.

getSourcePath

SObjectFieldPath getSourcePath()

Return Value

The field path that is used to read an analysis value from a source record. All fields apart from the last one are lookups.

getSourcePathString

String getSourcePathString()

Return Value

The source field path expressed as a SOQL string that you can use in a query.

getTargetField

SObjectField getTargetField()

Return Value

The target record field to which you want to write an analysis value.

readValue

Object readValue(SObject sourceRecord)

Read an analysis value from the source record.

Input Parameters

Name Type Description
sourceRecord SObject The record from which to read the analysis value.

Return Value

The analysis value from the source record. Null if no value is present or an intermediate lookup is null.

writeValue

void writeValue(SObject targetRecord, Object value)

Write an analysis value to the target record.

Input Parameters

Name Type Description
targetRecord SObject The record to which you want to write the analysis value.
value Object The analysis value to write.

copyValue

void copyValue(SObject sourceRecord, SObject targetRecord)

Copy an analysis value from a source record to a target record.

Input Parameters

Name Type Description
sourceRecord SObject The record from which to read the analysis value.
targetRecord SObject The record to which you want to write the analysis value.

hasUserRequiredPermission

Boolean hasUserRequiredPermission()

Return Value

True if the current user has the required permissions to copy the analysis value.

© Copyright 2009–2024 Certinia Inc. All rights reserved. Various trademarks held by their respective owners.