com.mulesoft.adapter.module.salesforce
Class Bulks

java.lang.Object
  extended by com.mulesoft.adapter.module.salesforce.Bulks

public final class Bulks
extends Object

Helper methods for bulk operations.


Method Summary
static com.sforce.async.BatchResult awaitCompletion(org.mule.tools.module.invocation.DynamicModule module, com.sforce.async.BatchInfo batchInfo)
          Await completion of specified BatchInfo.
static com.sforce.async.BatchInfo batchInfo(org.mule.tools.module.invocation.DynamicModule module, com.sforce.async.BatchInfo batchInfo)
           
static void throwIfNotSuccessful(com.sforce.async.BatchResult batchResult)
          Throws a ResourceException if specified BatchResult contains Error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

batchInfo

public static com.sforce.async.BatchInfo batchInfo(org.mule.tools.module.invocation.DynamicModule module,
                                                   com.sforce.async.BatchInfo batchInfo)
                                            throws org.mule.api.MuleException
Parameters:
module -
batchInfo -
Returns:
latest BatchInfo
Throws:
org.mule.api.lifecycle.InitialisationException
org.mule.api.MuleException

awaitCompletion

public static com.sforce.async.BatchResult awaitCompletion(org.mule.tools.module.invocation.DynamicModule module,
                                                           com.sforce.async.BatchInfo batchInfo)
                                                    throws org.mule.api.MuleException,
                                                           InterruptedException
Await completion of specified BatchInfo. Loop calling batchInfo(org.mule.tools.module.invocation.DynamicModule, com.sforce.async.BatchInfo) waiting 10 s between each call.

Parameters:
module -
batchInfo -
Returns:
Throws:
org.mule.api.lifecycle.InitialisationException
org.mule.api.MuleException
InterruptedException
See Also:
batchInfo(org.mule.tools.module.invocation.DynamicModule, com.sforce.async.BatchInfo)

throwIfNotSuccessful

public static void throwIfNotSuccessful(com.sforce.async.BatchResult batchResult)
                                 throws javax.resource.ResourceException
Throws a ResourceException if specified BatchResult contains Error.

Parameters:
batchResult -
Throws:
javax.resource.ResourceException


Copyright © 2012. All Rights Reserved.