class InStockProductSearchQueryBuilder extends AbstractSearchQueryBuilderImpl implements ProductSearchQueryBuilder<Query> {

    @Override
    public List<Query> createQueryChain(final NavigationContext<Query> navigationContext, final String parameter, final Object value) {

        String strValue = "1";
        if (value instanceof Collection) {
            if (CollectionUtils.isNotEmpty((Collection) value)) {
                strValue = "0".equals(((Collection) value).iterator().next()) ? "0" : "1";
            }
        } else {
            strValue = "0".equals(value) ? "0" : "1";
        }

        return Collections.singletonList(createNumericQuery(PRODUCT_SHOP_INSTOCK_FLAG_FIELD + strValue, navigationContext.getCustomerShopId()));
    }

}