Filtering

The filter used in the List or Show request is available as input (i.filter) for the before execute hook and the on execute hook. The filter is an xml structure containing a standard filter as used for the List and Show methods. If no filtering is applied, the filter may be 0 or contain an empty filter node (<Filter/>).

In case of a batch implementation, the hook must take care that filtering is done. If the List or Show request is delegated to another business object, that business object will take care of that.

In case of a top-down implementation, the filter does not have to be used in the on execute hook. The standard generated logic will apply ‘postfiltering’ if needed. Postfiltering is needed in two situations. (1) If one of the components being filtered has an on execute hook. (2) If one of the components being filtered does not have an on execute hook itself, but has a parent that has an on execute hook. That means the filter is applied after building the response message. However, the filter can be used in the on execute hook to optimize performance, by reducing the number of component instances being returned.