Package org.apache.jackrabbit.ocm.manager

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


            hashMapElement.addObject(e2);
           
            main.setHashMap(hashMapElement);
           
            ocm.update(main);
            ocm.save();
           
            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            main = (Main) ocm.getObject( "/test");
View Full Code Here


            e3.setText("Element 4");
            hashMapElement.addObject(e3);
            main.setHashMap(hashMapElement);
           
            ocm.update(main);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            assertNotNull("main.getElements() is null", main.getHashMap());
View Full Code Here

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

      //---------------------------------------------------------------------------------------------------------
      // Retrieve the main object
      //---------------------------------------------------------------------------------------------------------           
      main = (Main) ocm.getObject("/test");
View Full Code Here

            //---------------------------------------------------------------------------------------------------------
      // Delete the main object
      //---------------------------------------------------------------------------------------------------------           
      ocm.remove("/test");
      ocm.save();           
 
    } catch (Exception e) {
      e.printStackTrace();
      fail();
    }
View Full Code Here

      ObjectContentManager ocm = this.getObjectContentManager();     
     
      NTMain main = new NTMain();
      main.setPath("/test");             
            ocm.insert(main);
      ocm.save();
     
      //---------------------------------------------------------------------------------------------------------
      // Retrieve the main object
      //---------------------------------------------------------------------------------------------------------           
      main = (NTMain) ocm.getObject( "/test");
View Full Code Here

        detail.setField("field" + i);       
        details.add(detail);
      }
      main.setProxyCollection(details);
      ocm.update(main);
      ocm.save();
           
      //---------------------------------------------------------------------------------------------------------
      // Retrieve the main object
      //---------------------------------------------------------------------------------------------------------           
      main = (NTMain) ocm.getObject( "/test");
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
      //---------------------------------------------------------------------------------------------------------           
      main = (NTMain) ocm.getObject("/test");
View Full Code Here

            //---------------------------------------------------------------------------------------------------------
      // Delete the main object
      //---------------------------------------------------------------------------------------------------------           
      ocm.remove("/test");
      ocm.save();           
 
    } catch (Exception e) {
      e.printStackTrace();
      fail();
    }
View Full Code Here

            Residual residual = new Residual.ResidualProperties();
            residual.setPath("/test");
                       
            ocm.insert(residual);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            residual = (Residual) ocm.getObject( "/test");
View Full Code Here

            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
            // --------------------------------------------------------------------------------          
            residual = (Residual) ocm.getObject( "/test");
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.