Package org.apache.jackrabbit.ocm.manager

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


            collection.add(c3);
           
            a.setCollection(collection);
           
            ocm.insert(a);
            ocm.save();
           

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


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

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

            // --------------------------------------------------------------------------------
           Discriminator discriminatorObject = new Discriminator();
           discriminatorObject.setPath("/test");
           discriminatorObject.setContent("This is my content");
             ocm.insert(discriminatorObject);            
             ocm.save();
            

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

             // Update the object
             // --------------------------------------------------------------------------------
             discriminatorObject.setContent("new content");            
            
             ocm.update(discriminatorObject);
             ocm.save();

             // --------------------------------------------------------------------------------
             // Get the object
             // --------------------------------------------------------------------------------          
             discriminatorObject = (Discriminator) ocm.getObject( "/test");
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

            a.setPath("/test");
            a.setA1("a1");
            a.setA2("a2");
           
            ocm.insert(a);
            ocm.save();

            // --------------------------------------------------------------------------------
            // Get the object
            // --------------------------------------------------------------------------------          
            a = (A) 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.