Search in sources :

Example 1 with ICustomFilterPredicateCreatorPlugin

use of org.jowidgets.cap.service.jpa.api.plugin.ICustomFilterPredicateCreatorPlugin in project jo-client-platform by jo-source.

the class CriteriaQueryCreator method getCustomFilterPredicateCreator.

@SuppressWarnings({ "rawtypes", "unchecked" })
private ICustomFilterPredicateCreator<PARAM_TYPE> getCustomFilterPredicateCreator(final ICustomFilter customFilter) {
    ICustomFilterPredicateCreator<PARAM_TYPE> result = customFilterPredicateCreators.get(customFilter.getFilterType());
    final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
    propertiesBuilder.add(ICustomFilterPredicateCreatorPlugin.FILTER_TYPE_PROPERTY_KEY, customFilter.getFilterType());
    propertiesBuilder.add(ICustomFilterPredicateCreatorPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
    final List<ICustomFilterPredicateCreatorPlugin<Object>> plugins = PluginProvider.getPlugins(ICustomFilterPredicateCreatorPlugin.ID, propertiesBuilder.build());
    for (final ICustomFilterPredicateCreatorPlugin plugin : plugins) {
        result = plugin.getPredicateCreator(result);
    }
    return result;
}
Also used : IPluginPropertiesBuilder(org.jowidgets.plugin.api.IPluginPropertiesBuilder) ICustomFilterPredicateCreatorPlugin(org.jowidgets.cap.service.jpa.api.plugin.ICustomFilterPredicateCreatorPlugin)

Aggregations

ICustomFilterPredicateCreatorPlugin (org.jowidgets.cap.service.jpa.api.plugin.ICustomFilterPredicateCreatorPlugin)1 IPluginPropertiesBuilder (org.jowidgets.plugin.api.IPluginPropertiesBuilder)1