Package com.appiancorp.common.query
Class TypedValueQueryValidator
java.lang.Object
com.appiancorp.common.query.TypedValueQueryValidator
- All Implemented Interfaces:
com.appiancorp.common.query.ValidatesFilterProperties
,com.appiancorp.common.query.ValidatesSortInfo
@NotThreadSafe
public class TypedValueQueryValidator
extends Object
implements com.appiancorp.common.query.ValidatesFilterProperties, com.appiancorp.common.query.ValidatesSortInfo
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTypedValueQueryValidator
(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties) TypedValueQueryValidator
(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties, boolean isMultiColumnSortSupported) TypedValueQueryValidator
(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties, TypedValueCriteriaValidatorProvider criteriaValidatorProvider) -
Method Summary
Modifier and TypeMethodDescriptionString[][]
protected com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor>
getFieldDisplayName
(String fieldNameOrUuid) com.appiancorp.core.expr.portable.ReadOnlyType
protected void
initializeArrays
(int size) protected boolean
isStringNil
(String str) protected boolean
protected boolean
validate
(Query<TypedValue> query) validate
(Query<TypedValue> query, boolean skipDefaultSort) protected String
validateAlias
(String alias, String field) protected void
validateAliasInner
(String alias) validateColumns
(List<Column> columns) validateCriteria
(Criteria criteria) protected com.appiancorp.core.expr.portable.ReadOnlyType
validateFieldDefinitionInner
(String alias, boolean disallowComplexFieldType, String expr, ErrorCode nullFieldErrorCode, ErrorCode complexTypeErrorCode, ErrorCode indexOnMultipleErrorCode, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) protected com.appiancorp.core.expr.portable.ReadOnlyType
validateFieldDefinitionWithIdChain
(String alias, boolean disallowComplexFieldType, com.appiancorp.core.expr.IdChain idChain, ErrorCode complexTypeErrorCode, ErrorCode indexOnMultipleErrorCode, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) protected void
validateFieldDefinitionWithIdChainForSorting
(com.appiancorp.core.expr.IdChain idChain) validateFieldName
(String field) protected void
validateGrouping
(Query.Builder builder, Aggregation aggregation, PagingInfo pagingInfo, boolean isValidMeasuresWithoutGrouping) void
validateSortInfo
(List<SortInfo> sorts) protected void
validateSortInfoForGrouping
(List<SortInfo> sortInfos) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.appiancorp.common.query.ValidatesFilterProperties
getValidatedFieldTypeForSearchFilter, getValidatedFilterOperator, supportsAndAllOperator
-
Field Details
-
FEATURE_CONTEXT_CLASS
-
properties
protected final com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties -
aggregationCastMap
-
aliases
-
columnsIdChains
protected com.appiancorp.core.expr.IdChain[] columnsIdChains -
aliasDotNotation
-
aliasCounter
protected int aliasCounter
-
-
Constructor Details
-
TypedValueQueryValidator
public TypedValueQueryValidator(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties) -
TypedValueQueryValidator
public TypedValueQueryValidator(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties, TypedValueCriteriaValidatorProvider criteriaValidatorProvider) -
TypedValueQueryValidator
public TypedValueQueryValidator(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties, boolean isMultiColumnSortSupported)
-
-
Method Details
-
validate
-
validate
-
skipCriteriaValidation
protected boolean skipCriteriaValidation() -
skipSelectionValidation
protected boolean skipSelectionValidation() -
getAliasesPosition
-
getAliasDotNotation
-
getAggregationCastMap
-
initializeArrays
protected void initializeArrays(int size) -
validateGrouping
protected void validateGrouping(Query.Builder builder, Aggregation aggregation, PagingInfo pagingInfo, boolean isValidMeasuresWithoutGrouping) -
getAllVisibleProperties
protected com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> getAllVisibleProperties() -
validateColumns
-
validateSortInfo
- Specified by:
validateSortInfo
in interfacecom.appiancorp.common.query.ValidatesSortInfo
-
validateSortInfoForGrouping
-
isStringNil
-
validateAliasInner
-
validateAlias
-
validateFieldDefinitionWithIdChainForSorting
protected void validateFieldDefinitionWithIdChainForSorting(com.appiancorp.core.expr.IdChain idChain) -
getValidatedFieldTypeForFilter
- Specified by:
getValidatedFieldTypeForFilter
in interfacecom.appiancorp.common.query.ValidatesFilterProperties
-
validateFieldDefinitionInner
protected com.appiancorp.core.expr.portable.ReadOnlyType validateFieldDefinitionInner(String alias, boolean disallowComplexFieldType, String expr, ErrorCode nullFieldErrorCode, ErrorCode complexTypeErrorCode, ErrorCode indexOnMultipleErrorCode, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) -
validateFieldDefinitionWithIdChain
protected com.appiancorp.core.expr.portable.ReadOnlyType validateFieldDefinitionWithIdChain(String alias, boolean disallowComplexFieldType, com.appiancorp.core.expr.IdChain idChain, ErrorCode complexTypeErrorCode, ErrorCode indexOnMultipleErrorCode, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) throws InvalidTypeException - Throws:
InvalidTypeException
-
validateCriteria
-
getValue
- Specified by:
getValue
in interfacecom.appiancorp.common.query.ValidatesFilterProperties
-
getFieldDisplayName
- Specified by:
getFieldDisplayName
in interfacecom.appiancorp.common.query.ValidatesFilterProperties
-
validateFieldName
- Specified by:
validateFieldName
in interfacecom.appiancorp.common.query.ValidatesFilterProperties
-