Package org.apache.openjpa.persistence.query

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


    }

    public void testIndex() {
        DomainObject c = qb.createQueryDefinition(Course.class);
        DomainObject w = c.join("studentWaitList");
        c.where(c.get("name").equal("Calculus").and(w.index().equal(0)))
         .select(w.get("name"));
       
        String jpql = "select s.name" +
                      " from Course c join c.studentWaitList s" +
                      " where c.name = 'Calculus' and INDEX(s) = 0";
View Full Code Here


   
    public void testBetween() {
        DomainObject c = qb.createQueryDefinition(CreditCard.class);
        DomainObject t = c.join("transactionHistory");
        c.select(t).where(c.get("holder").get("name").equal("John Doe")
                .and(t.index().between(0, 9)));
       
       
        String jpql = "select t from CreditCard c JOIN c.transactionHistory t" +
                      " where c.holder.name = 'John Doe' AND INDEX(t) " +
                      " BETWEEN 0 AND 9";
View Full Code Here

    }

    public void testIndex() {
        DomainObject c = qb.createQueryDefinition(Course.class);
        DomainObject w = c.join("studentWaitList");
        c.where(c.get("name").equal("Calculus").and(w.index().equal(0)))
         .select(w.get("name"));
       
        String jpql = "select s.name" +
                      " from Course c join c.studentWaitList s" +
                      " where c.name = 'Calculus' and INDEX(s) = 0";
View Full Code Here

   
    public void testBetween() {
        DomainObject c = qb.createQueryDefinition(CreditCard.class);
        DomainObject t = c.join("transactionHistory");
        c.select(t).where(c.get("holder").get("name").equal("John Doe")
                .and(t.index().between(0, 9)));
       
       
        String jpql = "select t from CreditCard c JOIN c.transactionHistory t" +
                      " where c.holder.name = 'John Doe' AND INDEX(t) " +
                      " BETWEEN 0 AND 9";
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.