Class JpqlValidationAndRepairService
java.lang.Object
io.jmix.aitools.dataload.execution.JpqlValidationAndRepairService
@NullMarked
@Component("aitls_JpqlValidationAndRepairService")
public class JpqlValidationAndRepairService
extends Object
Validates a generated JPQL query and repairs it when validation fails.
The query is validated, then repaired if needed and validated again. The combined outcome —
the (possibly repaired) query, the final validation result and the repair details — is returned
as an JpqlValidationAndRepairService.OperationResult, which also reports whether the operation ultimately failed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCombined outcome of the validate-and-repair operation. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected GeneratedJpqlResultprotected List<GeneratedJpqlParameter> toGeneratedParameters(@Nullable List<JpqlExecutionParameter> parameters) validateAndRepair(JpqlExecutionRequest request) Validates the query from the request and repairs it if the first validation fails.
-
Field Details
-
jpqlRepairService
-
jpqlValidationService
-
-
Constructor Details
-
JpqlValidationAndRepairService
public JpqlValidationAndRepairService()
-
-
Method Details
-
validateAndRepair
public JpqlValidationAndRepairService.OperationResult validateAndRepair(JpqlExecutionRequest request) Validates the query from the request and repairs it if the first validation fails.- Parameters:
request- execution request carrying the query, its parameters and result properties- Returns:
- outcome with the final query
-
toGeneratedJpqlResult
-
toGeneratedParameters
protected List<GeneratedJpqlParameter> toGeneratedParameters(@Nullable List<JpqlExecutionParameter> parameters)
-