Package org.apache.jdo.tck.pc.mylib

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


    /** */
    public void testRetrieve() {
        setBothGroup();
        pm.currentTransaction().begin();
        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
        pm.retrieve(instance, true);
        checkBothLoaded(ASSERTION_FAILED, instance);
        pm.currentTransaction().commit();
        failOnError();
    }
View Full Code Here


    /** */
    public void testRetrieveAllCollection() {
        setBothGroup();
        pm.currentTransaction().begin();
        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
        Collection instances = new HashSet();
        instances.add(instance);
        pm.retrieveAll(instances, true);
        checkBothLoaded(ASSERTION_FAILED, instance);
        pm.currentTransaction().commit();
View Full Code Here

    /** */
    public void testRetrieveAllArray() {
        setBothGroup();
        pm.currentTransaction().begin();
        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
        Object[] instances = new Object[]{instance};
        pm.retrieveAll(instances, true);
        checkBothLoaded(ASSERTION_FAILED, instance);
        pm.currentTransaction().commit();
        failOnError();
View Full Code Here

            tx.begin();
            p1   = new PCPoint(1,1);
            p1print = p1.toString();
            p2   = new PCPoint(2,2);
            p3   = new PCPoint2(3,3);
            rect = new PCRect(100, p1, p2);
            pm.makePersistent(p1);
            pm.makePersistent(p2);
            pm.makePersistent(p3);
            pm.makePersistent(rect);
            if (debug) {
View Full Code Here

   
    /** */
    public void testMakeTransientAllCollection() {
        setBothGroup();
        pm.currentTransaction().begin();
        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
        Collection instances = new HashSet();
        instances.add(instance);
        pm.makeTransientAll(instances, true);
        checkBothLoaded(ASSERTION_FAILED, instance);
        pm.currentTransaction().commit();
View Full Code Here

    /** */
    public void testMakeTransientAllArray() {
        setBothGroup();
        pm.currentTransaction().begin();
        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
        pm.makeTransientAll(new Object[]{instance}, true);
        checkBothLoaded(ASSERTION_FAILED, instance);
        pm.currentTransaction().commit();
        failOnError();
    }
View Full Code Here

    /** */
    public void testMakeTransient() {
        setBothGroup();
        pm.currentTransaction().begin();
        PCRect instance = (PCRect)pm.getObjectById(pcrectoid, false);
        pm.makeTransient(instance, true);
        checkBothLoaded(ASSERTION_FAILED, instance);
        pm.currentTransaction().commit();
        failOnError();
    }
View Full Code Here

    protected void localSetUp() {
        addTearDownClass(PCRect.class);
        addTearDownClass(PCPoint.class);
        upperLeft = new PCPoint(0,10);
        lowerRight = new PCPoint(10,0);
        pcrect = new PCRect(upperLeft, lowerRight);
        getPM().currentTransaction().begin();
        pm.makePersistent(pcrect); // makes all three persistent
        upperLeftoid = pm.getObjectId(upperLeft);
        lowerRightoid = pm.getObjectId(lowerRight);
        pcrectoid = pm.getObjectId(pcrect);
View Full Code Here

        pm.currentTransaction().begin();
        Query query = pm.newQuery(PCRect.class);
        checkGroups(ASSERTION_FAILED + " after newQuery().getFetchPlan()",
                query.getFetchPlan(), bothGroup);
        query.setUnique(true);
        PCRect instance = (PCRect)query.execute();
        checkBothLoaded(ASSERTION_FAILED + " after query.execute()", instance);
        pm.currentTransaction().commit();
        failOnError();
    }
View Full Code Here

TOP

Related Classes of org.apache.jdo.tck.pc.mylib.PCRect

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.