Package org.apache.jackrabbit.ocm.testmodel

Examples of org.apache.jackrabbit.ocm.testmodel.SimpleAnnotedClass


    public void testSimpleAnnotedClasses()
    {
        try
        {
          ObjectContentManager ocm = getObjectContentManager();
          SimpleAnnotedClass a = new SimpleAnnotedClass();
          a.setPath("/test");
          a.setTest("test");
         
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = null;
            a = (SimpleAnnotedClass) ocm.getObject( "/test");
            assertNotNull("A is null", a);
            assertEquals("Invalid value for test", "test", a.getTest());
           
            // --------------------------------------------------------------------------------
            // Update
            // --------------------------------------------------------------------------------
            a.setTest("another test");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = null;
            a = (SimpleAnnotedClass) ocm.getObject( "/test");
            assertNotNull("A is null", a);
            assertEquals("Invalid value for test", "another test", a.getTest());
           
            // --------------------------------------------------------------------------------
            // Search on the interface
            // --------------------------------------------------------------------------------
            QueryManager queryManager = ocm.getQueryManager();
View Full Code Here


    public void testSimpleAnnotedClasses()
    {
        try
        {
          ObjectContentManager ocm = getObjectContentManager();
          SimpleAnnotedClass a = new SimpleAnnotedClass();
          a.setPath("/test");
          a.setTest("test");
         
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = null;
            a = (SimpleAnnotedClass) ocm.getObject( "/test");
            assertNotNull("A is null", a);
            assertEquals("Invalid value for test", "test", a.getTest());
           
            // --------------------------------------------------------------------------------
            // Update
            // --------------------------------------------------------------------------------
            a.setTest("another test");
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
            a = null;
            a = (SimpleAnnotedClass) ocm.getObject( "/test");
            assertNotNull("A is null", a);
            assertEquals("Invalid value for test", "another test", a.getTest());
           
            // --------------------------------------------------------------------------------
            // Search on the interface
            // --------------------------------------------------------------------------------
            QueryManager queryManager = ocm.getQueryManager();
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.ocm.testmodel.SimpleAnnotedClass

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.