Returns a new and immutable UnitOfWork instance based on the information stored in this builder.
ReferenceId
registerCreate(Record record)
Registers a record creation for the UnitOfWork and returns a ReferenceId that can be used to refer to the created record in subsequent operations in this UnitOfWork.
Registers a deletion of an existing record of the given type and id.
ReferenceId
registerUpdate(Record record)
Registers a record update for the UnitOfWork and returns a ReferenceId that can be used to refer to the updated record in subsequent operations in this UnitOfWork.
Registers a record creation for the UnitOfWork and returns a
ReferenceId that can be used to refer to the created record in
subsequent operations in this UnitOfWork.
Parameters: record - The record to create. Returns: The ReferenceId
for the created record. Throws: java.lang.IllegalArgumentException -
If the Record instance wasn’t created by a RecordBuilder obtained
from same DataApi instance this UnitOfWorkBuilder was obtained from.
Registers a record update for the UnitOfWork and returns a
ReferenceId that can be used to refer to the updated record in
subsequent operations in this UnitOfWork.
Parameters: record - The record to update. Returns: The ReferenceId
for the updated record. Throws: java.lang.IllegalArgumentException -
If the Record instance wasn’t created by a RecordBuilder obtained
from same DataApi instance this UnitOfWorkBuilder was obtained from.
Registers a deletion of 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: The ReferenceId for the deleted
record.
build
@Nonnull UnitOfWork build()
Returns a new and immutable UnitOfWork instance based on the
information stored in this builder.
Returns: The new UnitOfWork instance.
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.