Class SelectedValuesValidator
java.lang.Object
io.jmix.aitools.dataload.validation.validator.SelectedValuesValidator
- All Implemented Interfaces:
JpqlResultValidator,org.springframework.core.Ordered
@Component("aitls_SelectedValuesValidator")
public class SelectedValuesValidator
extends Object
implements JpqlResultValidator, org.springframework.core.Ordered
Checks that every result column is a value rather than an entity instance, so the repair loop can rewrite a
query that selects an entity whole. An entity column would also carry attributes the current user may not read.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Metadataprotected QueryTransformerFactorystatic final Stringstatic final StringFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()validate(GeneratedJpqlResult result) Validates the given query draft.
-
Field Details
-
SELECTED_ENTITY_CODE
- See Also:
-
SELECTED_ENTITY_GUIDANCE
- See Also:
-
metadata
-
queryTransformerFactory
-
-
Constructor Details
-
SelectedValuesValidator
public SelectedValuesValidator()
-
-
Method Details
-
validate
Description copied from interface:JpqlResultValidatorValidates the given query draft.- Specified by:
validatein interfaceJpqlResultValidator- Parameters:
result- generated query draft to validate- Returns:
- issues found, or an empty list if the rule passed
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-