fferpcore.ihcc_ISObjectUnitOfWorkglobal interface ihcc_ISObjectUnitOfWork Representation of a Unit of Work that can be passed between namespaces. Allows ihcc to provide a UoW that respects process limits to the integration implementations. This is based on fflib_ISObjectUnitOfWork but not all methods are provided/supported Methods
registerNewvoid registerNew(SObject record) Register a newly created SObject instance to be inserted when commitWork is called Input Parameters
registerNewvoid registerNew(list<SObject> records) Convenience method to register a list of newly created SObject instances to be inserted when commitWork is called Input Parameters
registerNewvoid registerNew(SObject record, Schema.SObjectField relatedToParentField, SObject relatedToParentRecord) Register a newly created SObject instance to be inserted when commitWork is called, you may also provide a reference to the parent record instance (should also be registered as new separately) Input Parameters
registerNewvoid registerNew(list<SObject> records, Schema.SObjectField relatedToParentField, SObject relatedToParentRecord) Convenience method to register a list of newly created SObject instances to be inserted when commitWork is called Input Parameters
registerRelationshipvoid registerRelationship(SObject record, Schema.SObjectField relatedToField, SObject relatedTo) Register a relationship between two records that have yet to be inserted to the database. This information will be used during the commitWork phase to make the references only when related records have been inserted to the database. Input Parameters
registerRelationshipvoid registerRelationship(List<SObject> records, Schema.SObjectField relatedToField, SObject relatedTo) Register relationships between one or more records to the RelatedTo record, where the relatedToRecord is yet to be inserted to the database. This information will be used during the commitWork phase to make the references only when related records have been inserted to the database. Input Parameters
registerDirtyvoid registerDirty(SObject record) Register an existing record to be updated during the commitWork method Input Parameters
registerDirtyvoid registerDirty(list<SObject> records) Convenience method to register a list of existing methods to be updated during the commitWork method Input Parameters
registerDeletedvoid registerDeleted(SObject record) Register an existing record to be deleted during the commitWork method Input Parameters
registerDeletedvoid registerDeleted(list<SObject> records) Convenience method to register a list of existing methods to be deleted during the commitWork method Input Parameters
commitAllWorkList<ihcc_IDatabaseResult> commitAllWork() Takes all the work that has been registered with the UnitOfWork and commits it to the database. All DML will be run using the database instance passed (in the sharing mode of that database). Always executes in partial success mode. Return ValueA list of fflib_DatabaseResults denoting save success/failure alongside any error messages for each SObject record. If the same record is involved in multiple DML operations, including if additional updates are added inside the commitWork for relationship resolving, then an fflib_DatabaseResult will be returned for each operation. |