diff --git a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/utils/GeneralProcessUtils.java b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/utils/GeneralProcessUtils.java index 98a41a4f..7c7afc3a 100644 --- a/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/utils/GeneralProcessUtils.java +++ b/qqq-backend-core/src/main/java/com/kingsrook/qqq/backend/core/processes/utils/GeneralProcessUtils.java @@ -28,6 +28,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.function.Consumer; import com.kingsrook.qqq.backend.core.actions.tables.CountAction; import com.kingsrook.qqq.backend.core.actions.tables.GetAction; import com.kingsrook.qqq.backend.core.actions.tables.QueryAction; @@ -394,9 +395,25 @@ public class GeneralProcessUtils ** Note - null values from the key field are NOT put in the map. *******************************************************************************/ public static Map loadTableToMap(AbstractActionInput parentActionInput, String tableName, String keyFieldName, Class entityClass) throws QException + { + return (loadTableToMap(tableName, keyFieldName, entityClass, null)); + } + + + + /******************************************************************************* + ** Note - null values from the key field are NOT put in the map. + *******************************************************************************/ + public static Map loadTableToMap(String tableName, String keyFieldName, Class entityClass, Consumer queryInputCustomizer) throws QException { QueryInput queryInput = new QueryInput(); queryInput.setTableName(tableName); + + if(queryInputCustomizer != null) + { + queryInputCustomizer.accept(queryInput); + } + QueryOutput queryOutput = new QueryAction().execute(queryInput); List records = queryOutput.getRecords();