/** * Retrieves the query component out of the context. * * @param context * the action context. * @return the query component. */ @Override protected IQueryComponent getQueryComponent(Map<String, Object> context) { FilterableBeanCollectionModule module = (FilterableBeanCollectionModule) getModule(context); return module.getFilter(); }
/** * Serialize filter criteria. * * @return the serialized form of the filter criteria component * * @throws IOException * the iO exception */ public String serializeCriteria() throws IOException { return QueryComponentSerializationUtil.serializeFilter(getFilter(), new LinkedHashMap<String, Serializable>()); }
/** * Deserialize filter criteria from base 64 from * and hydrate que query component. * * @param filterAsBase64 * the serialized form of the filter criteria * @throws ClassNotFoundException * the class not found exception * @throws IOException * the iO exception */ public void deserializeCriteria(String filterAsBase64) throws ClassNotFoundException, IOException { Serializable[] criteria = QueryComponentSerializationUtil.deserializeFilter(filterAsBase64); hydrateCriteria(getFilter(), criteria); }
/** * {@inheritDoc} */ @Override public boolean execute(IActionHandler actionHandler, Map<String, Object> context) { if (queryAction != null) { FilterableBeanCollectionModule module = (FilterableBeanCollectionModule) getModuleConnector( context).getConnectorValue(); IValueConnector filterConnector = getModuleConnector(context) .getChildConnector("filter"); context .put(ActionContextConstants.QUERY_MODEL_CONNECTOR, filterConnector); IQueryComponent filter = (IQueryComponent) module.getFilter(); if (actionHandler.execute(queryAction, context)) { module.setModuleObjects(filter.getQueriedComponents()); filter.setQueriedComponents(null); } } return super.execute(actionHandler, context); }
Module module = getModule(context); if (module instanceof FilterableBeanCollectionModule) { IQueryComponent filter = ((FilterableBeanCollectionModule) module).getFilter(); if (filter != null) { if (queryComponentRefiner != null) {
queryComponentRefiner.refineQueryComponent(queryComponent, context); IQueryComponent previousFilter = filterableBeanCollectionModule.getFilter(); if (previousFilter != null) { queryComponent.setOrderingProperties(previousFilter.getOrderingProperties());
boolean oldNextPageEnabled = isNextPageEnabled(); boolean oldPreviousPageEnabled = isPreviousPageEnabled(); IQueryComponent oldValue = getFilter(); if (oldValue != null) { oldValue.removePropertyChangeListener(filterComponentTracker); firePropertyChange(IPageable.PREVIOUS_PAGE_ENABLED, oldPreviousPageEnabled, isPreviousPageEnabled()); firePropertyChange(FilterableBeanCollectionModuleDescriptor.FILTER, oldValue, getFilter());