Package org.apache.jackrabbit.ocm.manager

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


         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


            documentStream.setContent("Test Content".getBytes());
            documentImpl.setDocumentStream(documentStream);
            Document document = documentImpl;
           
            ocm.insert(document);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve
      //---------------------------------------------------------------------------------------------------------           
      document = (Document) ocm.getObject( "/document1");
View Full Code Here

      //---------------------------------------------------------------------------------------------------------
      // Update  a document
      //---------------------------------------------------------------------------------------------------------           
      document.setName("anotherName");
      ocm.update(document);
      ocm.save();
     
             //  ---------------------------------------------------------------------------------------------------------
      // Retrieve the updated descendant object
      //---------------------------------------------------------------------------------------------------------           
      document = (Document) ocm.getObject( "/document1");
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

      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

            documentStream.setContent("Test Content".getBytes());
            documentImpl.setDocumentStream(documentStream);
            Document document = documentImpl;
           
            ocm.insert(document);
      ocm.save();

      //---------------------------------------------------------------------------------------------------------
      // Retrieve
      //---------------------------------------------------------------------------------------------------------           
      document = (Document) ocm.getObject( "/document1");
View Full Code Here

      //---------------------------------------------------------------------------------------------------------
      // Update  a document
      //---------------------------------------------------------------------------------------------------------           
      document.setName("anotherName");
      ocm.update(document);
      ocm.save();
     
             //  ---------------------------------------------------------------------------------------------------------
      // Retrieve the updated descendant object
      //---------------------------------------------------------------------------------------------------------           
      document = (Document) ocm.getObject( "/document1");
View Full Code Here

          a.setPath("/testDefault");
          a.setP1("p1Value");
          // do not set p2, p3, p4, p5
         
          ocm.insert(a);
          ocm.save();
         
         
          // --------------------------------------------------------------------------------
          // Get the object
          // --------------------------------------------------------------------------------
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

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.