Package org.apache.jackrabbit.api.security.user.QueryBuilder

Examples of org.apache.jackrabbit.api.security.user.QueryBuilder.Direction


            offset = 0;
        }

        Condition condition = builder.getCondition();
        String sortCol = builder.getSortProperty();
        Direction sortDir = builder.getSortDirection();
        if (bound != null) {
            if (sortCol == null) {
                log.warn("Ignoring bound {} since no sort order is specified");
            } else {
                Condition boundCondition = builder.property(sortCol, getCollation(sortDir), bound);
                condition = condition == null
                        ? boundCondition
                        : builder.and(condition, boundCondition);
            }
        }

        if (condition != null) {
            xPath.append('[');
            condition.accept(this);
            xPath.append(']');
        }

        if (sortCol != null) {
            xPath.append(" order by ")
                    .append(sortCol)
                    .append(' ')
                    .append(sortDir.getDirection());
        }

        QueryManager queryManager = session.getWorkspace().getQueryManager();
        Query query = queryManager.createQuery(xPath.toString(), Query.XPATH);
        long maxCount = builder.getMaxCount();
View Full Code Here


            offset = 0;
        }

        Condition condition = builder.getCondition();
        String sortCol = builder.getSortProperty();
        Direction sortDir = builder.getSortDirection();
        if (bound != null) {
            if (sortCol == null) {
                log.warn("Ignoring bound {} since no sort order is specified");
            } else {
                Condition boundCondition = builder.property(sortCol, getCollation(sortDir), bound);
                condition = condition == null
                        ? boundCondition
                        : builder.and(condition, boundCondition);
            }
        }

        if (condition != null) {
            xPath.append('[');
            condition.accept(this);
            xPath.append(']');
        }

        if (sortCol != null) {
            boolean ignoreCase = builder.getSortIgnoreCase();
            xPath.append(" order by ")
                    .append(ignoreCase ? "" : "fn:lower-case(")
                    .append(sortCol)
                    .append(ignoreCase ? " " : ") ")
                    .append(sortDir.getDirection());
        }

        QueryManager queryManager = session.getWorkspace().getQueryManager();
        Query query = queryManager.createQuery(xPath.toString(), Query.XPATH);
        long maxCount = builder.getMaxCount();
View Full Code Here

            offset = 0;
        }

        Condition condition = builder.getCondition();
        String sortCol = builder.getSortProperty();
        Direction sortDir = builder.getSortDirection();
        if (bound != null) {
            if (sortCol == null) {
                log.warn("Ignoring bound {} since no sort order is specified");
            } else {
                Condition boundCondition = builder.property(sortCol, getCollation(sortDir), bound);
                condition = condition == null
                        ? boundCondition
                        : builder.and(condition, boundCondition);
            }
        }

        if (condition != null) {
            xPath.append('[');
            condition.accept(this);
            xPath.append(']');
        }

        if (sortCol != null) {
            boolean ignoreCase = builder.getSortIgnoreCase();
            xPath.append(" order by ")
                    .append(ignoreCase ? "" : "fn:lower-case(")
                    .append(sortCol)
                    .append(ignoreCase ? " " : ") ")
                    .append(sortDir.getDirection());
        }

        QueryManager queryManager = session.getWorkspace().getQueryManager();
        Query query = queryManager.createQuery(xPath.toString(), Query.XPATH);
        long maxCount = builder.getMaxCount();
View Full Code Here

            offset = 0;
        }

        Condition condition = builder.getCondition();
        String sortCol = builder.getSortProperty();
        Direction sortDir = builder.getSortDirection();
        if (bound != null) {
            if (sortCol == null) {
                log.warn("Ignoring bound {} since no sort order is specified");
            } else {
                Condition boundCondition = builder.property(sortCol, getCollation(sortDir), bound);
                condition = condition == null
                        ? boundCondition
                        : builder.and(condition, boundCondition);
            }
        }

        if (condition != null) {
            xPath.append('[');
            condition.accept(this);
            xPath.append(']');
        }

        if (sortCol != null) {
            boolean ignoreCase = builder.getSortIgnoreCase();
            xPath.append(" order by ")
                    .append(ignoreCase ? "" : "fn:lower-case(")
                    .append(sortCol)
                    .append(ignoreCase ? " " : ") ")
                    .append(sortDir.getDirection());
        }

        QueryManager queryManager = session.getWorkspace().getQueryManager();
        Query query = queryManager.createQuery(xPath.toString(), Query.XPATH);
        long maxCount = builder.getMaxCount();
View Full Code Here

            offset = 0;
        }

        Condition condition = builder.getCondition();
        String sortCol = builder.getSortProperty();
        Direction sortDir = builder.getSortDirection();
        if (bound != null) {
            if (sortCol == null) {
                log.warn("Ignoring bound {} since no sort order is specified");
            } else {
                Condition boundCondition = builder.property(sortCol, getCollation(sortDir), bound);
                condition = condition == null
                        ? boundCondition
                        : builder.and(condition, boundCondition);
            }
        }

        if (condition != null) {
            xPath.append('[');
            condition.accept(this);
            xPath.append(']');
        }

        if (sortCol != null) {
            xPath.append(" order by ")
                    .append(sortCol)
                    .append(' ')
                    .append(sortDir.getDirection());
        }

        QueryManager queryManager = session.getWorkspace().getQueryManager();
        Query query = queryManager.createQuery(xPath.toString(), Query.XPATH);
        long maxCount = builder.getMaxCount();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.api.security.user.QueryBuilder.Direction

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.