Skip to content

Commit

Permalink
Added docs and clarified name for DmlRecord method to get child sobjects
Browse files Browse the repository at this point in the history
  • Loading branch information
rob-baillie-ortoo committed Mar 22, 2022
1 parent a99c196 commit 0b6d115
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,23 @@ public virtual inherited sharing class DmlRecord
@testVisible
protected DmlDefiner getChildDefiner( String childRecordType )
{
Contract.requires( childRecordType != null, 'getChildDefiner called with a null childRecordType' );

checkTypeIsValid( childRecordType );
return this.childRecordsByType.get( childRecordType );
}

protected List<Sobject> getChildren( String childRecordType )

/**
* Returns the Sobjects that represent the child records for the given relationship
*
* @param String The 'Type' that will identify the child relationship for which to return
* @return List<Sobject> The List representing the child records currently on this DmlRecord
*/
protected List<Sobject> getChildSobjects( String childRecordType )
{
Contract.requires( childRecordType != null, 'getChildSobjects called with a null childRecordType' );

return getChildDefiner( childRecordType ).getSobjects();
}

Expand Down

0 comments on commit 0b6d115

Please sign in to comment.