Package javax.persistence

Examples of javax.persistence.Tuple


        }

        // cheap way to ensure that we have the same contents.
        // if needed an orderBy clause can be added to make this more robust.
        Object[] jpqlTuple;
        Tuple criteriaTuple;
        OrderProducer constructTuple;
        for (int i = 0; i < jpqlResults.size(); i++) {
            jpqlTuple = jpqlResults.get(i);
            criteriaTuple = criteriaResults.get(i);
            constructTuple = constructResults.get(i);
            assertEquals(jpqlTuple[0], criteriaTuple.get(0));
            assertEquals(jpqlTuple[1], criteriaTuple.get(1));
            assertEquals(jpqlTuple[0], constructTuple.getOrder());
            assertEquals(jpqlTuple[1], constructTuple.getProducer());
        }
        em.close();
    }
View Full Code Here


   
    @Test
    public void testEqualsCriteriaQueryTuple() throws Exception {
        List<Tuple> books = criteriaQueryBooksTuple("id==10");
        assertEquals(1, books.size());
        Tuple tuple = books.get(0);
        int tupleId = tuple.get("id", Integer.class);
        assertEquals(10, tupleId);
    }
View Full Code Here

   
    @Test
    public void testEqualsCriteriaQueryTuple() throws Exception {
        List<Tuple> books = criteriaQueryBooksTuple("id eq 10");
        assertEquals(1, books.size());
        Tuple tuple = books.get(0);
        int tupleId = tuple.get("id", Integer.class);
        assertEquals(10, tupleId);
    }
View Full Code Here

TOP

Related Classes of javax.persistence.Tuple

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.