Package org.apache.openjpa.persistence.proxy

Examples of org.apache.openjpa.persistence.proxy.TreeNode


    /**
     * Create and persist a uniform OneToMany tree with given fan out.
     */
    private TreeNode createTreeNodeEntities(int[] original) {
        TreeNode root = new TreeNode();
        root.createTree(original);
        assertArrayEquals(original, root.getFanOuts());
       
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        em.persist(root);
        em.getTransaction().commit();
View Full Code Here


       
        em.close();               
    }

    public void createTree() {
        TreeNode root = new TreeNode();
        root.setName("0");
        int[] fanOuts = {1,2,3};
        root.createTree(fanOuts);
        assertArrayEquals(fanOuts, root.getFanOuts());
    }
View Full Code Here

    /**
     * Create a uniform tree with given fan out.
     * Persist.
     */
    TreeNode create(int[] original) {
        TreeNode root = new TreeNode();
        root.createTree(original);
       
        EntityManager em = emf.createEntityManager();
        em.getTransaction().begin();
        em.persist(root);
        em.getTransaction().commit();
View Full Code Here

TOP

Related Classes of org.apache.openjpa.persistence.proxy.TreeNode

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.