Examples of DependentFieldsPC


Examples of org.apache.openjpa.persistence.kernel.common.apps.DependentFieldsPC

    }

    private void nullDeletesDependent(int action) {
        OpenJPAEntityManager pm =
            (OpenJPAEntityManager) currentEntityManager();
        DependentFieldsPC pc;
        DependentFieldsPC depRel;
        while (true) {
            startTx(pm);
            pc = (DependentFieldsPC) pm.find(DependentFieldsPC.class, _root);
            depRel = pc.getDependentRelation();
            assertEquals(_depRel, pm.getObjectId(depRel));
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.DependentFieldsPC

    }

    private void removeDeletesDependent(int action) {
        OpenJPAEntityManager pm =
            (OpenJPAEntityManager) currentEntityManager();
        DependentFieldsPC pc;
        DependentFieldsPC depColl;
        DependentFieldsPC depMap;
        List list;
        Map map;
        while (true) {
            startTx(pm);
            pc = (DependentFieldsPC) pm.find(DependentFieldsPC.class, _root);
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.DependentFieldsPC

    }

    private void moveDependentInContainer(int action) {
        OpenJPAEntityManager pm =
            (OpenJPAEntityManager) currentEntityManager();
        DependentFieldsPC pc;
        DependentFieldsPC depColl;
        DependentFieldsPC depMap;
        List list;
        Map map;
        while (true) {
            startTx(pm);
            pc = (DependentFieldsPC) pm.find(DependentFieldsPC.class, _root);
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.DependentFieldsPC

    }

    private void refedDependentNotDeleted(int action) {
        OpenJPAEntityManager pm =
            (OpenJPAEntityManager) currentEntityManager();
        DependentFieldsPC pc;
        DependentFieldsPC newPC = null;
        DependentFieldsPC depRel;
        while (true) {
            startTx(pm);
            pc = (DependentFieldsPC) pm.find(DependentFieldsPC.class, _root);
            if (newPC == null)
                newPC = new DependentFieldsPC();
            depRel = pc.getDependentRelation();
            newPC.setDependentRelation(depRel);
            pc.setDependentRelation(null);
            pm.persist(newPC);
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.DependentFieldsPC

    }

    private void nullSharedDependent(int action) {
        OpenJPAEntityManager pm =
            (OpenJPAEntityManager) currentEntityManager();
        DependentFieldsPC pc;
        DependentFieldsPC repeat;
        List list;
        Map map;
        while (true) {
            startTx(pm);
            pc = (DependentFieldsPC) pm.find(DependentFieldsPC.class, _root);
View Full Code Here

Examples of org.apache.openjpa.persistence.kernel.common.apps.DependentFieldsPC

    }

    private void clearDependentOfDetachedTest(boolean mapped) {
        deleteAll(DependentFieldsPC.class);

        DependentFieldsPC owner = new DependentFieldsPC();
        for (int i = 0; i < 2; i++) {
            DependentFieldsPC child = new DependentFieldsPC();
            if (mapped) {
                owner.getDependentMappedList().add(child);
                child.setOwner(owner);
            } else
                owner.getDependentInverseKeyList().add(child);
        }

        OpenJPAEntityManager pm =
            (OpenJPAEntityManager) currentEntityManager();
        startTx(pm);
        pm.persist(owner);
        endTx(pm);
        Object oid = pm.getObjectId(owner);
        assertEquals(3,
            ((Extent) pm.createExtent(DependentFieldsPC.class, true))
                .list().size());
        endEm(pm);

        pm = (OpenJPAEntityManager) currentEntityManager();
        owner = (DependentFieldsPC) pm.find(DependentFieldsPC.class, oid);
        if (mapped)
            assertEquals(2, owner.getDependentMappedList().size());
        else
            assertEquals(2, owner.getDependentInverseKeyList().size());
        DependentFieldsPC detached = (DependentFieldsPC) pm.detachCopy(owner);
        endEm(pm);

        if (mapped) {
            assertEquals(2, detached.getDependentMappedList().size());
            detached.getDependentMappedList().clear();
        } else {
            assertEquals(2, detached.getDependentInverseKeyList().size());
            detached.getDependentInverseKeyList().clear();
        }

        pm = (OpenJPAEntityManager) currentEntityManager();
        startTx(pm);
        owner = (DependentFieldsPC) pm.merge(detached);
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.