Class ParametersValidator

java.lang.Object
io.jmix.aitools.dataload.validation.validator.ParametersValidator
All Implemented Interfaces:
JpqlResultValidator, org.springframework.core.Ordered

@Component("aitls_ParametersValidator") public class ParametersValidator extends Object implements JpqlResultValidator, org.springframework.core.Ordered
Checks that the JPQL named parameters and the declared parameters match — flagging both parameters used in the query but missing from the declaration, and declared parameters that the query never uses.
  • Field Details

  • Constructor Details

    • ParametersValidator

      public ParametersValidator()
  • Method Details

    • validate

      public List<JpqlValidationIssue> validate(GeneratedJpqlResult result)
      Description copied from interface: JpqlResultValidator
      Validates the given query draft.
      Specified by:
      validate in interface JpqlResultValidator
      Parameters:
      result - generated query draft to validate
      Returns:
      issues found, or an empty list if the rule passed
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • extractParameterNames

      protected Set<String> extractParameterNames(String jpql)