Package io.jmix.aitools.dataload.repair
Class JpqlRepairResult
java.lang.Object
io.jmix.aitools.dataload.repair.JpqlRepairResult
Outcome of
JpqlRepairService.repairIfNeeded(io.jmix.aitools.dataload.execution.JpqlExecutionRequest, io.jmix.aitools.dataload.execution.GeneratedJpqlResult, io.jmix.aitools.dataload.validation.JpqlValidationResult): the resulting query draft, its validation
result, the number of repair attempts made and whether a repair was attempted at all.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GeneratedJpqlResultprotected intprotected booleanprotected JpqlValidationResult -
Constructor Summary
ConstructorsConstructorDescriptionJpqlRepairResult(GeneratedJpqlResult generatedJpqlResult, JpqlValidationResult validationResult, int repairAttempts, boolean repaired) -
Method Summary
Modifier and TypeMethodDescriptionReturns the resulting query draft (repaired if a repair succeeded, otherwise the original).intReturns the number of repair attempts made.Returns the validation result of the resulting query draft.booleanReturns whether a repair was attempted (regardless of whether it produced a valid query).
-
Field Details
-
generatedJpqlResult
-
validationResult
-
repairAttempts
protected int repairAttempts -
repaired
protected boolean repaired
-
-
Constructor Details
-
JpqlRepairResult
public JpqlRepairResult(GeneratedJpqlResult generatedJpqlResult, JpqlValidationResult validationResult, int repairAttempts, boolean repaired)
-
-
Method Details
-
getGeneratedJpqlResult
Returns the resulting query draft (repaired if a repair succeeded, otherwise the original).- Returns:
- query draft
-
getValidationResult
Returns the validation result of the resulting query draft.- Returns:
- validation result
-
getRepairAttempts
public int getRepairAttempts()Returns the number of repair attempts made.- Returns:
- repair attempt count,
0if no repair was attempted
-
isRepaired
public boolean isRepaired()Returns whether a repair was attempted (regardless of whether it produced a valid query).- Returns:
trueif a repair attempt was made
-