Package org.apache.jackrabbit.ocm.manager

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


        NTDetail detail = new NTDetail();
        detail.setField("field" + i);       
        details.add(detail);
      }
      main.setProxyCollection(details);
      ocm.update(main);
      ocm.save();
           
      //---------------------------------------------------------------------------------------------------------
      // Retrieve the main object
      //---------------------------------------------------------------------------------------------------------           
View Full Code Here


      //---------------------------------------------------------------------------------------------------------           
            NTDetail detail = new NTDetail();
      detail.setField("newFieldValue");     
      result.add(detail);
      main.setProxyCollection(result);
      ocm.update(main);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve the main object
      //---------------------------------------------------------------------------------------------------------           
View Full Code Here

            map.put("value3", "Value3");
            map.put("value4", "Value4");
            map.put("value5", Arrays.asList(new String[]{ "Value5-1", "Value5-2" }));
            residual.setElements(map);
           
            ocm.update(residual);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
View Full Code Here

            map.put("value14", "Value14");
            map.put("value15", "Value15");
            map.put("value16", Arrays.asList(new String[]{ "Value16-1", "Value16-2" }));
            residual.setElements(map);
           
            ocm.update(residual);
            ocm.save();

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

            atomic = (Atomic) ocm.getObject( "/test[10]");
            assertNotNull("Object /test[2] not found", atomic);           
           
            // Update the object
            atomic.setString("Modified Test String 10");
            ocm.update(atomic);
            ocm.save();

            // Query on the attribute "string"
            queryManager = this.getQueryManager();
      filter = queryManager.createFilter(Atomic.class)
View Full Code Here

            b2.setB1("b2.1");
            b2.setB2("b2.2");           
            b2.setA(a);
            a.addB(b2);

            ocm.update(a);
            ocm.save();
           

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

            newB.setB1("new B1");
            newB.setB2("new B2");
            a.setB(newB);
           
           
            ocm.update(a);
            ocm.save();

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

             // --------------------------------------------------------------------------------
             // Update the object
             // --------------------------------------------------------------------------------
             discriminatorObject.setContent("new content");            
            
             ocm.update(discriminatorObject);
             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

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.