Package org.apache.jackrabbit.ocm.manager

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


      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.ResidualNodes();
            residual.setPath("/test");
            ocm.insert(residual);
            ocm.save();

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

      paragraphs.add(new Paragraph("Another Para"));
      page.setParagraphs(paragraphs);
     
      ocm.insert(page);
     
      ocm.save();
     

     
    }
    catch (RepositoryException e)
View Full Code Here

  Atomic a = new Atomic();
  a.setPath("/atomic");
  a.setBooleanPrimitive(true);
  ocm.insert(a);

  ocm.save();

  //--------------------------------------------------------------------------------------------------------- 
  // Retrieve Folders found on the root level
  //---------------------------------------------------------------------------------------------------------     
  QueryManager queryManager = ocm.getQueryManager();
View Full Code Here

         folder.addChild(subFolder);
                 
     }
     log.debug("Save the folder and its 200 children");  
     ocm.insert(folder);
     ocm.save();
     log.debug("End - Save the folder and its 200 children");

  //--------------------------------------------------------------------------------------------------------- 
  // Retrieve Folder
  //---------------------------------------------------------------------------------------------------------     
View Full Code Here

      anotherDescendant.setAnotherDescendantField("anotherDescendantValue");
      anotherDescendant.setAncestorField("ancestorValue");
      anotherDescendant.setPath("/test");
      ocm.insert(anotherDescendant);

      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve
      //---------------------------------------------------------------------------------------------------------           
      Interface result =  (Interface) ocm.getObject("/test");
View Full Code Here

    Atomic a = new Atomic();
    a.setPath("/atomic");
    a.setBooleanPrimitive(true);
    ocm.insert(a);

    ocm.save();

    //--------------------------------------------------------------------------------------------------------- 
    // Retrieve Descendant class (implements  Interface.class)
    //---------------------------------------------------------------------------------------------------------     
    QueryManager queryManager = ocm.getQueryManager();
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.