Deletes an existing record of the given type and id.
java.lang.String
getAccessToken()
Returns the access token used by this API client.
RecordBuilder
newRecordBuilder(java.lang.String type)
Creates a new and empty RecordBuilder that can be used to build a Record object for use with the update(Record) and create(Record) methods.
RecordBuilder
newRecordBuilder(Record record)
Creates a new RecordBuilder, pre-initialized from the given Record. The type and all fields present in that Record will be set on the returned RecordBuilder.
UnitOfWorkBuilder
newUnitOfWorkBuilder()
Creates a new and empty UnitOfWorkBuilder that can be used to build a UnitOfWork object for the commitUnitOfWork(UnitOfWork) method.
RecordQueryResult
query(java.lang.String soql)
Queries for records with a given SOQL string.
RecordQueryResult
queryMore(RecordQueryResult queryResult)
Queries for more records, based on the given RecordQueryResult.
RecordModificationResult
update(Record record)
Updates an existing record of the given type and id with the given fields.
Parameters: soql - The SOQL string. Returns: a RecordQueryResult
that contains the queried data. Throws: DataApiException - If error
occurred during the query. See Also: Salesforce Object Query Language
(SOQL)
Queries for more records, based on the given RecordQueryResult.
Parameters: queryResult - The query result to query more data for.
Returns: A new RecordQueryResult with additional data or an empty one
if the given RecordQueryResult was already in the done state. Throws:
DataApiException - If error occurred during the query.
java.lang.IllegalArgumentException - If the RecordQueryResult
instance wasn’t created by this DataApi instance. See Also:
RecordQueryResult.isDone()
Creates a new record of the given type with the given fields.
Parameters: record - The record to create. Returns: A
RecordModificationResult for this operation. Throws:
DataApiException - If an API error occurred during record creation.
java.lang.IllegalArgumentException - If the Record instance wasn’t
created by a RecordBuilder obtained from this DataApi instance.
Updates an existing record of the given type and id with the given
fields.
Parameters: record - The record to update. Returns: A
RecordModificationResult for this operation. Throws:
DataApiException - If an API error occurred during record update.
java.lang.IllegalArgumentException - If the Record instance wasn’t
created by a RecordBuilder obtained from this DataApi instance.
Deletes an existing record of the given type and id.
Parameters: type - The object type of the record to delete. id - The
id of the record to delete. Returns: A RecordModificationResult for
this operation. Throws: DataApiException - If an API error occurred
during record deletion.
Creates a new RecordBuilder, pre-initialized from the given Record.
The type and all fields present in that Record will be set on the
returned RecordBuilder.
Parameters: record - The Record to copy the type and fields from.
Returns: A new RecordBuilder, pre-initialized from the given Record.
Throws: java.lang.IllegalArgumentException - If the Record instance
wasn’t created by a RecordBuilder obtained from this DataApi
instance.
newUnitOfWorkBuilder
@Nonnull UnitOfWorkBuilder newUnitOfWorkBuilder()
Creates a new and empty UnitOfWorkBuilder that can be used to build a
UnitOfWork object for the commitUnitOfWork(UnitOfWork) method.
Commits a UnitOfWork, executing all operations registered with it. If
any of these operations fail, the whole unit is rolled back. To examine
results for a single operation, inspect the returned map (which is keyed
with ReferenceId returned from
UnitOfWorkBuilder.registerCreate(Record),
UnitOfWorkBuilder.registerUpdate(Record), and
UnitOfWorkBuilder.registerDelete(String, String).
Parameters: unitOfWork - The UnitOfWork to commit. Returns: A map of
RecordModificationResults, indexed by their ReferenceIds. Throws:
DataApiException - If an error occurred while committing the
UnitOfWork. java.lang.IllegalArgumentException - If the UnitOfWork
instance wasn’t created by a UnitOfWorkBuilder obtained from this
DataApi instance. See Also: newUnitOfWorkBuilder()
getAccessToken
@Nonnull java.lang.String getAccessToken()
Returns the access token used by this API client. Can be used to
initialize a third-party API client or to perform custom API calls with
a HTTP library.
Returns: the access token used by this API client.
Product Retirement Announcement
Salesforce Functions is no longer available for purchase or renewal. To preserve the capabilities that Salesforce Functions provided to your org, deploy an alternative solution before your existing order term ends. See Salesforce Functions Retirement for more information on migrating your functions. Contact your Salesforce Account Executive for more information on Heroku.