Package com.ponysdk.core.query

Examples of com.ponysdk.core.query.Query


                final String msg = "Selected item : " + event.getSelectedItem().getReplacementString();
                UIContext.getRootEventBus().fireEvent(new DemoBusinessEvent(msg));
            }
        });

        final Query query = new Query();
        final FindPonysCommand command = new FindPonysCommand(query);
        final Result<List<Pony>> ponys = command.execute();

        final List<String> datas = new ArrayList<String>();
        for (final Pony pony : ponys.getData()) {
View Full Code Here


        tree.addItem(firstItem);
        tree.addItem(secondItem);
        tree.addItem(thirdItem);

        final Query query = new Query();
        final FindPonysCommand command = new FindPonysCommand(query);
        final Result<List<Pony>> ponys = command.execute();

        for (final Pony pony : ponys.getData()) {
            firstItem.addItem(pony.getName());
View Full Code Here

    protected void onFirstShowPage() {
        super.onFirstShowPage();

        final PFlowPanel flowPanel = new PFlowPanel();

        FindPonysCommand command = new FindPonysCommand(new Query());
        List<Pony> ponyList = command.execute().getData();

        for (Pony pony : ponyList) {
            flowPanel.add(new PCheckBox(pony.getName()));
        }
View Full Code Here

        if (queriable.asHasCriteria() != null) hasCriteriaList.add(queriable.asHasCriteria());
        if (queriable.asValidable() != null) validableList.add(queriable.asValidable());
    }

    public List<T> getData() {
        final Query query = buildQuery();
        query.setPageNum(pager.getCurrentPage());
        query.setPageSize(pager.getPageSize());
        return getData(query);
    }
View Full Code Here

        query.setPageSize(pager.getPageSize());
        return getData(query);
    }

    public List<T> getFullData() {
        final Query query = buildQuery();
        query.setQueryMode(QueryMode.FULL_RESULT);
        return getFullData(query);
    }
View Full Code Here

            resetable.reset();
        }
    }

    public Query buildQuery() {
        final Query query = new Query();
        for (final HasCriteria criteriable : hasCriteriaList) {
            query.addCriteria(criteriable.getCriteria());
        }
        return query;
    }
View Full Code Here

                        final SelectionResult<D> selectionResult = getSelectedData();
                        if (selectionResult.getSelectedData() != null && selectionResult.getSelectedData().isEmpty()) {
                            PNotificationManager.notify("Export failed, please select data to export", Notification.WARNING_MESSAGE);
                            return;
                        }
                        final Query query = createQuery(currentPage);
                        if (SelectionMode.FULL.equals(selectionMode)) {
                            query.setQueryMode(QueryMode.FULL_RESULT);
                        }
                        final ExportContext<D> exportContext = new ExportContext<D>(query, complexListConfiguration.getExportConfiguration().getExportableFields(), selectionResult);
                        exportContext.setExporter(exporter);

                        final Command<String> command = commandFactory.newExportCommand(ComplexListActivity.this, exportContext);
View Full Code Here

    public void refresh(final int page) {
        if (complexListConfiguration.isSearchFormMustBeValid()) {
            if (!searchFormActivity.isValid()) { return; }
        }

        final Query query = createQuery(page);
        final Command<Result<List<D>>> command = commandFactory.newFindCommand(ComplexListActivity.this, query);
        if (command == null) { throw new IllegalStateException("FindCommand of the complex list can't be null"); }
        command.execute();
        complexListView.updateView();
View Full Code Here

            final Criterion criterionField = new Criterion(currentSortingPojoPropertyKey);
            criterionField.setSortingType(currentSortingType);
            criteria.add(criterionField);
        }

        final Query query = new Query();
        query.setCriteria(criteria);
        query.setPageNum(page);
        query.setPageSize(complexListConfiguration.getPageSize());
        return query;
    }
View Full Code Here

TOP

Related Classes of com.ponysdk.core.query.Query

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.