Class SelectionValidationHelper
java.lang.Object
com.kingsrook.qqq.backend.core.actions.tables.helpers.SelectionValidationHelper
Utility to help query and aggregate actions validate the fieldNames being
selected, aggregated, grouped by.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUnrecognizedFieldNames
(QueryOrCountInputInterface input, Set<String> fieldNames) 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.
-
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 aJoinsContext
, 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 throughTableMetaDataPersonalizerAction
.fieldNames
- assumed to have come fromAggregate
orGroupBy
objects, or aQueryInput.withFieldNamesToInclude(Set)
- Returns:
- list of field names that were unrecognized. empty if none.
- Throws:
QException
-