I limited the allowed operators to “=”, “>=”, and “<=” by overriding the getConfiguration method with
CustomWrapperConfiguration configuration = super.getConfiguration();
configuration.setAllowedOperators(new String[] {
CustomWrapperCondition.OPERATOR_EQ,
CustomWrapperCondition.OPERATOR_GE,
CustomWrapperCondition.OPERATOR_LE
});
and also overriding the getSchemaParameters method with
return new CustomWrapperSchemaParameter[] {
new CustomWrapperSchemaParameter(fieldName1, propTypeInt1, columns, isSearchable, sortableStatus, isUpdateble, isNullable, isMandatory),
new CustomWrapperSchemaParameter(fieldName2, propTypeInt2, columns, isSearchable, sortableStatus, isUpdateble, isNullable, isMandatory),
new CustomWrapperSchemaParameter(fieldName3, propTypeInt3, columns, isSearchable, sortableStatus, isUpdateble, isNullable, isMandatory)
}
where isSearchable, sortableStatus, isUpdateble, isNullable, isMandatory are all set to ‘false’.
The custom wrapper correctly ignores all conditions containing operators other then those specified in getConfiguration passed by user inputs via CustomWrapperConditionHolder of the run method, but in the execution panel of the base view of the custom data source, all operators are still shown selectable in the condition control panel to users, and all attributes are also still shown selectable to construct the WHERE clause in SQL. Overriding the getConfiguration and getSchemaParameters methods does not seem to affect the condition control panel of the base view. Is there anything I did wrong?
I also tried to use
configuration.setDelegateProjections(false) but did not see any difference. I don’t quite understand this setDelegateProjects method either. What does it do?