Package org.apache.jackrabbit.ocm.manager

Examples of org.apache.jackrabbit.ocm.manager.ObjectContentManager.update()


           
            // --------------------------------------------------------------------------------
            // Update object B with an null value
            // --------------------------------------------------------------------------------
            b.setMultiReferences(null);
            ocm.update(b);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Retrieve object B
            // --------------------------------------------------------------------------------
View Full Code Here


            // --------------------------------------------------------------------------------
            // Update object B with an null value
            // --------------------------------------------------------------------------------
            b.setMultiReferences(null);
            ocm.update(b);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Retrieve object B
            // --------------------------------------------------------------------------------
View Full Code Here

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

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

            // --------------------------------------------------------------------------------           
            try
            {
               // update with an incorrect namespace - Should throws an exception
               a.setNamedProperty("unknown:test");              
               ocm.update(a);
               fail("Exception was not triggered with an invalid namespace");
               ocm.save();
            }
            catch (Exception e)
            {
View Full Code Here

            // --------------------------------------------------------------------------------           
            try
            {
               // update with an incorrect namespace - Should throws an exception
               a.setPathProperty("//node1");              
               ocm.update(a);
               fail("Exception was not triggered with an invalid path");
               ocm.save();
            }
            catch (Exception e)
            {
View Full Code Here

            // --------------------------------------------------------------------------------           
            a = null;
            a = (Atomic) ocm.getObject( "/test");

            a.setUndefinedProperty(new Double(1.2));
            ocm.update(a);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------
View Full Code Here

            collection.add(c2);
            collection.add(c3);
           
            a.setCollection(collection);
           
            ocm.update(a);
            ocm.save();

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

           
            // --------------------------------------------------------------------------------
            // Update the object
            // --------------------------------------------------------------------------------
            a.setCollection(null);
            ocm.update(a);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
View Full Code Here

            collection = new ArrayList();
            collection.add(c1);
            collection.add(c2);
            a.setCollection(collection);
           
            ocm.update(a);
            ocm.save();

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

            collection.add(c2);
            collection.add(c3);
            collection.add(c4);
            a.setCollection(collection);
           
            ocm.update(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
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.