Package org.apache.jackrabbit.ocm.manager

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


            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


      paragraphs.add(new Paragraph("Para 8"));
      paragraphs.add(new Paragraph("Another Para"));
      page.setParagraphs(paragraphs);
     
      ocm.insert(page);
      ocm.save();
     
     
    }
    catch (RepositoryException e)
    {
View Full Code Here

            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)
      filter.addLike("string", "Modified%");     
View Full Code Here

            queryManager = this.getQueryManager();
      filter = queryManager.createFilter(Atomic.class)
      filter.setScope("/");
      query = queryManager.createQuery(filter) ;          
            ocm.remove(query);
            ocm.save();

      result = ocm.getObjects(query);
            assertTrue("Incorrect number of objects found", result.size() == 0);
           
           
View Full Code Here

              
               Page page = new Page();
               page.setPath("/page");
               page.setTitle("Page Title");              
               ocm.insert(page);
               ocm.save();
              
               Paragraph p1 = new Paragraph("para1");
               p1.setPath("/page/paragraph");
               ocm.insert(p1);
              
View Full Code Here

              
             }
             catch(Exception e)
             {
                       ocm.remove("/page");
                      ocm.save();
             }
  }
 
 
  private void importData(Date date)
View Full Code Here

        }
        ocm.insert(a);
       
       
      }
      ocm.save();

    }
    catch (Exception e)
    {
      e.printStackTrace();
View Full Code Here

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

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

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

    try
    {
     
      ObjectContentManager ocm = this.getObjectContentManager();
      ocm.remove("/test5");
      ocm.save();

      assertFalse("Test5 has not been removed", ocm.objectExists("/test5"));

      QueryManager queryManager = this.getQueryManager();
      Filter filter = queryManager.createFilter(Atomic.class);
View Full Code Here

      QueryManager queryManager = this.getQueryManager();
      Filter filter = queryManager.createFilter(Atomic.class);
      filter.addEqualTo("booleanObject" , new Boolean(false));
      Query query = queryManager.createQuery(filter);
      ocm.remove(query);
      ocm.save();

      filter = queryManager.createFilter(Atomic.class);
      filter.setScope("//");
      query = queryManager.createQuery(filter);     
      Collection result = ocm.getObjects(query);
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.