Package org.apache.jackrabbit.ocm.testmodel.uuid

Examples of org.apache.jackrabbit.ocm.testmodel.uuid.A


          ObjectContentManager ocm = getObjectContentManager();

            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            A a1 = new A();
            a1.setPath("/a1");
            a1.setStringData("testdata1");
            ocm.insert(a1);

            A a2 = new A();
            a2.setPath("/a2");
            a2.setStringData("testdata2");
            ocm.insert(a2);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the objects
            // --------------------------------------------------------------------------------
            a1 = (A) ocm.getObject( "/a1");
            assertNotNull("a1 is null", a1);
            a2 = (A) ocm.getObject( "/a2");
            assertNotNull("a2 is null", a2);
            ArrayList references = new ArrayList();
            references.add(a1.getUuid());
            references.add(a2.getUuid());

            // --------------------------------------------------------------------------------
            // Create and store an object B in the repository which has a collection of A
            // --------------------------------------------------------------------------------
            B b = new B();
View Full Code Here


          ObjectContentManager ocm = getObjectContentManager();

            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            A a1 = new A();
            a1.setPath("/a1");
            a1.setStringData("testdata1");
            ocm.insert(a1);

            A a2 = new A();
            a2.setPath("/a2");
            a2.setStringData("testdata2");
            ocm.insert(a2);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the objects
View Full Code Here

        this.getSession().getRootNode().addNode("test");
        this.getSession().getRootNode().addNode("references");
        this.getSession().save();

        A firstA = new A();
        A secondA = new A();
        A thirdA = new A();

        firstA.setPath("/references/a1");
        secondA.setPath("/references/a2");
        thirdA.setPath("/references/a3");

        firstA.setStringData("the first");
        secondA.setStringData("the second");
        thirdA.setStringData("the third");

        ocm.insert(firstA);
        ocm.insert(secondA);
        ocm.insert(thirdA);

        assertNotNull(firstA.getPath());
        assertNotNull(secondA.getPath());
        assertNotNull(thirdA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());
        secondA = (A) ocm.getObject(secondA.getPath());
        thirdA = (A) ocm.getObject(thirdA.getPath());

        assertNotNull(firstA.getUuid());
        assertNotNull(secondA.getUuid());
        assertNotNull(thirdA.getUuid());


        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
View Full Code Here

        this.getSession().getRootNode().addNode("test");
        this.getSession().getRootNode().addNode("references");
        this.getSession().save();

        A firstA = new A();

        firstA.setPath("/references/a1");

        firstA.setStringData("the data");

        ocm.insert(firstA);

        assertNotNull(firstA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());

        assertNotNull(firstA.getUuid());

        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
        main.getReferenceMap().put("keySecond", firstA);
View Full Code Here

        this.getSession().getRootNode().addNode("test");
        this.getSession().getRootNode().addNode("references");
        this.getSession().save();

        A firstA = new A();
        A secondA = new A();
        A thirdA = new A();

        firstA.setPath("/references/a1");
        secondA.setPath("/references/a2");
        thirdA.setPath("/references/a3");

        firstA.setStringData("the first");
        secondA.setStringData("the second");
        thirdA.setStringData("the third");

        ocm.insert(firstA);
        ocm.insert(secondA);
        ocm.insert(thirdA);

        assertNotNull(firstA.getPath());
        assertNotNull(secondA.getPath());
        assertNotNull(thirdA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());
        secondA = (A) ocm.getObject(secondA.getPath());
        thirdA = (A) ocm.getObject(thirdA.getPath());

        assertNotNull(firstA.getUuid());
        assertNotNull(secondA.getUuid());
        assertNotNull(thirdA.getUuid());


        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
View Full Code Here

        this.getSession().getRootNode().addNode("test");
        this.getSession().getRootNode().addNode("references");
        this.getSession().save();

        A firstA = new A();
        A secondA = new A();
        A thirdA = new A();

        firstA.setPath("/references/a1");
        secondA.setPath("/references/a2");
        thirdA.setPath("/references/a3");

        firstA.setStringData("the first");
        secondA.setStringData("the second");
        thirdA.setStringData("the third");

        ocm.insert(firstA);
        ocm.insert(secondA);
        ocm.insert(thirdA);

        assertNotNull(firstA.getPath());
        assertNotNull(secondA.getPath());
        assertNotNull(thirdA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());
        secondA = (A) ocm.getObject(secondA.getPath());
        thirdA = (A) ocm.getObject(thirdA.getPath());

        assertNotNull(firstA.getUuid());
        assertNotNull(secondA.getUuid());
        assertNotNull(thirdA.getUuid());


        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
View Full Code Here

        this.getSession().getRootNode().addNode("test");
        this.getSession().getRootNode().addNode("references");
        this.getSession().save();

        A firstA = new A();
        A secondA = new A();
        A thirdA = new A();

        firstA.setPath("/references/a1");
        secondA.setPath("/references/a2");
        thirdA.setPath("/references/a3");

        firstA.setStringData("the first");
        secondA.setStringData("the second");
        thirdA.setStringData("the third");

        ocm.insert(firstA);
        ocm.insert(secondA);
        ocm.insert(thirdA);

        assertNotNull(firstA.getPath());
        assertNotNull(secondA.getPath());
        assertNotNull(thirdA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());
        secondA = (A) ocm.getObject(secondA.getPath());
        thirdA = (A) ocm.getObject(thirdA.getPath());

        assertNotNull(firstA.getUuid());
        assertNotNull(secondA.getUuid());
        assertNotNull(thirdA.getUuid());


        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
View Full Code Here

        this.getSession().getRootNode().addNode("test");
        this.getSession().getRootNode().addNode("references");
        this.getSession().save();

        A firstA = new A();
        A secondA = new A();
        A thirdA = new A();
        A fourthA = new A();

        firstA.setPath("/references/a1");
        secondA.setPath("/references/a2");
        thirdA.setPath("/references/a3");
        fourthA.setPath("/references/a4");

        firstA.setStringData("the first");
        secondA.setStringData("the second");
        thirdA.setStringData("the third");

        ocm.insert(firstA);
        ocm.insert(secondA);
        ocm.insert(thirdA);
        ocm.insert(fourthA);

        assertNotNull(firstA.getPath());
        assertNotNull(secondA.getPath());
        assertNotNull(thirdA.getPath());
        assertNotNull(fourthA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());
        secondA = (A) ocm.getObject(secondA.getPath());
        thirdA = (A) ocm.getObject(thirdA.getPath());
        fourthA = (A) ocm.getObject(fourthA.getPath());

        assertNotNull(firstA.getUuid());
        assertNotNull(secondA.getUuid());
        assertNotNull(thirdA.getUuid());
        assertNotNull(fourthA.getUuid());


        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
View Full Code Here

        ocm.getSession().getRootNode().addNode("test");
        ocm.getSession().getRootNode().addNode("references");
        ocm.getSession().save();

        A firstA = new A();
        A secondA = new A();
        A thirdA = new A();

        firstA.setPath("/references/a1");
        secondA.setPath("/references/a2");
        thirdA.setPath("/references/a3");

        firstA.setStringData("the first");
        secondA.setStringData("the second");
        thirdA.setStringData("the third");

        ocm.insert(firstA);
        ocm.insert(secondA);
        ocm.insert(thirdA);

        assertNotNull(firstA.getPath());
        assertNotNull(secondA.getPath());
        assertNotNull(thirdA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());
        secondA = (A) ocm.getObject(secondA.getPath());
        thirdA = (A) ocm.getObject(thirdA.getPath());

        assertNotNull(firstA.getUuid());
        assertNotNull(secondA.getUuid());
        assertNotNull(thirdA.getUuid());


        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
View Full Code Here

        ocm.getSession().getRootNode().addNode("test");
        ocm.getSession().getRootNode().addNode("references");
        ocm.getSession().save();

        A firstA = new A();

        firstA.setPath("/references/a1");

        firstA.setStringData("the data");

        ocm.insert(firstA);

        assertNotNull(firstA.getPath());

        firstA = (A) ocm.getObject(firstA.getPath());

        assertNotNull(firstA.getUuid());

        Main main = new Main();
        main.setPath("/test/1");
        main.getReferenceMap().put("keyFirst", firstA);
        main.getReferenceMap().put("keySecond", firstA);
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.testmodel.uuid.A

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.