Add selectById method to the domain template

Signed-off-by: WimVelzeboer <wimvelzeboer@protonmail.com>
This commit is contained in:
WimVelzeboer
2022-01-11 10:40:40 +00:00
parent a48dbe519f
commit 6a0fd5faae
2 changed files with 6 additions and 0 deletions
@@ -22,6 +22,11 @@ public inherited sharing class ${NAME}
return (List<${SObject_API_Name}>) getRecords();
}
public I${NAME} selectById(Set<Id> ids)
{
return new ${NAME}(getRecords(ids));
}
private I${NAME} selectBy(fflib_Criteria criteria)
{
return new ${NAME}(getRecords(criteria));
@@ -2,4 +2,5 @@ public interface I${NAME}
extends fflib_ISObjects
{
List<${SObject_API_Name}> get${NAME}();
I${NAME} selectById(Set<Id> ids);
}