You can translate the question and the replies:

Condition controls in the base view of a custom wrapper connector

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?
user
17-02-2021 18:51:19 -0500

1 Answer

Hi, When using the method **SetAllowedParameter()**, I noticed that operations specified in the argument are delegated to the source whereas the other operators can be used but are not being delegated to the source. That is, when using the operators other than the allowed ones, I can see that these operations are being performed at the Virtual Layer instead. Furthermore, when I set the columns to be **searchable**, I noticed that conditions are being delegated to source. And when it is set to **‘not searchable’**, the conditions are being executed on the Virtual DataPort. Hence these conditions are used for delegating to the source rather than restricting the column from being searchable or not. As for** setDelegateProjections()**, this method takes in a boolean value of either true or false. If the function is set to **True** then the delegation of the view projection is set to the data source, if it's **false** then the projection is not delegated. You can take a look at the [Configuring a Custom Wrapper](https://community.denodo.com/docs/html/browse/8.0/en/vdp/developer/developing_extensions/developing_custom_wrappers/configuring_a_custom_wrapper) section under the Virtual DataPort Developer Guide for more details on the parameters. Hope this helps!
Denodo Team
23-02-2021 07:09:19 -0500
You must sign in to add an answer. If you do not have an account, you can register here