Examples of addRoot()


Examples of org.apache.jackrabbit.spi.commons.name.PathBuilder.addRoot()

        int pos = 0;
        if (jcrPath.charAt(0) == '/') {
            if (parent != null) {
                throw new MalformedPathException("'" + jcrPath + "' is not a relative path.");
            }
            builder.addRoot();
            pos++;
        }

        // add master if present
        if (parent != null) {
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.name.PathBuilder.addRoot()

        int pos = 0;
        if (jcrPath.charAt(0) == '/') {
            if (parent != null) {
                throw new MalformedPathException("'" + jcrPath + "' is not a relative path.");
            }
            builder.addRoot();
            pos++;
        }

        // add master if present
        if (parent != null) {
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.name.PathBuilder.addRoot()

        // We either walked up to an entry below root or up to an uniqueID. In the former
        // case we construct an NodeId with an absolute path. In the latter case we construct
        // a NodeId from an uuid and a relative path.
        if (entry.getParent() == null) {
            pathBuilder.addRoot();
            return idFactory.createNodeId((String) null, pathBuilder.getPath());
        }
        else {
            return idFactory.createNodeId(entry.getUniqueID(), pathBuilder.getPath());
        }
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.name.PathBuilder.addRoot()

                // not referenceable
                pathElements++;
                String jcrName = node.getName();
                if (jcrName.equals("")) {
                    // root node
                    builder.addRoot();
                    break;
                } else {
                    Name name;
                    try {
                        name = resolver.getQName(node.getName());
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.name.PathBuilder.addRoot()

        int pos = 0;
        if (jcrPath.charAt(0) == '/') {
            if (parent != null) {
                throw new MalformedPathException("'" + jcrPath + "' is not a relative path");
            }
            builder.addRoot();
            pos++;
        }

        // add master if present
        if (parent != null) {
View Full Code Here

Examples of org.apache.jackrabbit.spi.commons.name.PathBuilder.addRoot()

        // We either walked up to an entry below root or up to an uniqueID. In the former
        // case we construct an NodeId with an absolute path. In the latter case we construct
        // a NodeId from an uuid and a relative path.
        if (entry.getParent() == null) {
            pathBuilder.addRoot();
            return idFactory.createNodeId((String) null, pathBuilder.getPath());
        }
        else {
            return idFactory.createNodeId(entry.getUniqueID(), pathBuilder.getPath());
        }
View Full Code Here

Examples of org.apache.openjpa.persistence.query.QueryDefinition.addRoot()

        compare(jpql, e);
    }
   
    public void testOperatorPath() {
        QueryDefinition qdef = qb.createQueryDefinition();
        DomainObject item = qdef.addRoot(Item.class);
        DomainObject photo = item.join("photos");
        qdef.select(item.get("name"), photo.value())
            .where(photo.key().like("egret"));
       
       
View Full Code Here

Examples of org.apache.openjpa.persistence.query.QueryDefinition.addRoot()

        compare(jpql, p);
    }
   
    public void testParamater() {
        QueryDefinition qdef = qb.createQueryDefinition();
        DomainObject customer = qdef.addRoot(Customer.class);
        qdef.where(customer.get("status").equal(qdef.param("status")));
       
        String jpql = "select c from Customer c " +
                      " where c.status = :status";
        compare(jpql, qdef, "status", 1);
View Full Code Here

Examples of org.apache.openjpa.persistence.query.QueryDefinition.addRoot()

        compare(jpql, o);
    }

    public void testNonCorrelatedSubQuery() {
        QueryDefinition q1 = qb.createQueryDefinition();
        DomainObject goodCustomer = q1.addRoot(Customer.class);
       
        QueryDefinition q2 = qb.createQueryDefinition();
        DomainObject customer = q2.addRoot(Customer.class);
       
        q1.where(goodCustomer.get("balanceOwned")
View Full Code Here

Examples of org.apache.openjpa.persistence.query.QueryDefinition.addRoot()

    public void testNonCorrelatedSubQuery() {
        QueryDefinition q1 = qb.createQueryDefinition();
        DomainObject goodCustomer = q1.addRoot(Customer.class);
       
        QueryDefinition q2 = qb.createQueryDefinition();
        DomainObject customer = q2.addRoot(Customer.class);
       
        q1.where(goodCustomer.get("balanceOwned")
                .lessThan(q2.select(customer.get("balanceOwned").avg())));
       
        String jpql = "select c from Customer c "
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.