Class SelectionValidationHelper

java.lang.Object
com.kingsrook.qqq.backend.core.actions.tables.helpers.SelectionValidationHelper

public class SelectionValidationHelper extends Object
Utility to help query and aggregate actions validate the fieldNames being selected, aggregated, grouped by.
  • Constructor Details

    • SelectionValidationHelper

      public SelectionValidationHelper()
  • Method Details

    • getUnrecognizedFieldNames

      public static List<String> getUnrecognizedFieldNames(QueryOrCountInputInterface input, Set<String> fieldNames) throws QException
      For the given set of field names, and a query (or aggregate) input - figure out if any field names (which may be joinTable (or alias) dot field name) - figure out if any of those aren't recognized fields in the input table or any tables that'll e joined. joins may either be explicit, via queryJoins in the input, else, they can be "inferred" through a JoinsContext, which will look at the filter and security fields. Note that table personalization is applied in here to the join tables but it is assumed that input object has already has the table ran through the personalize action.
      Parameters:
      input - assumed to be a QueryInput or AggregateInput - where the table in it should have already gone through TableMetaDataPersonalizerAction.
      fieldNames - assumed to have come from Aggregate or GroupBy objects, or a QueryInput.withFieldNamesToInclude(Set)
      Returns:
      list of field names that were unrecognized. empty if none.
      Throws:
      QException