Examples of QueryBuilder


Examples of org.watermint.sourcecolon.org.opensolaris.opengrok.search.QueryBuilder

        }
    }

    private String createUrl(boolean menu) {
        StringBuilder url = new StringBuilder(64);
        QueryBuilder qb = getBuilder();
        if (menu) {
            url.append("search?");
        } else {
            Util.appendQuery(url, "sort", order.toString());
        }
        if (qb != null) {
            Util.appendQuery(url, "q", qb.getFreetext());
            Util.appendQuery(url, "defs", qb.getDefs());
            Util.appendQuery(url, "refs", qb.getRefs());
            Util.appendQuery(url, "path", qb.getPath());
        }
        return url.toString();
    }
View Full Code Here

Examples of org.zanata.util.QueryBuilder

        String searchCondition = buildSearchCondition();
        String stateCondition = buildStateCondition();
        String otherSourceCondition = buildSourceConditionsOtherThanSearch();
        String otherTargetCondition = buildTargetConditionsOtherThanSearch();

        QueryBuilder query =
                QueryBuilder
                        .select(selectStatement)
                        .from("HTextFlow tf")
                        .leftJoin("tf.targets tfts")
                        .with(eq("tfts.index", Locale.placeHolder()))
                        .where(and(obsoleteCondition, docIdCondition,
                                searchCondition, stateCondition,
                                otherSourceCondition, otherTargetCondition))
                        .orderBy("tf.pos");
        return query.toQueryString();
    }
View Full Code Here

Examples of uk.gov.nationalarchives.droid.core.interfaces.filter.expressions.QueryBuilder

        }
        Query query;
        String queryString = "";
        boolean filterExists = filter != null && filter.isEnabled();
        if (filterExists) {
            QueryBuilder queryBuilder = SqlUtils.getQueryBuilder(filter);
            String ejbFragment = queryBuilder.toEjbQl();
            boolean formatCriteriaExist = ejbFragment.contains("format.");
            String sqlFilter = SqlUtils.transformEJBtoSQLFields(ejbFragment, "profile", "form");
            queryString = formatCriteriaExist ? "select distinct profile.* " : "select profile.* ";
            queryString += "from profile_resource_node as profile ";
            if (formatCriteriaExist) {
                queryString += "inner join identification as ident on ident.node_id = profile.node_id"
                    + " inner join format as form on form.puid = ident.puid ";
            }
            queryString += "where " + sqlFilter;
            query = session.createSQLQuery(queryString).addEntity(ProfileResourceNode.class);
            int i = 0;
            for (Object value : queryBuilder.getValues()) {
                Object value2 = SqlUtils.transformParameterToSQLValue(value);
                query.setParameter(i++, value2);
            }       
        } else {
            queryString = "select * from profile_resource_node";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.