Package org.apache.openjpa.persistence.query

Examples of org.apache.openjpa.persistence.query.DomainObject.key()


    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"));
       
       
        String jpql = "select i.name, VALUE(p)"
                    + " from Item i join i.photos p"
                    + " where KEY(p) like 'egret'";
View Full Code Here


        QueryDefinition q = qb.createQueryDefinition();
        DomainObject v = q.addRoot(VideoStore.class);
        DomainObject i = v.join("videoInventory");
        q.where(v.get("location").get("zipCode").equal("94301").and(
            i.value().greaterThan(0)));
        q.select(v.get("location").get("street"), i.key().get("title"), i
            .value());
       
        String jpql = "SELECT v.location.street, KEY(v2).title, VALUE(v2)"
                    + " FROM VideoStore v JOIN v.videoInventory v2"
                    + " WHERE v.location.zipCode = '94301' AND VALUE(v2) > 0";
View Full Code Here

    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"));
       
       
        String jpql = "select i.name, VALUE(p)"
                    + " from Item i join i.photos p"
                    + " where KEY(p) like 'egret'";
View Full Code Here

        QueryDefinition q = qb.createQueryDefinition();
        DomainObject v = q.addRoot(VideoStore.class);
        DomainObject i = v.join("videoInventory");
        q.where(v.get("location").get("zipCode").equal("94301").and(
            i.value().greaterThan(0)));
        q.select(v.get("location").get("street"), i.key().get("title"), i
            .value());
       
        String jpql = "SELECT v.location.street, KEY(v2).title, VALUE(v2)"
                    + " FROM VideoStore v JOIN v.videoInventory v2"
                    + " WHERE v.location.zipCode = '94301' AND VALUE(v2) > 0";
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.