Add selectById method to the domain template
Signed-off-by: WimVelzeboer <wimvelzeboer@protonmail.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user