Examples of PCPoint


Examples of org.apache.jdo.tck.pc.mylib.PCPoint

    private void runTestMakePersistent4(PersistenceManager pm) {
        Transaction tx = pm.currentTransaction();
        if (tx.isActive())
            tx.rollback();

        PCPoint np1 = new PCPoint(1,3);
        try {
            pm.makePersistent(np1);
            fail(ASSERTION_FAILED,
                 "pm.makePersistent outside of a tx should throw a JDOUserException");
        }
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

    private void runTestMakePersistent5(PersistenceManager pm) {
        Transaction tx = pm.currentTransaction();
        if (tx.isActive())
            tx.rollback();

        PCPoint np1 = new PCPoint (3,3);
        PCPoint np2 = new PCPoint (4,4);
       
        Collection col1 = new HashSet();
        col1.add(np1);
        col1.add(np2);
       
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

    private void runTestMakePersistent6(PersistenceManager pm) {
        Transaction tx = pm.currentTransaction();
        if (tx.isActive())
            tx.rollback();

        PCPoint np1 = new PCPoint (3,3);
        PCPoint np2 = new PCPoint (4,4);
       
        Collection col1 = new HashSet();
        col1.add(np1);
        col1.add(np2);
       
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

    protected void insertPCPoints(PersistenceManager pm, int numInsert) {
        Transaction tx = pm.currentTransaction();
        try {
            tx.begin();
            for(int i = 0; i<numInsert; i++) {
                Object pc = new PCPoint(i, i);
                pm.makePersistent(pc);
                inserted.add(pc);
            }
            tx.commit();
            tx = null;
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

    protected void printOutput(Object results, Collection expected) {
        if (!debug)
            return;

        Iterator iter = null;
        PCPoint pcp = null;
        if (results == null) {
            logger.debug("Query returns null");
        }
        if (!(results instanceof Collection)) {
            logger.debug("Query result is not a collection: " +
                         results.getClass().getName());
        }
        logger.debug("Retrived Objects are:");
        iter = ((Collection)results).iterator();
        while (iter.hasNext()) {
            pcp = (PCPoint)iter.next();
            logger.debug("X = " + pcp.getX() + "\tY = " + pcp.getY());
        }
           
        logger.debug("Expected Objects are:");
        iter = ((Collection)expected).iterator();
        while (iter.hasNext()) {
            pcp = (PCPoint)iter.next();
            logger.debug("X = " + pcp.getX() + "\tY = " + pcp.getY());
        }
    }
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

            query.setFilter("x == param");
            Object results = query.execute(new Integer(2));
   
            // check query result
            List expected = new ArrayList();
            Object p3 = new PCPoint(2, 2);
            expected.add(p3);
            expected = getFromInserted(expected);
            printOutput(results, expected);
            checkQueryResultWithoutOrder(ASSERTION_FAILED, results, expected);
            tx.commit();
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

            query.setFilter("x == param1 && y == param2");
            Object results = query.execute(new Integer(2), new Integer(2));

            // check query result
            List expected = new ArrayList();
            Object p3 = new PCPoint(2, 2);
            expected.add(p3);
            expected = getFromInserted(expected);
            printOutput(results, expected);
            checkQueryResultWithoutOrder(ASSERTION_FAILED, results, expected);
            tx.commit();
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

            query.setFilter("x == a && y == b");
            Object results = query.execute(new Integer(1), new Integer(1));

            // check query result
            List expected = new ArrayList();
            Object p = new PCPoint(1, 1);
            expected.add(p);
            expected = getFromInserted(expected);
            printOutput(results, expected);
            checkQueryResultWithoutOrder(ASSERTION_FAILED, results, expected);
            tx.commit();
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

            query.setFilter("y == param");
            Object results = query.execute(new Integer(2));

            // check query result
            List expected = new ArrayList();
            Object p3 = new PCPoint(2, 2);
            expected.add(p3);
            expected = getFromInserted(expected);
            printOutput(results, expected);
            checkQueryResultWithoutOrder(ASSERTION_FAILED, results, expected);
View Full Code Here

Examples of org.apache.jdo.tck.pc.mylib.PCPoint

            Query query = pm.newQuery(PCPoint.class, inserted, "x ==2");
            Object results = query.execute();

            // check query result
            List expected = new ArrayList();
            PCPoint pc1 = new PCPoint(2, 2);
            expected.add(pc1);
            expected = getFromInserted(expected);
            printOutput(results, expected);
            checkQueryResultWithoutOrder(ASSERTION_FAILED, results, expected);
           
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.