@NotThreadSafe
public class TypedValueQueryValidator
extends java.lang.Object
implements com.appiancorp.common.query.ValidatesFilterProperties, com.appiancorp.common.query.ValidatesSortInfo
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,com.appiancorp.core.expr.portable.ReadOnlyType> |
aggregationCastMap |
protected int |
aliasCounter |
protected java.lang.String[][] |
aliasDotNotation |
protected java.util.Map<java.lang.String,java.lang.Integer> |
aliases |
protected com.appiancorp.core.expr.IdChain[] |
columnsIdChains |
protected static java.lang.Class |
FEATURE_CONTEXT_CLASS |
protected com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> |
properties |
Constructor and Description |
---|
TypedValueQueryValidator(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) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,com.appiancorp.core.expr.portable.ReadOnlyType> |
getAggregationCastMap() |
java.lang.String[][] |
getAliasDotNotation() |
java.util.Map<java.lang.String,java.lang.Integer> |
getAliasesPosition() |
protected com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> |
getAllVisibleProperties() |
java.lang.String |
getFieldDisplayName(java.lang.String fieldNameOrUuid) |
com.appiancorp.core.expr.portable.ReadOnlyType |
getValidatedFieldTypeForFilter(java.lang.String field) |
TypedValue |
getValue(Filter filterToValidate) |
protected void |
initializeArrays(int size) |
protected boolean |
isStringNil(java.lang.String str) |
protected boolean |
skipCriteriaValidation() |
protected boolean |
skipSelectionValidation() |
Query<TypedValue> |
validate(Query<TypedValue> query) |
Query<TypedValue> |
validate(Query<TypedValue> query,
boolean skipDefaultSort) |
protected java.lang.String |
validateAlias(java.lang.String alias,
java.lang.String field) |
protected void |
validateAliasInner(java.lang.String alias) |
protected java.util.List<Column> |
validateColumns(java.util.List<Column> columns) |
Criteria |
validateCriteria(Criteria criteria) |
protected com.appiancorp.core.expr.portable.ReadOnlyType |
validateFieldDefinitionInner(java.lang.String alias,
boolean disallowComplexFieldType,
java.lang.String expr,
ErrorCode nullFieldErrorCode,
ErrorCode complexTypeErrorCode,
ErrorCode indexOnMultipleErrorCode,
AggregationFunction aggregationFunction,
com.appiancorp.common.query.GroupingFunction groupingFunction) |
protected com.appiancorp.core.expr.portable.ReadOnlyType |
validateFieldDefinitionWithIdChain(java.lang.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) |
java.lang.String |
validateFieldName(java.lang.String field) |
protected void |
validateGrouping(Query.Builder builder,
Aggregation aggregation,
PagingInfo pagingInfo,
boolean isValidMeasuresWithoutGrouping) |
void |
validateSortInfo(java.util.List<SortInfo> sorts) |
protected void |
validateSortInfoForGrouping(java.util.List<SortInfo> sortInfos) |
protected static final java.lang.Class FEATURE_CONTEXT_CLASS
protected final com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties
protected final java.util.Map<java.lang.String,com.appiancorp.core.expr.portable.ReadOnlyType> aggregationCastMap
protected final java.util.Map<java.lang.String,java.lang.Integer> aliases
protected com.appiancorp.core.expr.IdChain[] columnsIdChains
protected java.lang.String[][] aliasDotNotation
protected int aliasCounter
public TypedValueQueryValidator(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties)
public TypedValueQueryValidator(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties, TypedValueCriteriaValidatorProvider criteriaValidatorProvider)
public TypedValueQueryValidator(ServiceContext serviceContext, com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> properties, boolean isMultiColumnSortSupported)
public Query<TypedValue> validate(Query<TypedValue> query)
public Query<TypedValue> validate(Query<TypedValue> query, boolean skipDefaultSort)
protected boolean skipCriteriaValidation()
protected boolean skipSelectionValidation()
public java.util.Map<java.lang.String,java.lang.Integer> getAliasesPosition()
public java.lang.String[][] getAliasDotNotation()
public java.util.Map<java.lang.String,com.appiancorp.core.expr.portable.ReadOnlyType> getAggregationCastMap()
protected void initializeArrays(int size)
protected void validateGrouping(Query.Builder builder, Aggregation aggregation, PagingInfo pagingInfo, boolean isValidMeasuresWithoutGrouping)
protected com.google.common.collect.ImmutableList<com.appiancorp.core.expr.portable.ReadOnlyPropertyDescriptor> getAllVisibleProperties()
public void validateSortInfo(java.util.List<SortInfo> sorts)
validateSortInfo
in interface com.appiancorp.common.query.ValidatesSortInfo
protected void validateSortInfoForGrouping(java.util.List<SortInfo> sortInfos)
protected boolean isStringNil(java.lang.String str)
protected void validateAliasInner(java.lang.String alias)
protected java.lang.String validateAlias(java.lang.String alias, java.lang.String field)
protected void validateFieldDefinitionWithIdChainForSorting(com.appiancorp.core.expr.IdChain idChain)
public com.appiancorp.core.expr.portable.ReadOnlyType getValidatedFieldTypeForFilter(java.lang.String field)
getValidatedFieldTypeForFilter
in interface com.appiancorp.common.query.ValidatesFilterProperties
protected com.appiancorp.core.expr.portable.ReadOnlyType validateFieldDefinitionInner(java.lang.String alias, boolean disallowComplexFieldType, java.lang.String expr, ErrorCode nullFieldErrorCode, ErrorCode complexTypeErrorCode, ErrorCode indexOnMultipleErrorCode, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction)
protected com.appiancorp.core.expr.portable.ReadOnlyType validateFieldDefinitionWithIdChain(java.lang.String alias, boolean disallowComplexFieldType, com.appiancorp.core.expr.IdChain idChain, ErrorCode complexTypeErrorCode, ErrorCode indexOnMultipleErrorCode, AggregationFunction aggregationFunction, com.appiancorp.common.query.GroupingFunction groupingFunction) throws InvalidTypeException
InvalidTypeException
public TypedValue getValue(Filter filterToValidate)
getValue
in interface com.appiancorp.common.query.ValidatesFilterProperties
public java.lang.String getFieldDisplayName(java.lang.String fieldNameOrUuid)
getFieldDisplayName
in interface com.appiancorp.common.query.ValidatesFilterProperties
public java.lang.String validateFieldName(java.lang.String field)
validateFieldName
in interface com.appiancorp.common.query.ValidatesFilterProperties
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.