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

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



            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            Descendant a = new Descendant();
            a.setPath("/descendant");
            a.setStringData("testdata");
            ocm.insert(a);
            ocm.save();          

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            a = (Descendant) ocm.getObject( "/descendant");
            assertNotNull("a is null", a);
            String uuidA = a.getUuid();
            assertNotNull("uuid is null", uuidA);
            System.out.println("UUID : " + uuidA);
           
            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setStringData("testdata2");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            a = (Descendant) ocm.getObject("/descendant");
            assertNotNull("a is null", a);
            assertTrue("The uuid has been modified", uuidA.equals(a.getUuid()));
           
            // --------------------------------------------------------------------------------
            // Get the object with the uuid
            // --------------------------------------------------------------------------------          
            a = (Descendant) ocm.getObjectByUuid(uuidA);
            assertNotNull("a is null", a);
            assertTrue("Invalid object found with the uuid ", "testdata2".equals(a.getStringData()));
           
           
        }
        catch (Exception e)
        {
View Full Code Here



            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            Descendant a = new Descendant();
            a.setPath("/descendant");
            a.setStringData("testdata");
            ocm.insert(a);
            ocm.save();          

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            a = (Descendant) ocm.getObject( "/descendant");
            assertNotNull("a is null", a);
            String uuidA = a.getUuid();
            assertNotNull("uuid is null", uuidA);
            System.out.println("UUID : " + uuidA);
           
            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setStringData("testdata2");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            a = (Descendant) ocm.getObject("/descendant");
            assertNotNull("a is null", a);
            assertTrue("The uuid has been modified", uuidA.equals(a.getUuid()));
           
            // --------------------------------------------------------------------------------
            // Get the object with the uuid
            // --------------------------------------------------------------------------------          
            a = (Descendant) ocm.getObjectByUuid(uuidA);
            assertNotNull("a is null", a);
            assertTrue("Invalid object found with the uuid ", "testdata2".equals(a.getStringData()));
           
           
        }
        catch (Exception e)
        {
View Full Code Here


            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            Descendant a = new Descendant();
            a.setPath("/descendant");
            a.setStringData("testdata");
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject( "/descendant");
            assertNotNull("a is null", a);
            String uuidA = a.getUuid();
            assertNotNull("uuid is null", uuidA);
            log.info("UUID : " + uuidA);

            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setStringData("testdata2");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject("/descendant");
            assertNotNull("a is null", a);
            assertTrue("The uuid has been modified", uuidA.equals(a.getUuid()));

            // --------------------------------------------------------------------------------
            // Get the object with the uuid
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObjectByUuid(uuidA);
            assertNotNull("a is null", a);
            assertTrue("Invalid object found with the uuid ", "testdata2".equals(a.getStringData()));


        }
        catch (Exception e)
        {
View Full Code Here


            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            Descendant a = new Descendant();
            a.setPath("/descendant");
            a.setStringData("testdata");
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject( "/descendant");
            assertNotNull("a is null", a);
            String uuidA = a.getUuid();
            assertNotNull("uuid is null", uuidA);
            log.info("UUID : " + uuidA);

            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setStringData("testdata2");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject("/descendant");
            assertNotNull("a is null", a);
            assertTrue("The uuid has been modified", uuidA.equals(a.getUuid()));

            // --------------------------------------------------------------------------------
            // Get the object with the uuid
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObjectByUuid(uuidA);
            assertNotNull("a is null", a);
            assertTrue("Invalid object found with the uuid ", "testdata2".equals(a.getStringData()));


        }
        catch (Exception e)
        {
View Full Code Here


            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            Descendant a = new Descendant();
            a.setPath("/descendant");
            a.setStringData("testdata");
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject( "/descendant");
            assertNotNull("a is null", a);
            String uuidA = a.getUuid();
            assertNotNull("uuid is null", uuidA);
            log.info("UUID : " + uuidA);

            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setStringData("testdata2");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject("/descendant");
            assertNotNull("a is null", a);
            assertTrue("The uuid has been modified", uuidA.equals(a.getUuid()));

            // --------------------------------------------------------------------------------
            // Get the object with the uuid
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObjectByUuid(uuidA);
            assertNotNull("a is null", a);
            assertTrue("Invalid object found with the uuid ", "testdata2".equals(a.getStringData()));


        }
        catch (Exception e)
        {
View Full Code Here


            // --------------------------------------------------------------------------------
            // Create and store an object A in the repository
            // --------------------------------------------------------------------------------
            Descendant a = new Descendant();
            a.setPath("/descendant");
            a.setStringData("testdata");
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject( "/descendant");
            assertNotNull("a is null", a);
            String uuidA = a.getUuid();
            assertNotNull("uuid is null", uuidA);
            log.info("UUID : " + uuidA);

            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setStringData("testdata2");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObject("/descendant");
            assertNotNull("a is null", a);
            assertTrue("The uuid has been modified", uuidA.equals(a.getUuid()));

            // --------------------------------------------------------------------------------
            // Get the object with the uuid
            // --------------------------------------------------------------------------------
            a = (Descendant) ocm.getObjectByUuid(uuidA);
            assertNotNull("a is null", a);
            assertTrue("Invalid object found with the uuid ", "testdata2".equals(a.getStringData()));


        }
        catch (Exception e)
        {
View Full Code Here

TOP

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

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.