public class

SalesforceUtils

extends Object
java.lang.Object
   ↳ org.mule.modules.salesforce.SalesforceUtils

Summary

Public Constructors
SalesforceUtils()
Public Methods
static SObject toAsyncSObject(Map<String, Object> map, Integer batchSobjectMaxDepth)
Converts a Salesforce object map to Bulk API SObject
static SObject[] toAsyncSObjectList(List<Map<String, Object>> objects, Integer batchSobjectMaxDepth)
Creates a Salesforce Async Sobject (Bulk API) array from a List of Maps
static Map<String, Object> toMap(XmlObject xmlObject)
Converts a Salesforce XML Object to Map
static SObject toSObject(String type, Map<String, Object> map)
Converts a Salesforce object map to SObject using the given type
static SObject[] toSObjectList(String type, List<Map<String, Object>> objects)
Creates a Salesforce SObject array from a List of Maps
static Map<String, Object> toSObjectMap(Map map)
Enforce map keys are converted to String to comply with generic signature in toSObject
Protected Methods
static String convertDateToString(Object object)
static boolean isDateField(Object object)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SalesforceUtils ()

Public Methods

public static SObject toAsyncSObject (Map<String, Object> map, Integer batchSobjectMaxDepth)

Converts a Salesforce object map to Bulk API SObject

Parameters
map Salesforce object fields
batchSobjectMaxDepth Async SObject recursive MAX_DEPTH check
Returns
  • Async SObject

public static SObject[] toAsyncSObjectList (List<Map<String, Object>> objects, Integer batchSobjectMaxDepth)

Creates a Salesforce Async Sobject (Bulk API) array from a List of Maps

Parameters
objects List of maps with Salesforce objects fields
batchSobjectMaxDepth Async SObject recursive MAX_DEPTH check

public static Map<String, Object> toMap (XmlObject xmlObject)

Converts a Salesforce XML Object to Map

Parameters
xmlObject Salesforce XML Object

public static SObject toSObject (String type, Map<String, Object> map)

Converts a Salesforce object map to SObject using the given type

Parameters
type Salesforce Object Type
map Object fields
Returns
  • SObject

public static SObject[] toSObjectList (String type, List<Map<String, Object>> objects)

Creates a Salesforce SObject array from a List of Maps

Parameters
type Salesforce Object type
objects List of maps with Salesforce objects fields

public static Map<String, Object> toSObjectMap (Map map)

Enforce map keys are converted to String to comply with generic signature in toSObject

Parameters
map

Protected Methods

protected static String convertDateToString (Object object)

Parameters
object

protected static boolean isDateField (Object object)

Parameters
object